"allways add stat array as last parameter to egw_vfs::find() callback"

This commit is contained in:
Ralf Becker 2008-10-03 11:06:41 +00:00
parent 6b1841dccb
commit f0c47082a2

View File

@ -277,9 +277,9 @@ class egw_vfs extends vfs_stream_wrapper
* - order => name order rows by name column * - order => name order rows by name column
* - sort => (ASC|DESC) sort, default ASC * - sort => (ASC|DESC) sort, default ASC
* - limit => N,[n=0] return N entries from position n on, which defaults to 0 * - limit => N,[n=0] return N entries from position n on, which defaults to 0
* @param string/array/true $exec=null function to call with each found file or dir as first param or * @param string/array/true $exec=null function to call with each found file/dir as first param and stat array as last param or
* true to return file => stat pairs * true to return file => stat pairs
* @param array $exec_params=null further params for exec as array, path is always the first param! * @param array $exec_params=null further params for exec as array, path is always the first param and stat the last!
* @return array of pathes if no $exec, otherwise path => stat pairs * @return array of pathes if no $exec, otherwise path => stat pairs
*/ */
static function find($base,$options=null,$exec=null,$exec_params=null) static function find($base,$options=null,$exec=null,$exec_params=null)
@ -429,6 +429,7 @@ class egw_vfs extends vfs_stream_wrapper
{ {
$options = $exec_params; $options = $exec_params;
array_unshift($options,$path); array_unshift($options,$path);
array_push($options,$stat);
//echo "calling ".print_r($exec,true).print_r($options,true)."\n"; //echo "calling ".print_r($exec,true).print_r($options,true)."\n";
$stat = call_user_func_array($exec,$options); $stat = call_user_func_array($exec,$options);
} }