git://git.onelab.eu
/
plewww.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lambdas and create_function
[plewww.git]
/
planetlab
/
includes
/
plc_visibletags2.php
diff --git
a/planetlab/includes/plc_visibletags2.php
b/planetlab/includes/plc_visibletags2.php
index
8cdc1d9
..
6120b36
100644
(file)
--- a/
planetlab/includes/plc_visibletags2.php
+++ b/
planetlab/includes/plc_visibletags2.php
@@
-45,7
+45,7
@@
class VisibleTags {
}
// sort upon 'rank'
}
// sort upon 'rank'
- usort ($columns,
create_function('$col1,$col2','return strcmp($col1["header"],$col2["header"]);')
);
+ usort ($columns,
function($col1, $col2) { return strcmp($col1["header"],$col2["header"]); }
);
# cache for next time
$this->columns=$columns;
# cache for next time
$this->columns=$columns;
@@
-56,7
+56,8
@@
class VisibleTags {
// extract tagname
function column_names () {
// extract tagname
function column_names () {
- return array_map(create_function('$tt','return $tt["tagname"];'),$this->columns());
+ return array_map(function($tt) {return $tt["tagname"];},
+ $this->columns());
}
// to add with array_merge to the headers part of the Plekit Table
}
// to add with array_merge to the headers part of the Plekit Table