Skip to content

Commit

Permalink
'上传'
Browse files Browse the repository at this point in the history
  • Loading branch information
yidashi committed Feb 21, 2017
1 parent da29eee commit 135022a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions common/widgets/upload/MultipleWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ class MultipleWidget extends InputWidget
public function init()
{
parent::init();
if ($this->onlyImage === false) {
$this->url = $this->multiple ? ['/upload/files-upload'] : ['/upload/file-upload'];
} else {
$this->url = $this->multiple ? ['/upload/images-upload'] : ['/upload/image-upload'];
if (empty($this->url)) {
if ($this->onlyImage === false) {
$this->url = $this->multiple ? ['/upload/files-upload'] : ['/upload/file-upload'];
} else {
$this->url = $this->multiple ? ['/upload/images-upload'] : ['/upload/image-upload'];
}
}
if ($this->hasModel()) {
$this->name = $this->name ? : Html::getInputName($this->model, $this->attribute);
Expand Down

0 comments on commit 135022a

Please sign in to comment.