reformat curry() to make my editor happy
This commit is contained in:
parent
70fc32c5b9
commit
0056b635c6
19
lib/util.php
19
lib/util.php
@ -492,8 +492,6 @@ function callback_helper($matches, $callback, $notice_id) {
|
||||
}
|
||||
}while($original_url!=$url);
|
||||
|
||||
|
||||
|
||||
if(empty($notice_id)){
|
||||
$result = call_user_func_array($callback,$url);
|
||||
}else{
|
||||
@ -508,16 +506,13 @@ function curry($fn) {
|
||||
array_shift($args);
|
||||
$id = uniqid('_partial');
|
||||
$GLOBALS[$id] = array($fn, $args);
|
||||
return create_function(
|
||||
'',
|
||||
'
|
||||
$args = func_get_args();
|
||||
return call_user_func_array(
|
||||
$GLOBALS["'.$id.'"][0],
|
||||
array_merge(
|
||||
$args,
|
||||
$GLOBALS["'.$id.'"][1]));
|
||||
');
|
||||
return create_function('',
|
||||
'$args = func_get_args(); '.
|
||||
'return call_user_func_array('.
|
||||
'$GLOBALS["'.$id.'"][0],'.
|
||||
'array_merge('.
|
||||
'$args,'.
|
||||
'$GLOBALS["'.$id.'"][1]));');
|
||||
}
|
||||
|
||||
function common_linkify($url) {
|
||||
|
Loading…
Reference in New Issue
Block a user