diff --git a/framework/yii/bootstrap/Nav.php b/framework/yii/bootstrap/Nav.php index 8e35010..8069699 100644 --- a/framework/yii/bootstrap/Nav.php +++ b/framework/yii/bootstrap/Nav.php @@ -27,13 +27,19 @@ use yii\helpers\Html; * ), * array( * 'label' => 'Dropdown', - * 'dropdown' => array( + * 'items' => array( * array( - * 'label' => 'DropdownA', + * 'label' => 'Level 1 -DropdownA', * 'url' => '#', + * 'items' => array( + * array( + * 'label' => 'Level 2 -DropdownA', + * 'url' => '#', + * ), + * ), * ), * array( - * 'label' => 'DropdownB', + * 'label' => 'Level 1 -DropdownB', * 'url' => '#', * ), * ), @@ -114,7 +120,7 @@ class Nav extends Widget } $label = $this->encodeLabels ? Html::encode($item['label']) : $item['label']; $options = ArrayHelper::getValue($item, 'options', array()); - $dropdown = ArrayHelper::getValue($item, 'dropdown'); + $items = ArrayHelper::getValue($item, 'items'); $url = Html::url(ArrayHelper::getValue($item, 'url', '#')); $linkOptions = ArrayHelper::getValue($item, 'linkOptions', array()); @@ -122,19 +128,19 @@ class Nav extends Widget $this->addCssClass($options, 'active'); } - if ($dropdown !== null) { + if ($items !== null) { $linkOptions['data-toggle'] = 'dropdown'; $this->addCssClass($options, 'dropdown'); $this->addCssClass($urlOptions, 'dropdown-toggle'); $label .= ' ' . Html::tag('b', '', array('class' => 'caret')); - if (is_array($dropdown)) { - $dropdown = Dropdown::widget(array( - 'items' => $dropdown, + if (is_array($items)) { + $items = Dropdown::widget(array( + 'items' => $items, 'clientOptions' => false, )); } } - return Html::tag('li', Html::a($label, $url, $linkOptions) . $dropdown, $options); + return Html::tag('li', Html::a($label, $url, $linkOptions) . $items, $options); } } diff --git a/framework/yii/db/pgsql/Schema.php b/framework/yii/db/pgsql/Schema.php index bec1803..94f845f 100644 --- a/framework/yii/db/pgsql/Schema.php +++ b/framework/yii/db/pgsql/Schema.php @@ -73,7 +73,7 @@ class Schema extends \yii\db\Schema ); /** - * Creates a query builder for the MySQL database. + * Creates a query builder for the PostgreSQL database. * @return QueryBuilder query builder instance */ public function createQueryBuilder() @@ -143,14 +143,9 @@ class Schema extends \yii\db\Schema $sql = <<defaultSchema) { + $foreignTable = $constraint['foreign_table_schema'] . '.' . $constraint['foreign_table_name']; + } else { + $foreignTable = $constraint['foreign_table_name']; + } + $citem = array($foreignTable); foreach ($columns as $idx => $column) { $citem[] = array($fcolumns[$idx] => $column); } @@ -243,10 +243,6 @@ ORDER BY SQL; $columns = $this->db->createCommand($sql)->queryAll(); - if (empty($columns)) { - return false; - } - foreach ($columns as $column) { $column = $this->loadColumnSchema($column); $table->columns[$column->name] = $column;