summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-08-27 20:06:03 -0700
committerEvan Prodromou <evan@status.net>2009-08-27 20:06:03 -0700
commit0056b635c661c4aaf6bce08795af925388e35f5c (patch)
treeb4800938ef37acc355156d6969c670ffffe070b2
parent70fc32c5b93a6cd71cf33212ac792c38632bbdb3 (diff)
reformat curry() to make my editor happy
-rw-r--r--lib/util.php23
1 files changed, 9 insertions, 14 deletions
diff --git a/lib/util.php b/lib/util.php
index cedb70873..79a219fd6 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -457,7 +457,7 @@ function callback_helper($matches, $callback, $notice_id) {
$url=$matches[1];
$left = strpos($matches[0],$url);
$right = $left+strlen($url);
-
+
$groupSymbolSets=array(
array(
'left'=>'(',
@@ -491,9 +491,7 @@ function callback_helper($matches, $callback, $notice_id) {
$url=substr($url,0,-1);
}
}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) {