Browse Source

Merge pull request #1200 from zhuravljov/master

Fixed gii after merge #1184
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
71a619d2ae
  1. 2
      extensions/gii/generators/crud/Generator.php
  2. 4
      extensions/gii/generators/model/Generator.php

2
extensions/gii/generators/crud/Generator.php

@ -278,7 +278,7 @@ class Generator extends \yii\gii\Generator
$rules = [];
foreach ($types as $type => $columns) {
$rules[] = "['" . implode(', ', $columns) . "', '$type']";
$rules[] = "[['" . implode("', '", $columns) . "'], '$type']";
}
return $rules;

4
extensions/gii/generators/model/Generator.php

@ -237,10 +237,10 @@ class Generator extends \yii\gii\Generator
$rules = [];
foreach ($types as $type => $columns) {
$rules[] = "[['" . implode(', ', $columns) . "'], '$type']";
$rules[] = "[['" . implode("', '", $columns) . "'], '$type']";
}
foreach ($lengths as $length => $columns) {
$rules[] = "[['" . implode(', ', $columns) . "'], 'string', 'max' => $length]";
$rules[] = "[['" . implode("', '", $columns) . "'], 'string', 'max' => $length]";
}
return $rules;

Loading…
Cancel
Save