mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-07 00:26:52 +01:00
merge from 1.0
This commit is contained in:
@@ -378,6 +378,7 @@ EOD;
|
||||
foreach($table->columns as $column)
|
||||
{
|
||||
$label=ucwords(trim(strtolower(str_replace(array('-','_'),' ',preg_replace('/(?<![A-Z])[A-Z]/', ' \0', $column->name)))));
|
||||
$label=preg_replace('/\s+/',' ',$label);
|
||||
if(strcasecmp(substr($label,-3),' id')===0)
|
||||
$label=substr($label,0,-3);
|
||||
$labels[]="'{$column->name}'=>'$label'";
|
||||
|
||||
Reference in New Issue
Block a user