From 063bf2b2005589a5897c9c10fd1a1779d55fa1b9 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 25 Apr 2013 17:29:46 -0700 Subject: [PATCH] $frm->selectbox() renamed to $frm->select(); for consistency. --- e107_admin/admin_log.php | 4 ++-- e107_admin/cache.php | 2 +- e107_admin/comment.php | 2 +- e107_admin/fileinspector.php | 4 ++-- e107_admin/language.php | 6 +++--- e107_admin/newspost.php | 14 ++++++------- e107_admin/plugin.php | 12 +++++------ e107_admin/prefs.php | 12 +++++------ e107_admin/theme.php | 4 ++-- e107_admin/users.php | 6 +++--- e107_admin/users_extended.php | 2 +- .../shortcodes/batch/admin_shortcodes.php | 2 +- e107_handlers/admin_ui.php | 2 +- e107_handlers/form_handler.php | 21 +++++++++++++++++-- e107_handlers/mailout_admin_class.php | 2 +- e107_handlers/mailout_class.php | 2 +- e107_plugins/_blank/admin_config.php | 2 +- e107_plugins/banner/admin_banner.php | 4 ++-- e107_plugins/chatbox_menu/admin_chatbox.php | 4 ++-- .../download/handlers/adminDownload_class.php | 4 ++-- e107_plugins/download/includes/admin.php | 4 ++-- .../import/providers/html_import_class.php | 2 +- .../newforumposts_main/admin_config.php | 2 +- e107_plugins/rss_menu/admin_prefs.php | 2 +- .../tinymce/plugins/e107bbcode/dialog.php | 2 +- 25 files changed, 70 insertions(+), 53 deletions(-) diff --git a/e107_admin/admin_log.php b/e107_admin/admin_log.php index 5932e362c..8c68adb02 100644 --- a/e107_admin/admin_log.php +++ b/e107_admin/admin_log.php @@ -412,7 +412,7 @@ if($action == "config") ".RL_LAN_044." - ".$frm->selectbox('sys_log_perpage', array(10, 20, 30, 40, 50), $pref['sys_log_perpage'])."".RL_LAN_064." + ".$frm->select('sys_log_perpage', array(10, 20, 30, 40, 50), $pref['sys_log_perpage'])."".RL_LAN_064." "; @@ -757,7 +757,7 @@ if(isset($page_title[$action])) case 'priority': $text .= " ".RL_LAN_058." - ".$frm->selectbox('roll_pri_cond', array('xx' => ' ', 'gt' => '>=', 'eq' => '==', 'lt' => '<='), $pri_filter_cond)." + ".$frm->select('roll_pri_cond', array('xx' => ' ', 'gt' => '>=', 'eq' => '==', 'lt' => '<='), $pri_filter_cond)." "; diff --git a/e107_admin/cache.php b/e107_admin/cache.php index e48f74374..6e91f6b48 100644 --- a/e107_admin/cache.php +++ b/e107_admin/cache.php @@ -177,7 +177,7 @@ $text = "
".$frm->admin_button('submit_cache', CACLAN_2, 'update')."
- ".$frm->selectbox('option_clear_cache', array( + ".$frm->select('option_clear_cache', array( 'empty_all' => CACLAN_26, 'empty_contentcache' => CACLAN_5, 'empty_syscache' => CACLAN_16, diff --git a/e107_admin/comment.php b/e107_admin/comment.php index 8dfe1d291..38a98ea3c 100644 --- a/e107_admin/comment.php +++ b/e107_admin/comment.php @@ -159,7 +159,7 @@ class comments_admin_form_ui extends e_admin_form_ui if($mode == 'write') { - return $frm->selectbox("comment_blocked", $blocked, $curVal); + return $frm->select("comment_blocked", $blocked, $curVal); } diff --git a/e107_admin/fileinspector.php b/e107_admin/fileinspector.php index 5bc948e2c..4ecc83416 100644 --- a/e107_admin/fileinspector.php +++ b/e107_admin/fileinspector.php @@ -204,7 +204,7 @@ class file_inspector { ".FC_LAN_3." ".FC_LAN_5.": - ".$frm->selectbox('core',$coreOpts,$_POST['core'])." + ".$frm->select('core',$coreOpts,$_POST['core'])." "; @@ -213,7 +213,7 @@ class file_inspector { ".FC_LAN_14.": - ".$frm->selectbox('type', $dispOpt, $_POST['type'])." + ".$frm->select('type', $dispOpt, $_POST['type'])." "; diff --git a/e107_admin/language.php b/e107_admin/language.php index 2d2014170..61f910b9d 100644 --- a/e107_admin/language.php +++ b/e107_admin/language.php @@ -475,7 +475,7 @@ function multilang_prefs() $sellan = preg_replace("/lan_*.php/i", "", $pref['sitelanguage']); - $text .= $frm->selectbox('mainsitelanguage',$lanlist,$sellan,"useValues=1"); + $text .= $frm->select('mainsitelanguage',$lanlist,$sellan,"useValues=1"); $text .= " @@ -519,7 +519,7 @@ function multilang_prefs() { if($val != $pref['sitelanguage']) { - $opt .= "".$val.""; + $opt .= "".$val.""; } } @@ -812,7 +812,7 @@ function show_tools() $text .= " ". - $frm->selectbox('deprecatedLansReverse',$depOptions,$_POST['deprecatedLansReverse']). + $frm->select('deprecatedLansReverse',$depOptions,$_POST['deprecatedLansReverse']). $frm->admin_button('searchDeprecated',"Check",'other')." ".(count($lans) + count($plugs))." files found diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index a70e21d3b..fd3c7cd95 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -2125,14 +2125,14 @@ class admin_newspost } else { - // $text .= $frm->selectbox("cat_id",$this->news_category,$_POST['cat_id']); + // $text .= $frm->select("cat_id",$this->news_category,$_POST['cat_id']); $catopt = array(); foreach ($this->news_categories as $row) { $catopt[$row['category_id']] = $tp->toHTML($row['category_name'], FALSE, "LINKTEXT"); } - $text .= $frm->selectbox("cat_id", $catopt, $_POST['cat_id']); + $text .= $frm->select("cat_id", $catopt, $_POST['cat_id']); /* $text .= $frm->select_open('cat_id'); @@ -2174,7 +2174,7 @@ class admin_newspost "; //XXX multiple -selections at once. (comma separated) - working - $text .= $frm->selectbox('news_render_type', $this->news_renderTypes, vartrue($_POST['news_render_type']), "multiple=1")." + $text .= $frm->select('news_render_type', $this->news_renderTypes, vartrue($_POST['news_render_type']), "multiple=1")."
".NWSLAN_74."
@@ -2916,7 +2916,7 @@ class admin_newspost function ajax_exec_pref_archnum() { $frm = e107::getForm(); - echo $frm->selectbox('newsposts_archive', $this->_optrange(intval($this->getSubAction()) - 1), intval(e107::getPref('newsposts_archive')), 'class=tbox&tabindex='.intval($this->getId())); + echo $frm->select('newsposts_archive', $this->_optrange(intval($this->getSubAction()) - 1), intval(e107::getPref('newsposts_archive')), 'class=tbox&tabindex='.intval($this->getId())); } /* @@ -2969,13 +2969,13 @@ class admin_newspost ".NWSLAN_87." - ".$frm->selectbox('nbr_cols', $this->_optrange(6, false), $pref['nbr_cols'], 'class=tbox')." + ".$frm->select('nbr_cols', $this->_optrange(6, false), $pref['nbr_cols'], 'class=tbox')." ".NWSLAN_88." - ".$frm->selectbox('newsposts', $this->_optrange(50, false), $pref['newsposts'], 'class=tbox')." + ".$frm->select('newsposts', $this->_optrange(50, false), $pref['newsposts'], 'class=tbox')." "; @@ -2989,7 +2989,7 @@ class admin_newspost ".NWSLAN_115." - ".$frm->selectbox('newsposts_archive', $this->_optrange(intval($pref['newsposts']) - 1), intval($pref['newsposts_archive']), 'class=tbox')." + ".$frm->select('newsposts_archive', $this->_optrange(intval($pref['newsposts']) - 1), intval($pref['newsposts_archive']), 'class=tbox')."
".NWSLAN_116."
diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index 377690143..b7037e45e 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -1328,7 +1328,7 @@ class pluginManager{ if(is_writable(e_PLUGIN.$plug['plugin_path'])) { - $del_text = $frm->selectbox('delete_files','yesno',0); + $del_text = $frm->select('delete_files','yesno',0); } else { @@ -1430,7 +1430,7 @@ class pluginManager{ { $text .= "\n".$tp->toHTML($val['label'],FALSE,'TITLE'); $text .= varset($val['preview']) ? "
".$val['preview']."
" : ""; - $text .= "\n".$frm->selectbox($key,$val['itemList'],$val['itemDefault']); + $text .= "\n".$frm->select($key,$val['itemList'],$val['itemDefault']); $text .= varset($val['helpText']) ? "
".$val['helpText']."
" : ""; $text .= "\n\n"; } @@ -1596,7 +1596,7 @@ class pluginBuilder Select your plugin's folder - ".$frm->selectbox("newplugin",$newDir)." + ".$frm->select("newplugin",$newDir)." "; @@ -1951,7 +1951,7 @@ class pluginBuilder 'about' => 'about' ); - $text = $frm->selectbox($name, $options,'','required=1&class=null', true); + $text = $frm->select($name, $options,'','required=1&class=null', true); break; @@ -2073,7 +2073,7 @@ TEMPLATE; $text .= " Mode - ".$frm->selectbox($this->table."[mode]",$modes, $defaultMode[$table], 'required=1&class=null', true)." + ".$frm->select($this->table."[mode]",$modes, $defaultMode[$table], 'required=1&class=null', true)." "; @@ -2225,7 +2225,7 @@ TEMPLATE; // asort($array); $fname = $this->table."[fields][".$name."][type]"; - return $frm->selectbox($fname, $array, $this->guess($name, $val),'required=1&class=null', true); + return $frm->select($fname, $array, $this->guess($name, $val),'required=1&class=null', true); } diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php index fd69d71d5..7b80f3ab5 100644 --- a/e107_admin/prefs.php +++ b/e107_admin/prefs.php @@ -391,7 +391,7 @@ $text .= "
".LAN_MAILOUT_110."
- ".$frm->admin_button('testemail', LAN_MAILOUT_112,'other')."  + ".$frm->admin_button('testemail', LAN_MAILOUT_112,'other')."  @@ -503,7 +503,7 @@ $text .= "
'texthtml' => LAN_MAILOUT_126, 'texttheme' => LAN_MAILOUT_127 ); - $text .= $frm->selectbox('mail_sendstyle', $emFormat, vartrue($pref['mail_sendstyle'])); + $text .= $frm->select('mail_sendstyle', $emFormat, vartrue($pref['mail_sendstyle'])); $text .= " @@ -731,9 +731,9 @@ $text .= " Date/Time Input-Field format: - ".$frm->selectbox('inputdate',$inputdate, e107::getPref('inputdate')); + ".$frm->select('inputdate',$inputdate, e107::getPref('inputdate')); - $text .= $frm->selectbox('inputtime',$inputtime, e107::getPref('inputtime')); + $text .= $frm->select('inputtime',$inputtime, e107::getPref('inputtime')); $text .= " @@ -1495,7 +1495,7 @@ $text .= " $text .= " ".PRFLAN_178." - ".$frm->selectbox('password_CHAP',$CHAP_list,$pref['password_CHAP'] ); + ".$frm->select('password_CHAP',$CHAP_list,$pref['password_CHAP'] ); //." ".$frm->select_open('password_CHAP'); //TODO - user tracking session name - visible only if Cookie is enabled (JS) @@ -1623,7 +1623,7 @@ $text .= " 'asc' => "Most recent comments last" ); - $text .= $frm->selectbox('comments_sort',$comment_sort, $pref['comments_moderate'])." + $text .= $frm->select('comments_sort',$comment_sort, $pref['comments_moderate'])." diff --git a/e107_admin/theme.php b/e107_admin/theme.php index 7d0b84d12..5d51f4254 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -249,7 +249,7 @@ class theme_builder Select your theme's folder - ".$frm->selectbox("newtheme",$newDir)." + ".$frm->select("newtheme",$newDir)." "; /* @@ -612,7 +612,7 @@ TEMPLATE; sort($allowedCategories); - $text = $frm->selectbox($name, $allowedCategories,'','useValues=1&required=1', true); + $text = $frm->select($name, $allowedCategories,'','useValues=1&required=1', true); break; diff --git a/e107_admin/users.php b/e107_admin/users.php index fc92593bc..465f8eccf 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -1255,7 +1255,7 @@ class users_admin_ui extends e_admin_ui Notification and user status - ".$frm->selectbox('sendconfemail', array('0' => "Activate, Don't Notify", '1' => 'Activate, Notify (password)', '2' => 'Require Activation, Notify (password and activation link)'), (int) varset($_POST['sendconfemail'], 0))." + ".$frm->select('sendconfemail', array('0' => "Activate, Don't Notify", '1' => 'Activate, Notify (password)', '2' => 'Require Activation, Notify (password and activation link)'), (int) varset($_POST['sendconfemail'], 0))."
".USRLAN_181."
"; @@ -1895,7 +1895,7 @@ class users_admin_form_ui extends e_admin_form_ui if($mode == 'write') { $frm = e107::getForm(); - return $frm->selectbox('user_ban',$bo,$curval); + return $frm->select('user_ban',$bo,$curval); } return vartrue($bo[$curval],' '); // ($curval == 1) ? ADMIN_TRUE_ICON : ''; @@ -1916,7 +1916,7 @@ class users_admin_form_ui extends e_admin_form_ui if($mode == 'write') //FIXME userclasses are NOT be saved since they are an array. { - return $frm->selectbox('user_class', $list, $curval, 'description=1&multiple=1'); + return $frm->select('user_class', $list, $curval, 'description=1&multiple=1'); // return $frm->uc_select('user_class[]', $curval, 'admin,classes', 'description=1&multiple=1');// doesn't work correctly. } diff --git a/e107_admin/users_extended.php b/e107_admin/users_extended.php index 3b6a31657..d9dc03184 100755 --- a/e107_admin/users_extended.php +++ b/e107_admin/users_extended.php @@ -758,7 +758,7 @@ class users_ext get_attributes($options, $name).">"; } + + /** + * @DEPRECATED - use select() instead. + */ + function selectbox($name, $option_array, $selected = false, $options = array(), $defaultBlank= false) + { + return $this->select($name, $option_array, $selected, $options, $defaultBlank); + } + + + /** * * @param string $name @@ -1220,7 +1237,7 @@ class e_form * @param boolean|string $defaultBlank [optional] set to TRUE if the first entry should be blank, or to a string to use it for the blank description. * @return string HTML text for display */ - function selectbox($name, $option_array, $selected = false, $options = array(), $defaultBlank= false) + function select($name, $option_array, $selected = false, $options = array(), $defaultBlank= false) { if(!is_array($options)) parse_str($options, $options); diff --git a/e107_handlers/mailout_admin_class.php b/e107_handlers/mailout_admin_class.php index 51908cf3f..6eb51665f 100644 --- a/e107_handlers/mailout_admin_class.php +++ b/e107_handlers/mailout_admin_class.php @@ -783,7 +783,7 @@ class mailoutAdminClass extends e107MailManager * @param $name name of item * @return text for display */ - //FIXME use $frm->selectbox() instead. + //FIXME use $frm->select() instead. public function sendStyleSelect($curval = '', $name = 'email_send_style', $incTemplates = TRUE) { diff --git a/e107_handlers/mailout_class.php b/e107_handlers/mailout_class.php index 9d27c2f75..6a987e5d6 100644 --- a/e107_handlers/mailout_class.php +++ b/e107_handlers/mailout_class.php @@ -275,7 +275,7 @@ class core_mailout $u_array = array('user_name'=>LAN_MAILOUT_43,'user_login'=>LAN_MAILOUT_44,'user_email'=>LAN_MAILOUT_45); $var[0]['html'] = $admin->userClassesTotals('email_to', varset($selectVals['email_to'], '')); - $var[1]['html'] = $frm->selectbox('user_search_name', $u_array, varset($selectVals['user_search_name'], ''),'',TRUE)." ".LAN_MAILOUT_47." ".$frm->text('user_search_value', varset($selectVals['user_search_value'], '')); + $var[1]['html'] = $frm->select('user_search_name', $u_array, varset($selectVals['user_search_name'], ''),'',TRUE)." ".LAN_MAILOUT_47." ".$frm->text('user_search_value', varset($selectVals['user_search_value'], '')); //$var[2]['html'] = $admin->comparisonSelect('last_visit_match', varset($selectVals['last_visit_match'], ''))." ".$frm->text('last_visit_date', varset($selectVals['last_visit_date'], 0)); $var[2]['html'] = $admin->comparisonSelect('last_visit_match', varset($selectVals['last_visit_match'], ''))." ".$admin->makeCalendar('last_visit_date', varset($selectVals['last_visit_date'], 0)); $var[1]['caption'] = LAN_MAILOUT_46; // User Search Field. diff --git a/e107_plugins/_blank/admin_config.php b/e107_plugins/_blank/admin_config.php index 1270cb355..8a2ce2908 100644 --- a/e107_plugins/_blank/admin_config.php +++ b/e107_plugins/_blank/admin_config.php @@ -331,7 +331,7 @@ class plugin_blank_admin_form_ui extends e_admin_form_ui return $types; } - return $frm->selectbox('blank_type', $types, $curVal); + return $frm->select('blank_type', $types, $curVal); } } diff --git a/e107_plugins/banner/admin_banner.php b/e107_plugins/banner/admin_banner.php index c64a21eb5..4a7e48606 100644 --- a/e107_plugins/banner/admin_banner.php +++ b/e107_plugins/banner/admin_banner.php @@ -352,7 +352,7 @@ if ($action == "create") if (count($campaigns)) { - $text .= $frm->selectbox('banner_campaign_sel',$campaigns,$_POST['banner_campaign'],'',LAN_SELECT); + $text .= $frm->select('banner_campaign_sel',$campaigns,$_POST['banner_campaign'],'',LAN_SELECT); $text .= $frm->text('banner_campaign','','',array('placeholder'=> 'Or enter a new campaign')); } else @@ -370,7 +370,7 @@ if ($action == "create") if (count($clients)) { - $text .= $frm->selectbox('banner_client_sel',$clients, $_POST['client_name'],'', LAN_SELECT); + $text .= $frm->select('banner_client_sel',$clients, $_POST['client_name'],'', LAN_SELECT); $text .= $frm->text('client_name','','',array('placeholder'=> 'Or enter a new client')); diff --git a/e107_plugins/chatbox_menu/admin_chatbox.php b/e107_plugins/chatbox_menu/admin_chatbox.php index 7627e139c..263d7de33 100644 --- a/e107_plugins/chatbox_menu/admin_chatbox.php +++ b/e107_plugins/chatbox_menu/admin_chatbox.php @@ -97,7 +97,7 @@ $text = " ".CHBLAN_11.": - ".$frm->selectbox('chatbox_posts', array(5, 10, 15, 20, 25), $pref['chatbox_posts'])."".CHBLAN_12." + ".$frm->select('chatbox_posts', array(5, 10, 15, 20, 25), $pref['chatbox_posts'])."".CHBLAN_12." ".CHBLAN_32.": @@ -120,7 +120,7 @@ $text = " $text .= " ".LAN_PRUNE.": - ".CHBLAN_23.$frm->selectbox('chatbox_prune', array(86400 => CHBLAN_24, 604800 => CHBLAN_25, 2592000 => CHBLAN_26, 1 => CHBLAN_27), '', '', true).$frm->admin_button('prune', LAN_PRUNE, 'other')."".CHBLAN_22." + ".CHBLAN_23.$frm->select('chatbox_prune', array(86400 => CHBLAN_24, 604800 => CHBLAN_25, 2592000 => CHBLAN_26, 1 => CHBLAN_27), '', '', true).$frm->admin_button('prune', LAN_PRUNE, 'other')."".CHBLAN_22." ".CHBLAN_34.": diff --git a/e107_plugins/download/handlers/adminDownload_class.php b/e107_plugins/download/handlers/adminDownload_class.php index 56f8460d1..24b4a35be 100644 --- a/e107_plugins/download/handlers/adminDownload_class.php +++ b/e107_plugins/download/handlers/adminDownload_class.php @@ -1510,11 +1510,11 @@ class adminDownload extends download ".DOWLAN_56." - ".$frm->selectbox('download_order', $order_options, $pref['download_order'])." + ".$frm->select('download_order', $order_options, $pref['download_order'])." ".LAN_ORDER." - ".$frm->selectbox('download_sort', $sort_options, $pref['download_sort'])." + ".$frm->select('download_sort', $sort_options, $pref['download_sort'])." ".DOWLAN_160." diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index b0d40a077..65b6c1be8 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -1986,11 +1986,11 @@ $columnInfo = array( ".DOWLAN_56." - ".$frm->selectbox('download_order', $order_options, $pref['download_order'])." + ".$frm->select('download_order', $order_options, $pref['download_order'])." ".LAN_ORDER." - ".$frm->selectbox('download_sort', $sort_options, $pref['download_sort'])." + ".$frm->select('download_sort', $sort_options, $pref['download_sort'])." ".DOWLAN_160." diff --git a/e107_plugins/import/providers/html_import_class.php b/e107_plugins/import/providers/html_import_class.php index 2538dd16d..7531084aa 100644 --- a/e107_plugins/import/providers/html_import_class.php +++ b/e107_plugins/import/providers/html_import_class.php @@ -229,7 +229,7 @@ class html_import extends base_import_class $text .= " - ".$frm->selectbox('add__'.$key,array('news'=>'News','page'=>'Page','0'=>'Ignore'))." + ".$frm->select('add__'.$key,array('news'=>'News','page'=>'Page','0'=>'Ignore'))." "; } diff --git a/e107_plugins/newforumposts_main/admin_config.php b/e107_plugins/newforumposts_main/admin_config.php index 94a166c42..3dd2dfcba 100644 --- a/e107_plugins/newforumposts_main/admin_config.php +++ b/e107_plugins/newforumposts_main/admin_config.php @@ -45,7 +45,7 @@ $text = " ".NFPM_L4." - ".$frm->selectbox('nfp_display', array(0 => NFPM_L5, 1 => NFPM_L6, 2 => NFPM_L7), $pref['nfp_display'])." + ".$frm->select('nfp_display', array(0 => NFPM_L5, 1 => NFPM_L6, 2 => NFPM_L7), $pref['nfp_display'])." ".NFPM_L8.": diff --git a/e107_plugins/rss_menu/admin_prefs.php b/e107_plugins/rss_menu/admin_prefs.php index cdabfed0b..4717e0721 100644 --- a/e107_plugins/rss_menu/admin_prefs.php +++ b/e107_plugins/rss_menu/admin_prefs.php @@ -146,7 +146,7 @@ class rss_form_ui extends e_admin_form_ui break; case 'write': // Edit Page - return $frm->selectbox('rss_class',$array, $curVal); + return $frm->select('rss_class',$array, $curVal); break; case 'filter': diff --git a/e107_plugins/tinymce/plugins/e107bbcode/dialog.php b/e107_plugins/tinymce/plugins/e107bbcode/dialog.php index 039b8bb7c..0b951241e 100644 --- a/e107_plugins/tinymce/plugins/e107bbcode/dialog.php +++ b/e107_plugins/tinymce/plugins/e107bbcode/dialog.php @@ -439,7 +439,7 @@ class e_bootstrap $sel = array(''=>'Dark Gray','icon-white'=>'White'); $text .= "
"; - $text .= "
Color: ".$frm->selectbox('glyph-color',$sel)." Custom: ".$frm->text('glyph-custom','').$frm->button('glyph-save','Go')."
"; + $text .= "
Color: ".$frm->select('glyph-color',$sel)." Custom: ".$frm->text('glyph-custom','').$frm->button('glyph-save','Go')."
"; $text .= "
    ";