diff --git a/e107_admin/lancheck.php b/e107_admin/lancheck.php index aa559477a..066ebefa3 100644 --- a/e107_admin/lancheck.php +++ b/e107_admin/lancheck.php @@ -10,21 +10,26 @@ * With code from Izydor and Lolo. * */ -require_once("../class2.php"); +if (!defined('e107_INIT')) +{ + require_once("../class2.php"); +} + + if (!getperms("L")) { header("location:".e_BASE."index.php"); exit; } -include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); +include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_lancheck.php'); $e_sub_cat = 'language'; // require_once("auth.php"); $frm = e107::getForm(); $mes = e107::getMessage(); -$lck = new lancheck; +// $lck = new lancheck; /* @@ -297,14 +302,26 @@ class lancheck var $core_plugins = array(); - var $core_themes = array("bootstrap"); + var $core_themes = array("bootstrap3"); var $errorsOnly = false; var $coreImage = array(); + private $thirdPartyPlugins = true; + + + function __construct() + { + $this->core_plugins = e107::getPlugin()->getCorePlugins(); + } + + public function thirdPartyPlugins($val) + { + $this->thirdPartyPlugins = $val; + } - function init() + public function init() { $ns = e107::getRender(); $tp = e107::getParser(); @@ -314,7 +331,7 @@ class lancheck $this->core_themes[] = $pref['sitetheme']; $this->core_themes = array_unique($this->core_themes); - $this->core_plugins = e107::getPlugin()->getCorePlugins(); + if(E107_DEBUG_LEVEL > 0) { @@ -886,20 +903,43 @@ class lancheck return array(); } - - require_once(e_HANDLER."file_class.php"); - $fl = new e_file; + + $fl = e107::getFile(); + $ret = array(); if($lang_array = $fl->get_files($comp_dir, ".php$","standard",$depth)){ sort($lang_array); } + if(strpos($comp_dir,e_LANGUAGEDIR) !== false) + { + $regexp = "#.php#"; + $mode = 'core'; + } + else + { + $regexp = "#".$lang."#"; + $mode = 'plugins'; + } - $regexp = (strpos($comp_dir,e_LANGUAGEDIR) !== FALSE) ? "#.php#" : "#".$lang."#"; + // $regexp = (strpos($comp_dir,e_LANGUAGEDIR) !== FALSE) ? "#.php#" : "#".$lang."#"; foreach($lang_array as $f) { + if($mode == 'plugins') + { + $tmpDir = str_replace($comp_dir,'',$f['path']); + // echo "
".$tmpDir; + list($pluginDirectory, $other) = explode("/",$tmpDir, 2); + + + if($mode == 'plugins' && ($this->thirdPartyPlugins !== true) && !in_array($pluginDirectory, $this->core_plugins)) + { + continue; + } + } + if(preg_match($regexp,$f['path'].$f['fname']) && is_file($f['path'].$f['fname'])) { $allData = file_get_contents($f['path'].$f['fname']); diff --git a/e107_admin/mailout.php b/e107_admin/mailout.php index 648c52327..16c44d1fd 100644 --- a/e107_admin/mailout.php +++ b/e107_admin/mailout.php @@ -1258,7 +1258,7 @@ class mailout_main_ui extends e_admin_ui - ".LAN_MAILOUT_32." + ".LAN_EMAIL."
".$frm->text('mail_bounce_email2', $pref['mail_bounce_email'], 40, 'size=xlarge'); if(!empty($pref['mail_bounce_email'])) @@ -1316,7 +1316,7 @@ class mailout_main_ui extends e_admin_ui "; - $bouncePrefs = array('mail_bounce_email'=>LAN_MAILOUT_32, 'mail_bounce_pop3'=>LAN_MAILOUT_33, 'mail_bounce_user'=>LAN_MAILOUT_34, 'mail_bounce_pass'=>LAN_PASSWORD); + $bouncePrefs = array('mail_bounce_email'=>LAN_EMAIL, 'mail_bounce_pop3'=>LAN_MAILOUT_33, 'mail_bounce_user'=>LAN_MAILOUT_34, 'mail_bounce_pass'=>LAN_PASSWORD); foreach($bouncePrefs as $key =>$label) { diff --git a/e107_admin/users.php b/e107_admin/users.php index fb01c5754..766d74524 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -241,7 +241,7 @@ class users_admin_ui extends e_admin_ui 'user_loginname' => array('title' => LAN_USER_02, 'tab'=>0, 'type' => 'text', 'data'=>'str', 'width' => 'auto'), // User name 'user_login' => array('title' => LAN_USER_03, 'tab'=>0, 'type' => 'text', 'data'=>'str', 'width' => 'auto'), // Real name (no real vetting) 'user_customtitle' => array('title' => LAN_USER_04, 'tab'=>0, 'type' => 'text', 'data'=>'str', 'width' => 'auto'), // No real vetting - 'user_password' => array('title' => LAN_USER_05, 'tab'=>0, 'type' => 'method', 'data'=>'str', 'width' => 'auto'), //TODO add md5 option to form handler? + 'user_password' => array('title' => LAN_PASSWORD, 'tab'=>0, 'type' => 'method', 'data'=>'str', 'width' => 'auto'), //TODO add md5 option to form handler? 'user_sess' => array('title' => 'Session', 'tab'=>0, 'noedit'=>true, 'type' => 'text', 'width' => 'auto'), // Photo 'user_image' => array('title' => LAN_USER_07, 'tab'=>0, 'type' => 'dropdown', 'data'=>'str', 'width' => 'auto'), // Avatar 'user_email' => array('title' => LAN_EMAIL, 'tab'=>0, 'type' => 'text', 'inline'=>true, 'data'=>'str', 'width' => 'auto'), diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 8fadccd96..9db44b26f 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -4392,7 +4392,7 @@ class e_form "; - $text .= "
".LAN_NO_RECORDS."
"; // not prone to column-count issues. + $text .= "
".LAN_NO_RECORDS_FOUND."
"; // not prone to column-count issues. } else { diff --git a/e107_handlers/language_class.php b/e107_handlers/language_class.php index 394f24890..0d06ed471 100644 --- a/e107_handlers/language_class.php +++ b/e107_handlers/language_class.php @@ -50,19 +50,23 @@ class language{ "bs" => "Bosnian", "br" => "Breton", "bg" => "Bulgarian", + "my" => "Burmese", "ca" => "Catalan", "cs" => "Czech", "ch" => "Chamorro", "ce" => "Chechen", "cn" => "ChineseSimp", + "tw" => "ChineseTrad", "cv" => "Chuvash", "kw" => "Cornish", "co" => "Corsican", - "cy" => "Welsh", + "da" => "Danish", - "de" => "German", + "nl" => "Dutch", "dz" => "Dzongkha", - "el" => "Greek", + "de" => "German", + + "en" => "English", "eo" => "Esperanto", "et" => "Estonian", @@ -74,9 +78,10 @@ class language{ "fr" => "French", "fy" => "Frisian", "gd" => "Gaelic", + "el" => "Greek", "ga" => "Irish", "gl" => "Gallegan", - "gv" => "Manx", + "gn" => "Guarani", "gu" => "Gujarati", "ha" => "Hausa", @@ -123,13 +128,14 @@ class language{ "mn" => "Mongolian", "mi" => "Maori", "ms" => "Malay", - "my" => "Burmese", + "gv" => "Manx", + "na" => "Nauru", "nv" => "Navajo", "ng" => "Ndonga", "ne" => "Nepali", - "nl" => "Dutch", + "no" => "Norwegian", "ny" => "Chichewa", @@ -176,13 +182,14 @@ class language{ "ts" => "Tsonga", "tk" => "Turkmen", "tr" => "Turkish", - "tw" => "ChineseTrad", + "ug" => "Uighur", "uk" => "Ukrainian", "ur" => "Urdu", "uz" => "Uzbek", "vi" => "Vietnamese", + "cy" => "Welsh", "wo" => "Wolof", "xh" => "Xhosa", "yi" => "Yiddish", @@ -407,7 +414,7 @@ class language{ */ function toNative($lang) { - return ($this->names[$lang]) ? $this->names[$lang] : $lang; + return (!empty($this->names[$lang])) ? $this->names[$lang] : $lang; } /** @@ -655,7 +662,7 @@ class language{ */ public function getList() { - return $this->list; + return $this->list; } } diff --git a/e107_handlers/message_handler.php b/e107_handlers/message_handler.php index a3807d434..0d2730066 100644 --- a/e107_handlers/message_handler.php +++ b/e107_handlers/message_handler.php @@ -1022,6 +1022,7 @@ function show_emessage($mode, $message, $line = 0, $file = "") { } // include_lan(e_LANGUAGEDIR.e_LANGUAGE."/lan_error.php"); + global $mySQLdefaultdb; $emessage[1] = "".LAN_ERROR_25.""; $emessage[2] = "".LAN_ERROR_26.""; @@ -1029,7 +1030,7 @@ function show_emessage($mode, $message, $line = 0, $file = "") { $emessage[4] = "".LAN_ERROR_28.""; $emessage[5] = LAN_ERROR_29; $emessage[6] = "".LAN_ERROR_30.""; - $emessage[7] = "".LAN_ERROR_31.""; + $emessage[7] = "".$tp->lanVars(LAN_ERROR_31, $mySQLdefaultdb).""; /*$emessage[8] = "
".LAN_ERROR_32."

".chr(36)."ADMIN_DIRECTORY = \"e107_admin/\";
diff --git a/e107_languages/English/English.php b/e107_languages/English/English.php index 2720e24e5..3630ec60f 100644 --- a/e107_languages/English/English.php +++ b/e107_languages/English/English.php @@ -109,6 +109,9 @@ define("LAN_RATING", "Rating"); define("LAN_IMAGE","Image"); define("LAN_ABOUT", "About"); define("LAN_TITLE", "Title"); +define("LAN_USER", "User"); +define("LAN_EMAIL","Email address"); + define("LAN_ENTER_USRNAME_EMAIL", "Please enter your username or email"); // admin php hover field admin name define("LAN_PWD_REQUIRED", "Password is required"); // admin php hover field admin password diff --git a/e107_languages/English/admin/lan_admin.php b/e107_languages/English/admin/lan_admin.php index 410642c23..72cbdc26c 100644 --- a/e107_languages/English/admin/lan_admin.php +++ b/e107_languages/English/admin/lan_admin.php @@ -326,13 +326,13 @@ define("LAN_COMMENTMAN", "Comments Manager"); define("LAN_LIST", "List"); define("LAN_FILTER", "Filter"); -define("LAN_NO_RECORDS", "No Records Found"); +// define("LAN_NO_RECORDS", "No Records Found"); define("LAN_STATUS", "Status"); define("LAN_URL", "URL"); -define("LAN_USER", "User"); + define("LAN_OWNER", "Owner"); -define("LAN_EMAIL","Email address"); + define("LAN_ID", "ID"); diff --git a/e107_languages/English/admin/lan_mailout.php b/e107_languages/English/admin/lan_mailout.php index 3ea915716..023853f1b 100644 --- a/e107_languages/English/admin/lan_mailout.php +++ b/e107_languages/English/admin/lan_mailout.php @@ -42,7 +42,7 @@ define("LAN_MAILOUT_28", "Save Changes"); define("LAN_MAILOUT_29", "seconds"); define("LAN_MAILOUT_30", "Used mostly with SMTP keepalive. A pause of more than 30 seconds may cause the browser to time-out"); define("LAN_MAILOUT_31", "Bounced Email Processing"); -define("LAN_MAILOUT_32", "Email address"); +// define("LAN_MAILOUT_32", "Email address"); define("LAN_MAILOUT_33", "Incoming Mail server"); define("LAN_MAILOUT_34", "Account (user) Name"); // define("LAN_MAILOUT_35", "Password"); diff --git a/e107_languages/English/lan_error.php b/e107_languages/English/lan_error.php index 9702d8cae..ccf454558 100644 --- a/e107_languages/English/lan_error.php +++ b/e107_languages/English/lan_error.php @@ -44,7 +44,7 @@ define("LAN_ERROR_27", "[3]: Core settings saved - backup made active."); define("LAN_ERROR_28", "[4]: No core backup found. Check that your database has valid content. If not, please run the Reset_Core utility to rebuild your core settings.
After rebuilding your core please save a backup from the admin/sql screen."); define("LAN_ERROR_29", "[5]: Field(s) have been left blank. Please resubmit the form and fill in the required fields."); define("LAN_ERROR_30", "[6]: Unable to form a valid connection to mySQL. Please check that your e107_config.php contains the correct information."); -define("LAN_ERROR_31", "[7]: mySQL is running but database ({$mySQLdefaultdb}) couldn't be connected to.
Please check it exists and that your configuration file contains the correct information."); +define("LAN_ERROR_31", "[7]: mySQL is running but database [x] couldn't be connected to.
Please check it exists and that your configuration file contains the correct information."); define("LAN_ERROR_32", "To complete the upgrade, copy the following text into your e107_config.php file:"); define("LAN_ERROR_33", "Processing error! Normally, I would redirect to the home page."); diff --git a/e107_languages/English/lan_user.php b/e107_languages/English/lan_user.php index 54c0df264..d82f06e9c 100644 --- a/e107_languages/English/lan_user.php +++ b/e107_languages/English/lan_user.php @@ -35,10 +35,10 @@ define("LAN_USER_01","Display name"); define("LAN_USER_02","Login Name"); define("LAN_USER_03","Real Name"); define("LAN_USER_04","Custom title"); -define("LAN_USER_05","Password"); +// define("LAN_USER_05","Password"); //LAN_PASSWORD define("LAN_USER_06","Photograph"); define("LAN_USER_07","Avatar"); -define("LAN_USER_08","Email address"); +// define("LAN_USER_08","Email address"); define("LAN_USER_09","Signature"); define("LAN_USER_10","Hide email"); //define("LAN_USER_11","XUP file"); diff --git a/e107_plugins/alt_auth/languages/English/English_log.php b/e107_plugins/alt_auth/languages/English/English_log.php index 7296480b5..905cbeeb9 100644 --- a/e107_plugins/alt_auth/languages/English/English_log.php +++ b/e107_plugins/alt_auth/languages/English/English_log.php @@ -1,17 +1,12 @@