diff --git a/e107_admin/admin.php b/e107_admin/admin.php index d999f6f67..9a4cf9865 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/admin.php,v $ -| $Revision: 1.22 $ -| $Date: 2009-11-07 02:16:52 $ +| $Revision: 1.23 $ +| $Date: 2009-11-08 12:08:23 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -217,7 +217,9 @@ function render_links($link, $title, $description, $perms, $icon = FALSE, $mode function render_clean() { global $td; - while ($td <= ADLINK_COLS) { + $text = ""; + while ($td <= ADLINK_COLS) + { $text .= ""; $td++; } diff --git a/e107_admin/comment.php b/e107_admin/comment.php index e3b1431d1..ef43c6eb7 100644 --- a/e107_admin/comment.php +++ b/e107_admin/comment.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/comment.php,v $ -| $Revision: 1.14 $ -| $Date: 2009-11-07 11:20:26 $ +| $Revision: 1.15 $ +| $Date: 2009-11-08 12:08:23 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -79,7 +79,7 @@ class comments_admin_ui extends e_admin_ui //TODO - finish 'user' type, set 'data' to all editable fields, set 'noedit' for all non-editable fields protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), - 'comment_id' => array('title'=> ID, 'type' => 'int', 'width' =>'5%', 'forced'=> TRUE), + 'comment_id' => array('title'=> LAN_ID, 'type' => 'int', 'width' =>'5%', 'forced'=> TRUE), 'comment_item_id' => array('title'=> "item id", 'type' => 'text', 'width' => '5%'), 'comment_subject' => array('title'=> "subject", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first'), // Display name 'comment_comment' => array('title'=> "comment", 'type' => 'textarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1'), // Display name diff --git a/e107_files/shortcode/batch/admin_shortcodes_class.php b/e107_files/shortcode/batch/admin_shortcodes_class.php index fb07d214c..a7c3d9ea6 100644 --- a/e107_files/shortcode/batch/admin_shortcodes_class.php +++ b/e107_files/shortcode/batch/admin_shortcodes_class.php @@ -1,7 +1,7 @@ $k) + { + $sort_values[$i] = $array[$i][$key]; + } + asort ($sort_values); + reset ($sort_values); + while (list ($arr_key, $arr_val) = each ($sort_values)) + { + $sorted_arr[] = $array[$arr_key]; + } + return $sorted_arr; } } -if (!function_exists('comesafter')) { - function comesafter($s1, $s2) { - $order = 1; - if (strlen ($s1) > strlen ($s2)) { - $temp = $s1; - $s1 = $s2; - $s2 = $temp; - $order = 0; - } - for ($index = 0; $index < strlen ($s1); $index++) { - if ($s1[$index] > $s2[$index]) return ($order); - if ($s1[$index] < $s2[$index]) return (1 - $order); - } - return ($order); - } -} + + if (!function_exists('multiarray_sort')) { function multiarray_sort(&$array, $key, $order = 'asc', $natsort = true, $case = true) @@ -2646,9 +2632,10 @@ class e_admin_form_ui extends e_form { $err = ""; $fields = array_keys($this->getController()->getFields()); + foreach($fields as $val) { - if(method_exists(e_form,$val)) // check even if type is not method. - just in case of an upgrade later by 3rd-party. + if(method_exists('e_form',$val)) // check even if type is not method. - just in case of an upgrade later by 3rd-party. { $err .= "

ERROR: The field name (".$val.") is not allowed.

"; $err .= "Please rename the key (".$val.") to something else in your fields array and database table.

"; @@ -2910,7 +2897,7 @@ class e_admin_form_ui extends e_form if(count($option) > 0) { - $text .= "\t".$this->optgroup_open($optdiz[$type].defset($val['title'], $val['title']), $disabled)."\n"; + $text .= "\t".$this->optgroup_open($optdiz[$type].defset($val['title'], $val['title']), varset($disabled))."\n"; foreach($option as $okey=>$oval) { $text .= $this->option($oval, $okey, $selected == $okey)."\n"; diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 14c900ade..62fcbe7f5 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -9,9 +9,9 @@ * Form Handler * * $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $ - * $Revision: 1.70 $ - * $Date: 2009-11-06 18:37:23 $ - * $Author: secretr $ + * $Revision: 1.71 $ + * $Date: 2009-11-08 12:08:24 $ + * $Author: e107coders $ * */ @@ -854,16 +854,16 @@ class e_form { if($val == "[FIELD]") { - $field = $tmp[$key]; + $field = varset($tmp[$key]); } if($val == "[ASC]") { - $ascdesc = $tmp[$key]; + $ascdesc = varset($tmp[$key]); } if($val == "[FROM]") { - $fromval = $tmp[$key]; + $fromval = varset($tmp[$key]); } } @@ -932,7 +932,7 @@ class e_form { //Not found - if((!$data['forced'] && !in_array($field, $currentlist)) || $data['nolist']) + if((!varset($data['forced']) && !in_array($field, $currentlist)) || varset($data['nolist'])) { continue; } @@ -949,7 +949,7 @@ class e_form $tdclass = vartrue($data['class']); if($field == 'checkboxes') $tdclass = $tdclass ? $tdclass.' autocheck e-pointer' : 'autocheck e-pointer'; - $value = $this->renderValue($field, $fieldvalues[$field], $data, $fieldvalues[$pid]); + $value = $this->renderValue($field, varset($fieldvalues[$field]), $data, varset($fieldvalues[$pid])); if($tdclass) { @@ -1300,9 +1300,9 @@ class e_form $url = (isset($options['url']) ? $tp->replaceConstants($options['url'], 'abs') : e_SELF); $formurl = $url.($query ? '?'.$query : ''); $fields = $options['fields']; - $current_fields = $options['fieldpref']; + $current_fields = varset($options['fieldpref']) ? $options['fieldpref'] : array_keys($options['fields']); - $text .= " + $text = " ".vartrue($options['form_pre'])."
".vartrue($options['fieldset_pre'])." @@ -1311,7 +1311,7 @@ class e_form ".vartrue($options['table_pre'])." ".$this->colGroup($fields, $current_fields)." - ".$this->thead($fields, $current_fields, $options['head_query'], $options['query'])." + ".$this->thead($fields, $current_fields, varset($options['head_query']), varset($options['query']))." "; diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index 979cf0827..d0550869c 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -9,9 +9,9 @@ * mySQL Handler * * $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $ - * $Revision: 1.60 $ - * $Date: 2009-10-29 21:28:09 $ - * $Author: e107steved $ + * $Revision: 1.61 $ + * $Date: 2009-11-08 12:08:24 $ + * $Author: e107coders $ */ if(defined('MYSQL_LIGHT')) @@ -49,8 +49,8 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s * * @package e107 * @category e107_handlers - * @version $Revision: 1.60 $ - * @author $Author: e107steved $ + * @version $Revision: 1.61 $ + * @author $Author: e107coders $ * */ class e_db_mysql { @@ -70,7 +70,7 @@ class e_db_mysql { var $mySQLlanguage; var $mySQLinfo; var $tabset; - var $mySQLtablelist = array(); // list of all Db tables. + var $mySQLtableList = array(); // list of all Db tables. var $mySQLtableListLanguage = array(); // Db table list for the currently selected language diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 2ffc1397e..ebeb8b470 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -1,7 +1,7 @@