New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stability improvements, added silent install #185

Merged
merged 16 commits into from Jun 3, 2016

misc admin updates

  • Loading branch information...
timw255 committed Jun 2, 2016
commit bc384c2232922cc51102c1cc457d0465680e4157
Copy path View file
@@ -25,7 +25,7 @@
if (isset($_POST['action']) && $_POST['action'] == 'update')
{
// Update database
$system->writesetting("aboutus", ynbool($_POST['aboutus']), "bool");
$system->writesetting("aboutus", ynbool($_POST['aboutus']), "str");
$system->writesetting("aboutustext", $system->cleanvars($_POST['aboutustext'], true), "str");
$INFO = $MSG['5079'];
Copy path View file
@@ -30,18 +30,16 @@
else
{
// clean up everything
$conf = array();
$conf['safe'] = 1;
foreach ($_POST['title'] as $k => $v)
{
$_POST['title'][$k] = htmLawed($v, $conf);
$_POST['content'][$k] = htmLawed($_POST['content'][$k], $conf);
$_POST['title'][$k] = $system->cleanvars($v);
$_POST['content'][$k] = $system->cleanvars($_POST['content'][$k], true);
}
$query = "INSERT INTO " . $DBPrefix . "news VALUES (NULL, :title, :content, :time, :suspended)";
$params = array();
$params[] = array(':title', $system->cleanvars($_POST['title'][$system->SETTINGS['defaultlanguage']]), 'str');
$params[] = array(':content', $system->cleanvars($_POST['content'][$system->SETTINGS['defaultlanguage']]), 'str');
$params[] = array(':content', $system->cleanvars($_POST['content'][$system->SETTINGS['defaultlanguage']], true), 'str');
$params[] = array(':time', time(), 'int');
$params[] = array(':suspended', $_POST['suspended'], 'int');
$db->query($query, $params);
@@ -53,7 +51,7 @@
$query = "INSERT INTO " . $DBPrefix . "news_translated VALUES (:news_id, :lang, :title, :content)";
$params = array();
$params[] = array(':title', $system->cleanvars($_POST['title'][$k]), 'str');
$params[] = array(':content', $system->cleanvars($_POST['content'][$k]), 'str');
$params[] = array(':content', $system->cleanvars($_POST['content'][$k], true), 'str');
$params[] = array(':lang', $k, 'str');
$params[] = array(':news_id', $news_id, 'int');
$db->query($query, $params);
Copy path View file
@@ -37,7 +37,7 @@
foreach ($_POST['title'] as $k => $v)
{
$_POST['title'][$k] = $system->cleanvars($v);
$_POST['content'][$k] = $system->cleanvars($_POST['content'][$k]);
$_POST['content'][$k] = $system->cleanvars($_POST['content'][$k], true);
}
$news_id = intval($_POST['id']);
Copy path View file
@@ -30,7 +30,8 @@
$PAGE = intval($_GET['PAGE']);
$OFFSET = ($PAGE - 1) * $system->SETTINGS['perpage'];
}
elseif (isset($_SESSION['RETURN_LIST_OFFSET']) && $_SESSION['RETURN_LIST'] == 'listauctions.php')
elseif (isset($_SESSION['RETURN_LIST_OFFSET']) &&
(isset($_SESSION['RETURN_LIST']) && $_SESSION['RETURN_LIST'] == 'listauctions.php'))
{
$PAGE = intval($_SESSION['RETURN_LIST_OFFSET']);
$OFFSET = ($PAGE - 1) * $system->SETTINGS['perpage'];
Copy path View file
@@ -47,7 +47,7 @@
{
$query = "UPDATE " . $DBPrefix . "adminusers SET notes = :admin_note WHERE id = :admin_id";
$params = array();
$params[] = array(':admin_note', $system->cleanvars($_POST['anotes']), 'str');
$params[] = array(':admin_note', $_POST['anotes'], 'str');
$params[] = array(':admin_id', $_SESSION['WEBID_ADMIN_IN'], 'int');
$db->query($query, $params);
}
ProTip! Use n and p to navigate between commits in a pull request.