Merge pull request #6535 from ovidiupruteanu/patch-4

Replace rtrim with preg_replace in SchemaShell
This commit is contained in:
Mark Story 2015-05-11 10:56:06 -04:00
commit efe82ea148

View file

@ -158,7 +158,7 @@ class SchemaShell extends AppShell {
}
if ($snapshot === true) {
$fileName = rtrim($this->params['file'], '.php');
$fileName = basename($this->params['file'], '.php');
$Folder = new Folder($this->Schema->path);
$result = $Folder->read();
@ -285,7 +285,7 @@ class SchemaShell extends AppShell {
'connection' => $this->params['connection'],
);
if (!empty($this->params['snapshot'])) {
$fileName = rtrim($this->Schema->file, '.php');
$fileName = basename($this->Schema->file, '.php');
$options['file'] = $fileName . '_' . $this->params['snapshot'] . '.php';
}