From d9608295328836cc7294462c4fe8270599920893 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sat, 10 Dec 2022 07:06:47 -0800 Subject: [PATCH] Issue #4918 - Undefined constants cleanup. --- e107_admin/admin.php | 2 +- e107_admin/cpage.php | 4 +- e107_admin/cron.php | 2 +- e107_admin/db.php | 4 +- e107_admin/image.php | 2 +- e107_admin/includes/categories.php | 2 +- e107_admin/includes/classis.php | 2 +- e107_admin/includes/combo.php | 2 +- e107_admin/includes/compact.php | 2 +- e107_admin/includes/tabbed.php | 2 +- e107_admin/lancheck.php | 4 +- e107_admin/mailout.php | 10 ++--- e107_admin/newspost.php | 4 +- e107_admin/users.php | 2 +- e107_core/bbcodes/bb_code.php | 4 +- .../shortcodes/batch/admin_shortcodes.php | 30 ++++++------- e107_handlers/menumanager_class.php | 2 +- e107_handlers/news_class.php | 8 ++-- e107_handlers/plugin_class.php | 2 +- e107_handlers/search/search_event.php | 1 - e107_handlers/sitelinks_class.php | 2 +- e107_handlers/upload_handler.php | 2 +- e107_plugins/download/includes/admin.php | 2 +- .../languages/English/English_admin.php | 14 +++--- e107_plugins/forum/forum_admin.php | 6 +-- .../shortcodes/batch/forum_shortcodes.php | 2 +- e107_plugins/gsitemap/admin_config.php | 45 ++----------------- e107_plugins/import/admin_import.php | 2 +- e107_plugins/newsletter/admin_config.php | 2 +- e107_plugins/newsletter/nl_archive.php | 2 +- 30 files changed, 66 insertions(+), 104 deletions(-) diff --git a/e107_admin/admin.php b/e107_admin/admin.php index 63366e2783..fe7075c83a 100644 --- a/e107_admin/admin.php +++ b/e107_admin/admin.php @@ -516,7 +516,7 @@ private function checkHtmlarea() $mes = e107::getMessage(); if (is_dir(e_ADMIN.'htmlarea') || is_dir(e_HANDLER.'htmlarea')) { - $mes->addWarning(e_HANDLER_ABS."htmlarea/
".e_ADMIN_ABS."htmlarea/"); + $mes->addWarning(e_HANDLER."htmlarea/
".e_ADMIN_ABS."htmlarea/"); } } diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 92e89b08b5..b64f7f7499 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -144,7 +144,7 @@ function options($parms, $value, $id, $attributes) $query = http_build_query($query, '', '&'); $text = " - ".ADMIN_EDIT_ICON.""; + ".defset('ADMIN_EDIT_ICON').""; if($this->getController()->getMode() === 'overview' && getperms('J1')) // Page/Menu Delete Perms. { @@ -412,7 +412,7 @@ function options($parms, $value, $id, $attributes) if($parent != 0) { $link = e_SELF."?searchquery=&filter_options=page_chapter__".$id."&mode=page&action=list"; - $text .= "".ADMIN_PAGES_ICON.""; // + $text .= "".defset('ADMIN_PAGES_ICON').""; // } $text .= ""; diff --git a/e107_admin/cron.php b/e107_admin/cron.php index e39dfa9dfb..969aea3764 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -547,7 +547,7 @@ function cron_tab($curVal,$mode) $text .= ($weekday != '*') ? LAN_CRON_54 ." ". eShims::strftime("%A", mktime(00, 00, 00, 5, (int) $weekday, 2000)) : LAN_CRON_42; // Weekday(s) - return "".ADMIN_INFO_ICON." + return "".defset('ADMIN_INFO_ICON')."
".$text."
"; } diff --git a/e107_admin/db.php b/e107_admin/db.php index a6428e026a..1b6781479c 100644 --- a/e107_admin/db.php +++ b/e107_admin/db.php @@ -769,7 +769,7 @@ private function convertUTF8Form() ".$row['Name']." ".$row['Engine']." ".$row['Collation']." - ".(($row['Collation'] == 'utf8_general_ci') ? ADMIN_TRUE_ICON : ADMIN_FALSE_ICON)." + ".(($row['Collation'] == 'utf8_general_ci') ? defset('ADMIN_TRUE_ICON') : defset('ADMIN_FALSE_ICON'))." "; // print_a($row); @@ -1612,7 +1612,7 @@ private function plugin_viewscan($mode = 'update') { $error_messages = array(0 => DBLAN_31, 1 => LAN_ERROR, 2 => DBLAN_33, 3 => DBLAN_34); // $error_image = array("integrity_pass.png", "integrity_fail.png", "warning.png", "blank.png"); - $error_glyph = array(ADMIN_TRUE_ICON,ADMIN_FALSE_ICON,ADMIN_WARNING_ICON," "); + $error_glyph = array(ADMIN_TRUE_ICON, ADMIN_FALSE_ICON, ADMIN_WARNING_ICON," "); $error_type = array('warning'=>2, 'error'=>1); diff --git a/e107_admin/image.php b/e107_admin/image.php index b138a9eaa1..4424088a58 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -602,7 +602,7 @@ public function resize_dimensions($curval) // ie. never manually resize another { foreach($pref['e_imageresize'] as $k=>$val) { - $options[$k] = ucfirst($k). ' ' .LAN_IMA_O_006; + $options[$k] = ucfirst($k). ' ' .defset('LAN_IMA_O_006'); } } diff --git a/e107_admin/includes/categories.php b/e107_admin/includes/categories.php index 1152f4947c..0ae7ea1457 100644 --- a/e107_admin/includes/categories.php +++ b/e107_admin/includes/categories.php @@ -45,7 +45,7 @@ } else { - $text_rend = e107::getNav()->renderAdminButton(e_ADMIN."plugin.php", ADLAN_98, ADLAN_99, "Z", E_16_PLUGMANAGER, 'default'); + $text_rend = e107::getNav()->renderAdminButton(e_ADMIN."plugin.php", ADLAN_98, ADLAN_99, "Z", defset('E_16_PLUGMANAGER'), 'default'); if ($text_rend) { diff --git a/e107_admin/includes/classis.php b/e107_admin/includes/classis.php index adc3d11566..5c042aa389 100644 --- a/e107_admin/includes/classis.php +++ b/e107_admin/includes/classis.php @@ -34,7 +34,7 @@ $text = "
"; -$text .= e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "classis"); +$text .= e107::getNav()->pluginLinks(defset('E_32_PLUGMANAGER'), "classis"); $text .= render_clean(); diff --git a/e107_admin/includes/combo.php b/e107_admin/includes/combo.php index bd80419a25..0ddc2a4fb8 100644 --- a/e107_admin/includes/combo.php +++ b/e107_admin/includes/combo.php @@ -40,7 +40,7 @@
"; -$text .= e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "classis"); +$text .= e107::getNav()->pluginLinks(defset('E_32_PLUGMANAGER'), "classis"); $text .= render_clean(); diff --git a/e107_admin/includes/compact.php b/e107_admin/includes/compact.php index 7b193e46ea..56a1199f49 100644 --- a/e107_admin/includes/compact.php +++ b/e107_admin/includes/compact.php @@ -49,7 +49,7 @@
"; -$text .= e107::getNav()->pluginLinks( E_16_PLUGMANAGER, 'default'); +$text .= e107::getNav()->pluginLinks( defset('E_16_PLUGMANAGER'), 'default'); $text .= " diff --git a/e107_admin/includes/tabbed.php b/e107_admin/includes/tabbed.php index 041ec4d62b..23622b797e 100644 --- a/e107_admin/includes/tabbed.php +++ b/e107_admin/includes/tabbed.php @@ -141,7 +141,7 @@ function render2() } else // Plugin category. { - $text_rend = e107::getNav()->pluginLinks(E_32_PLUGMANAGER, "div"); + $text_rend = e107::getNav()->pluginLinks(defset('E_32_PLUGMANAGER'), "div"); if ($text_rend) { diff --git a/e107_admin/lancheck.php b/e107_admin/lancheck.php index 4c15bae784..302ec1d90d 100644 --- a/e107_admin/lancheck.php +++ b/e107_admin/lancheck.php @@ -1303,7 +1303,7 @@ function check_core_lanfiles($checklan,$subdir='') $style = ($er) ? "forumheader2" : "forumheader3"; $text .= ""; } else @@ -1685,7 +1685,7 @@ function check_lanfiles($mode,$comp_name,$base_lan="English",$target_lan=null) $style = ($er) ? "forumheader2" : "forumheader3"; $text .= ""; } else diff --git a/e107_admin/mailout.php b/e107_admin/mailout.php index 9ae585196e..0aea0505c7 100644 --- a/e107_admin/mailout.php +++ b/e107_admin/mailout.php @@ -1713,8 +1713,8 @@ function options($parms, $value, $id, $attributes) $link = e_SELF."?mode=main&action=send&id=".$id; $preview = e_SELF."?mode=main&action=preview&id=".$id; $text .= ""; - $text .= "".E_32_MAIL.""; - $text .= "".E_32_SEARCH.""; + $text .= "".defset('E_32_MAIL').""; + $text .= "".defset('E_32_SEARCH').""; $text .= $this->renderValue('options',$value,$attributes,$id); @@ -1728,8 +1728,8 @@ function options($parms, $value, $id, $attributes) $preview = e_SELF."?mode=main&action=preview&id=".$id.'&user='.$user; $text = ""; - $text .= "".E_32_USER.""; - $text .= "".E_32_SEARCH.""; + $text .= "".defset('E_32_USER').""; + $text .= "".defset('E_32_SEARCH').""; $attributes['readParms']['editClass'] = e_UC_NOBODY; $text .= $this->renderValue('options',$value,$attributes,$id); @@ -1900,7 +1900,7 @@ function options($parms, $value, $id, $attributes) $preview = e_SELF."?mode=main&action=preview&id=".$eid.'&user='.$user; $text = ""; - $text .= "".E_32_SEARCH.""; + $text .= "".defset('E_32_SEARCH').""; diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 91e7b9fdbd..872cbfe5c4 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -390,7 +390,7 @@ function options($parms, $value, $id, $attributes) // $text .= ""; - $text = "".ADMIN_VIEW_ICON.""; + $text = "".defset('ADMIN_VIEW_ICON').""; @@ -398,7 +398,7 @@ function options($parms, $value, $id, $attributes) if($approved == 0) { //$text = $this->submit_image('submitnews['.$id.']', 1, 'execute', NWSLAN_58); - $text .= "".ADMIN_EXECUTE_ICON.""; + $text .= "".defset('ADMIN_EXECUTE_ICON').""; // NWSLAN_103; } diff --git a/e107_admin/users.php b/e107_admin/users.php index ac250740c1..a089f6d682 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -1248,7 +1248,7 @@ protected function resendActivation($id, $lfile = '') $vars = array('x'=> $sysuser->getId(), 'y'=>$sysuser->getName(), 'z'=> $sysuser->getValue('email')); $message = e107::getParser()->lanVars(USRLAN_167,$vars); e107::getLog()->add('USET_11', $message, E_LOG_INFORMATIVE); - $mes->addSuccess(USRLAN_140.": ".$sysuser->getName()." (".$sysuser->getValue('email').") ({$lan}) "); + $mes->addSuccess(USRLAN_140.": ".$sysuser->getName()." (".$sysuser->getValue('email').") ({$lan}) "); } else { diff --git a/e107_core/bbcodes/bb_code.php b/e107_core/bbcodes/bb_code.php index 2840263589..663bd267a8 100644 --- a/e107_core/bbcodes/bb_code.php +++ b/e107_core/bbcodes/bb_code.php @@ -70,8 +70,8 @@ function toHTML($code_text, $parm) $geshi->line_style1 = "font-family: 'Courier New', Courier, monospace; font-weight: normal; font-style: normal;"; $geshi->set_encoding('utf-8'); - $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); - $geshi->set_header_type(GESHI_HEADER_DIV); + $geshi->enable_line_numbers(defset('GESHI_NORMAL_LINE_NUMBERS')); + $geshi->set_header_type(defset('GESHI_HEADER_DIV')); $CodeCache = $geshi->parse_code(); $e107cache->set('GeshiParsed_'.$code_md5, $CodeCache); } diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 149fda2c31..1856907d27 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -47,7 +47,7 @@ function cronUpdateRender($parm,$cacheData) return ' @@ -1026,39 +1022,6 @@ function deleteSme() } - function instructions() - { - $mes = e107::getMessage(); - $ns = e107::getRender(); - - - $LINK_1 = "https://search.google.com/search-console/"; - $LINK_2 = "http://www.google.com/support/webmasters/?hl=en"; - - $srch[0] = "[URL]"; - $repl[0] = "".$LINK_1.""; - - $srch[1] = "[URL2]"; - $repl[1] = "
".SITEURL."sitemap.xml
"; - - $srch[2] = "["; - $repl[2] = ""; - - $srch[3] = "]"; - $repl[3] = ""; - - $text = "".GSLAN_33."

- \n"; + $text .= "\n"; } $text .= " diff --git a/e107_plugins/newsletter/admin_config.php b/e107_plugins/newsletter/admin_config.php index 427490e5d2..4ccb703060 100644 --- a/e107_plugins/newsletter/admin_config.php +++ b/e107_plugins/newsletter/admin_config.php @@ -450,7 +450,7 @@ function releaseIssue($issue) $mailData = array( 'mail_content_status' => MAIL_STATUS_TEMP, 'mail_create_app' => 'newsletter', - 'mail_title' => NLLAN_01.' '.$issue, + 'mail_title' => LAN_PLUGIN_NEWSLETTER_NAME.' '.$issue, 'mail_subject' => $newsletterParentInfo['newsletter_title'] .': '.$newsletterInfo['newsletter_title'], 'mail_sender_email' => $pref['siteadminemail'], 'mail_sender_name' => $pref['siteadmin'], diff --git a/e107_plugins/newsletter/nl_archive.php b/e107_plugins/newsletter/nl_archive.php index 410110b206..4e7465f33f 100644 --- a/e107_plugins/newsletter/nl_archive.php +++ b/e107_plugins/newsletter/nl_archive.php @@ -119,7 +119,7 @@ // Display parent footer $text .= "$parent_newsletter_footer
"; // Display back to newsletter overview button - $text .= "
"; + $text .= "
"; } else {
"; $text .= $bom_error . $utf_error; - $text .= (!$er && !$bom_error && !$utf_error) ? ADMIN_TRUE_ICON : $er."
"; + $text .= (!$er && !$bom_error && !$utf_error) ? defset('ADMIN_TRUE_ICON') : $er."
"; $text .= "
"; $text .= $bom_error . $utf_error; - $text .= (!$er && !$bom_error && !$utf_error) ? ADMIN_TRUE_ICON : $er."
"; + $text .= (!$er && !$bom_error && !$utf_error) ? defset('ADMIN_TRUE_ICON') : $er."
"; $text .= "
- - + +
".(in_array($key,$info['supported']) ? ADMIN_TRUE_ICON : " ")."".(in_array($key,$info['supported']) ? defset('ADMIN_TRUE_ICON') : " ")."