From: Thomas Mudrunka Date: Fri, 24 Feb 2012 17:53:47 +0000 (+0100) Subject: Fix zpetny kompatibility s PHP 5.2 (kvuli Gandalfovi) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=e9482e8aa8316b92ae0217b932aff593004ce9aa;p=mirrors%2FSokoMan.git Fix zpetny kompatibility s PHP 5.2 (kvuli Gandalfovi) --- diff --git a/index.php b/index.php index 5a63954..75303de 100755 --- a/index.php +++ b/index.php @@ -343,7 +343,8 @@ EOF; 'status' => array('status_id' => array(array('item',$where_url))) ); $relations_conditions=array( - 'not_sold' => function(&$table,$id,$class=false,$column=false) { return(@$table[$id]['status_id'] != 3); } + //'not_sold' => function(&$table,$id,$class=false,$column=false) { return(@$table[$id]['status_id'] != 3); } + 'not_sold' => 'return(@$table[$id]["status_id"] != 3);' ); foreach($table as $id => $row) { foreach($row as $column => $value) { @@ -355,8 +356,8 @@ EOF; $destination[1] ); if(isset($destination[2])) { - $condition = $relations_conditions[$destination[2]]($table,$id); - if(!$condition) continue; + //$condition = $relations_conditions[$destination[2]]($table,$id); + if(!eval($relations_conditions[$destination[2]])) continue; } @$table[$id][$class.$suffix_relations] .= $this->link($destination[0], $destination_url, !isset($destination[2])).','; }