1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-29 10:50:25 +02:00

PHP7 Fix.

This commit is contained in:
Cameron
2016-11-28 16:27:17 -08:00
parent 6516f3cff3
commit fd1a026f88
2 changed files with 16 additions and 5 deletions

View File

@@ -235,6 +235,11 @@ if(!empty($_GET['iframe']))
$message = '';
if(!empty($_POST['language']))
{
$_POST['language'] = e107::getParser()->filter($_POST['language']);
}
// ----------------- delete tables ---------------------------------------------
if (isset($_POST['del_existing']) && $_POST['lang_choices'] && getperms('0'))
{
@@ -246,7 +251,7 @@ if(!empty($_GET['iframe']))
{
// echo $del_table." exists<br />";
$qry = "DROP TABLE ".MPREFIX."lan_".$lang."_".$del_table;
if (mysql_query($qry))
if ($sql->gen($qry))
{
$msg = $tp->lanVars(LANG_LAN_100, $_POST['lang_choices'].' '.$del_table);
$message .= $msg.'[!br!]';
@@ -304,7 +309,7 @@ if(!empty($_GET['iframe']))
if ($_POST['remove'])
{
// Remove table.
if (mysql_query("DROP TABLE ".MPREFIX."lan_".$lang."_".$value))
if ($sql->gen("DROP TABLE ".MPREFIX."lan_".$lang."_".$value))
{
$message .= $_POST['language'].' '.$value.' '.LAN_DELETED.'[!br!]'; // can be removed?
$mes->addSuccess($_POST['language'].' '.$value.' '.LAN_DELETED);

View File

@@ -26,6 +26,7 @@ class themeHandler
var $fl;
var $themeConfigObj = null;
var $noLog = FALSE;
private $curTheme = null;
private $approvedAdminThemes = array('bootstrap','bootstrap3');
@@ -79,6 +80,11 @@ class themeHandler
{
$unzippedTheme = $this->themeUpload();
}
if(!empty($_POST['curTheme']))
{
$this->curTheme = e107::getParser()->filter($_POST['curTheme']);
}
if(!empty($_POST['setUploadTheme']) && !empty($unzippedTheme))
{
@@ -139,7 +145,7 @@ class themeHandler
if(isset($_POST['submit_adminstyle']))
{
$this->id = $_POST['curTheme'];
$this->id = $this->curTheme;
if($this->setAdminStyle())
{
eMessage::getInstance()->add(TPVLAN_43, E_MESSAGE_SUCCESS);
@@ -149,7 +155,7 @@ class themeHandler
if(isset($_POST['submit_style']))
{
$this->id = $_POST['curTheme'];
$this->id = $this->curTheme;
$this->setLayouts(); // Update the layouts in case they have been manually changed.
$this->SetCustomPages($_POST['custompages']);
@@ -161,7 +167,7 @@ class themeHandler
if(!empty($_POST['git_pull']))
{
$return = e107::getFile()->gitPull($_POST['curTheme'], 'theme');
$return = e107::getFile()->gitPull($this->curTheme, 'theme');
$mes->addSuccess($return);
}