Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[-] BO : Remove warning at login template

  • Loading branch information...
commit 135bd2cd421bc99fb0f39e329844ab00ce50ad23 1 parent b8ecaa8
Gregory Roussac gRoussac authored
4 admin-dev/themes/default/template/controllers/login/content.tpl
View
@@ -102,9 +102,9 @@
<p>{l s='For security reasons, you cannot connect to the Back Office until after you have:'}</p>
<ul>
<li>{l s='deleted the /install folder'}</li>
- <li>{l s='renamed the /admin folder (e.g. /admin123%d)' sprintf=$randomNb}</li>
+ <li>{l s='renamed the /admin folder (e.g. /admin%d)' sprintf=$randomNb}</li>
</ul>
- <p>{l s='Please then access this page by the new URL (e.g. http://www.yoursite.com/admin123%d)' sprintf=$randomNb}</p>
+ <p>{l s='Please then access this page by the new URL (e.g. http://www.yoursite.com/admin%d)' sprintf=$randomNb}</p>
</div>
{/if}
</div>
6 controllers/admin/AdminLoginController.php
View
@@ -71,16 +71,18 @@ public function initContent()
if (file_exists(_PS_ADMIN_DIR_.'/../install'))
$this->context->smarty->assign('wrong_folder_name', true);
if (file_exists(_PS_ADMIN_DIR_.'/../admin'))
- {
+ {
$rand = sprintf('%04d', rand(0, 9999));
if (@rename(_PS_ADMIN_DIR_.'/../admin', _PS_ADMIN_DIR_.'/../admin'.$rand))
Tools::redirectAdmin('../admin'.$rand);
else
$this->context->smarty->assign(array(
- 'randomNb' => rand(100, 999),
'wrong_folder_name' => true
));
}
+ $this->context->smarty->assign(array(
+ 'randomNb' => rand(0, 9999)
+ ));
// Redirect to admin panel
if (Tools::isSubmit('redirect') && Validate::isControllerName(Tools::getValue('redirect')))
Please sign in to comment.
Something went wrong with that request. Please try again.