mirror of
https://github.com/e107inc/e107.git
synced 2025-06-04 01:45:15 +02:00
Issue #6 Language-file optimization.
This commit is contained in:
parent
f490b49c79
commit
ecd6e93a85
@ -1225,7 +1225,7 @@ class lanDeveloper
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td>Search for Deprecated Lans</td>
|
||||
<td><div class='alert-info alert alert-block'>Hold down CTRL key to select multiple.<br />eg. To check <b>lan_signup.php</b> you'll want to also select <b>signup_shortcodes.php</b> and <b>signup_template.php</b>.</div></td>
|
||||
<td class='form-inline'>
|
||||
<select name='deprecatedLans[]' multiple style='height:200px'>
|
||||
<option value=''>Select Script...</option>";
|
||||
@ -1236,9 +1236,11 @@ class lanDeveloper
|
||||
$fl->setFileFilter(array("^e_"));
|
||||
$root = $fl->get_files(e_BASE,'.*?/?.*?\.php',$omit,0);
|
||||
|
||||
$templates = $fl->get_files(e_CORE."templates",'.*?/?.*?\.php',$omit,0);
|
||||
$shortcodes = $fl->get_files(e_CORE."shortcodes",'.*?/?.*?\.php',$omit,1);
|
||||
$exclude = array('lan_admin.php');
|
||||
|
||||
$srch = array(e_ADMIN,e_PLUGIN, e_BASE);
|
||||
$srch = array(e_ADMIN,e_PLUGIN, e_CORE, e_BASE );
|
||||
|
||||
|
||||
$text .= "<optgroup label='Admin Area'>";
|
||||
@ -1268,8 +1270,31 @@ class lanDeveloper
|
||||
$text .= "</optgroup>";
|
||||
|
||||
|
||||
$text .= "<optgroup label='Templates'>";
|
||||
foreach($templates as $script=>$lan)
|
||||
{
|
||||
if(in_array(basename($lan),$exclude))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$selected = (!empty($_POST['deprecatedLans']) && in_array($lan, $_POST['deprecatedLans'])) ? "selected='selected'" : "";
|
||||
$text .= "<option value='".$lan."' {$selected}>".str_replace($srch,"",$lan)."</option>\n";
|
||||
}
|
||||
|
||||
$text .= "</optgroup>";
|
||||
|
||||
$text .= "<optgroup label='Shortcodes'>";
|
||||
foreach($shortcodes as $script=>$lan)
|
||||
{
|
||||
if(in_array(basename($lan),$exclude))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$selected = (!empty($_POST['deprecatedLans']) && in_array($lan, $_POST['deprecatedLans'])) ? "selected='selected'" : "";
|
||||
$text .= "<option value='".$lan."' {$selected}>".str_replace($srch,"",$lan)."</option>\n";
|
||||
}
|
||||
|
||||
$text .= "</optgroup>";
|
||||
|
||||
$depOptions = array(
|
||||
1 => "Script > Lan File",
|
||||
|
@ -16,16 +16,16 @@ define("LAN_07", "Someone with IP address ");
|
||||
define("LAN_08", "attempted to reset the main admin password.");
|
||||
define("LAN_09", "Password reset from ");
|
||||
define("LAN_112", "Email address registered on this site");
|
||||
define("LAN_156", "Submit");
|
||||
// define("LAN_156", "Submit");
|
||||
define("LAN_213", "That username/email address was not found in database.");
|
||||
define("LAN_214", "Unable to reset password");
|
||||
define("LAN_216", "To validate your new password please go to the following URL ...");
|
||||
define("LAN_217", "Your new password is now validated, you may now login using your new password.");
|
||||
// define("LAN_216", "To validate your new password please go to the following URL ...");
|
||||
// define("LAN_217", "Your new password is now validated, you may now login using your new password.");
|
||||
define("LAN_218", "Your username is:");
|
||||
define("LAN_219", "The password associated with that email address has already been reset and cannot be reset again. Please contact the site administrator for more details.");
|
||||
// define("LAN_219", "The password associated with that email address has already been reset and cannot be reset again. Please contact the site administrator for more details.");
|
||||
define("LAN_FPW1", "Username");
|
||||
define("LAN_FPW2", "Enter code");
|
||||
define("LAN_FPW3", "Incorrect code entered");
|
||||
// define("LAN_FPW2", "Enter code");
|
||||
// define("LAN_FPW3", "Incorrect code entered");
|
||||
define("LAN_FPW4", "A request has already been sent to reset this password, if you did not receive the email, please contact the site administrator for help.");
|
||||
define("LAN_FPW5", "A request to reset your password for");
|
||||
define("LAN_FPW6", "An email has been sent to you with a link that will allow you to reset your password.");
|
||||
|
18
fpw.php
18
fpw.php
@ -60,13 +60,13 @@ class fpw_shortcodes extends e_shortcode
|
||||
{
|
||||
// return '<button type="submit" name="pwsubmit" class="button btn btn-primary btn-block reset">'.$label.'</button>';
|
||||
// return "<input class='button btn btn-primary btn-block' type='submit' name='pwsubmit' value='".$label."' />";
|
||||
$label = deftrue('LAN_FPW_102', LAN_156);
|
||||
$label = deftrue('LAN_FPW_102', LAN_SUBMIT);
|
||||
return e107::getForm()->button('pwsubmit', $label);
|
||||
}
|
||||
|
||||
function sc_fpw_captcha_lan($parm='')
|
||||
{
|
||||
return LAN_FPW2;
|
||||
return LAN_ENTER_CODE;
|
||||
}
|
||||
|
||||
function sc_fpw_captcha_hidden($parm='')
|
||||
@ -250,7 +250,7 @@ if (isset($_POST['pwsubmit']))
|
||||
{
|
||||
if (!$sec_img->verify_code($_POST['rand_num'], $_POST['code_verify']))
|
||||
{
|
||||
fpw_error(LAN_FPW3);
|
||||
fpw_error(LAN_INVALID_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,18 +359,6 @@ if (isset($_POST['pwsubmit']))
|
||||
$sc = array(); // needed?
|
||||
|
||||
|
||||
/*
|
||||
if (USE_IMAGECODE)
|
||||
{
|
||||
$sc = array (
|
||||
'FPW_TABLE_SECIMG_LAN' => LAN_FPW2,
|
||||
'FPW_TABLE_SECIMG_HIDDEN' => "<input type='hidden' name='rand_num' value='".$sec_img->random_number."' />",
|
||||
'FPW_TABLE_SECIMG_SECIMG' => $sec_img->r_image(),
|
||||
'FPW_TABLE_SECIMG_TEXTBOC' => "<input class='tbox' type='text' name='code_verify' size='15' maxlength='20' />"
|
||||
);
|
||||
}
|
||||
*/
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
// TODO do we want the <form> element outside the template?
|
||||
|
Loading…
x
Reference in New Issue
Block a user