Browse Source

Fixed gii after merge #1184

tags/2.0.0-beta
KiTE 11 years ago
parent
commit
c5ee83bffb
  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 = []; $rules = [];
foreach ($types as $type => $columns) { foreach ($types as $type => $columns) {
$rules[] = "['" . implode(', ', $columns) . "', '$type']"; $rules[] = "[['" . implode("', '", $columns) . "'], '$type']";
} }
return $rules; return $rules;

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

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

Loading…
Cancel
Save