Browse Source

"StringHelper::basename()" has been replaced by plain "basename" at "FileHelper".

tags/2.0.0-beta
Paul Klimov 12 years ago
parent
commit
dc8c71f409
  1. 4
      framework/yii/helpers/base/FileHelper.php

4
framework/yii/helpers/base/FileHelper.php

@ -67,7 +67,7 @@ class FileHelper
if ($language === $sourceLanguage) { if ($language === $sourceLanguage) {
return $file; return $file;
} }
$desiredFile = dirname($file) . DIRECTORY_SEPARATOR . $sourceLanguage . DIRECTORY_SEPARATOR . StringHelper::basename($file); $desiredFile = dirname($file) . DIRECTORY_SEPARATOR . $sourceLanguage . DIRECTORY_SEPARATOR . basename($file);
return is_file($desiredFile) ? $desiredFile : $file; return is_file($desiredFile) ? $desiredFile : $file;
} }
@ -179,7 +179,7 @@ class FileHelper
{ {
$items = glob($dir . DIRECTORY_SEPARATOR . '{,.}*', GLOB_MARK | GLOB_BRACE); $items = glob($dir . DIRECTORY_SEPARATOR . '{,.}*', GLOB_MARK | GLOB_BRACE);
foreach ($items as $item) { foreach ($items as $item) {
$itemBaseName = StringHelper::basename($item); $itemBaseName = basename($item);
if ($itemBaseName === '.' || $itemBaseName === '..') { if ($itemBaseName === '.' || $itemBaseName === '..') {
continue; continue;
} }

Loading…
Cancel
Save