mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 10:32:40 +00:00
removing usage of Model::loadInfo() replaced by Model::schema(), removing new lines at the end of some files, removed deprecated chmodr() function from basics, updated bake and scaffold views
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5912 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
00c7daf8bd
commit
fbd3811cd1
37 changed files with 461 additions and 518 deletions
|
@ -1227,7 +1227,7 @@
|
|||
* @return mixed plural form of translated string if $return is false string will be echoed
|
||||
*/
|
||||
function __n($singular, $plural, $count, $return = false) {
|
||||
if(!$singular) {
|
||||
if (!$singular) {
|
||||
return;
|
||||
}
|
||||
if (!class_exists('I18n')) {
|
||||
|
@ -1497,41 +1497,6 @@
|
|||
$string = str_replace('/', '_', $string);
|
||||
return $string;
|
||||
}
|
||||
/**
|
||||
* See Folder::chmod
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function chmodr($path, $mode = 0755) {
|
||||
trigger_error("Deprecated. See Folder::chmod()", E_USER_ERROR);
|
||||
if (!is_dir($path)) {
|
||||
return chmod($path, $mode);
|
||||
}
|
||||
$dir = opendir($path);
|
||||
|
||||
while ($file = readdir($dir)) {
|
||||
if ($file != '.' && $file != '..') {
|
||||
$fullpath = $path . '/' . $file;
|
||||
|
||||
if (!is_dir($fullpath)) {
|
||||
if (!chmod($fullpath, $mode)) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!chmodr($fullpath, $mode)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
if (chmod($path, $mode)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Implements http_build_query for PHP4.
|
||||
*
|
||||
|
@ -1590,4 +1555,4 @@
|
|||
}
|
||||
return $val2;
|
||||
}
|
||||
?>
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue