From a778db99499b0e3f799db6a0ad416a91ac26e721 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sun, 1 Apr 2012 14:05:55 +0300 Subject: [PATCH] remove Call-time pass-by-reference --- ipf/admin/views.php | 10 +++++----- ipf/form/field/file.php | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ipf/admin/views.php b/ipf/admin/views.php index 852ebe0..f211647 100644 --- a/ipf/admin/views.php +++ b/ipf/admin/views.php @@ -127,7 +127,7 @@ function IPF_Admin_Views_EditItem($request, $match) $o = new $m(); $item = $o->getTable()->find($id); - return $ma->EditItem($request, $lapp, $lmodel, &$item); + return $ma->EditItem($request, $lapp, $lmodel, $item); } } @@ -157,8 +157,8 @@ function IPF_Admin_Views_DeleteItem($request, $match) $o = new $m(); $item = $o->getTable()->find($id); - return $ma->DeleteItem($request, $lapp, $lmodel, &$item); - } + return $ma->DeleteItem($request, $lapp, $lmodel, $item); + } } return new IPF_HTTP_Response_NotFound(); @@ -409,8 +409,8 @@ function IPF_Admin_Views_FileBrowser($request, $match){ } closedir($dh); } - usort(&$dirs, 'cmp'); - usort(&$files, 'cmp'); + usort($dirs, 'cmp'); + usort($files, 'cmp'); $dirtree = dir_recursive($upload_path); diff --git a/ipf/form/field/file.php b/ipf/form/field/file.php index 8245614..306a88f 100644 --- a/ipf/form/field/file.php +++ b/ipf/form/field/file.php @@ -11,13 +11,13 @@ class IPF_Form_Field_File extends IPF_Form_Field function clean($value) { - if (@$value['remove']===true){ + if (@$value['remove']===true){ IPF::loadFunction($this->remove_function); return call_user_func($this->remove_function, $value['data']); } if (@$value['name']!=@$value['rename']){ IPF::loadFunction($this->rename_function); - return call_user_func($this->rename_function, &$value); + return call_user_func($this->rename_function, $value); } $value = @$value['data']; @@ -80,9 +80,10 @@ function IPF_Form_Field_removeFile($value, $params=array()){ } function IPF_Form_Field_renameFile($value, $params=array()){ - $upload_path = IPF::getUploadPath($params); + $upload_path = IPF::getUploadPath($params); $old_name = @$upload_path.DIRECTORY_SEPARATOR.$value['name']; $new_name = @$upload_path.DIRECTORY_SEPARATOR.$value['rename']; @rename($old_name, $new_name); return @$value['rename']; } + -- 2.49.0