|
|
@ -550,13 +550,8 @@ class Generator extends \yii\gii\Generator |
|
|
|
} |
|
|
|
} |
|
|
|
$patterns[] = '/^' . str_replace('*', '(\w+)', $pattern) . '$/'; |
|
|
|
$patterns[] = '/^' . str_replace('*', '(\w+)', $pattern) . '$/'; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!empty($db->tablePrefix)) { |
|
|
|
$patterns[] = "/^{$db->tablePrefix}(.*?)$/"; |
|
|
|
$patterns[] = "/^{$db->tablePrefix}(.*?)$/"; |
|
|
|
$patterns[] = "/^(.*?){$db->tablePrefix}$/"; |
|
|
|
$patterns[] = "/^(.*?){$db->tablePrefix}$/"; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$patterns[] = "/^tbl_(.*?)$/"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$className = $tableName; |
|
|
|
$className = $tableName; |
|
|
|
foreach ($patterns as $pattern) { |
|
|
|
foreach ($patterns as $pattern) { |
|
|
|
if (preg_match($pattern, $tableName, $matches)) { |
|
|
|
if (preg_match($pattern, $tableName, $matches)) { |
|
|
|