mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Update BasePage and login, fix reference to non-existent folder in rss.tpl.
This commit is contained in:
@@ -281,9 +281,12 @@ class BasePage
|
||||
$this->body = $this->body." ".$attr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPostBack()
|
||||
{
|
||||
return (strtoupper($_SERVER["REQUEST_METHOD"]) === "POST");
|
||||
return (strtoupper($_SERVER['REQUEST_METHOD']) === 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-6
@@ -9,12 +9,11 @@ if ($page->isPostBack())
|
||||
} elseif ($page->captcha->getError() === false) {
|
||||
$username = htmlspecialchars($_POST["username"]);
|
||||
$page->smarty->assign('username', $username);
|
||||
$users = new Users();
|
||||
$res = $users->getByUsername($username);
|
||||
$dis = $users->isDisabled($username);
|
||||
$res = $page->users->getByUsername($username);
|
||||
$dis = $page->users->isDisabled($username);
|
||||
|
||||
if (!$res)
|
||||
$res = $users->getByEmail($username);
|
||||
$res = $page->users->getByEmail($username);
|
||||
|
||||
if ($res)
|
||||
{
|
||||
@@ -22,10 +21,10 @@ if ($page->isPostBack())
|
||||
{
|
||||
$page->smarty->assign('error', "Your account has been disabled.");
|
||||
}
|
||||
else if ($users->checkPassword($_POST["password"], $res["password"]))
|
||||
else if ($page->users->checkPassword($_POST["password"], $res["password"]))
|
||||
{
|
||||
$rememberMe = (isset($_POST['rememberme']) && $_POST['rememberme'] == 'on') ? 1 : 0;
|
||||
$users->login($res["id"], $_SERVER['REMOTE_ADDR'], $rememberMe);
|
||||
$page->users->login($res["id"], $_SERVER['REMOTE_ADDR'], $rememberMe);
|
||||
|
||||
if (isset($_POST["redirect"]) && $_POST["redirect"] != "")
|
||||
header("Location: ".$_POST["redirect"]);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<webMaster>{$site->email} ({$site->title|escape})</webMaster>
|
||||
<category>{$site->meta_keywords}</category>
|
||||
<image>
|
||||
<url>{$serverroot}themes_shared/images/logo.png</url>
|
||||
<url>{$serverroot}templates/nntmux/images/logo.png</url>
|
||||
<title>{$site->title|escape}</title>
|
||||
<link>{$serverroot}</link>
|
||||
<description>Visit {$site->title|escape} - {$site->strapline|escape}</description>
|
||||
|
||||
Reference in New Issue
Block a user