mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 10:20:45 +02:00
Forum Issue #260: Hide poll tab if it is not installed. Also fix for menu_manager item insert with PDO.
This commit is contained in:
@@ -337,14 +337,14 @@ class e_menuManager {
|
||||
'menu_name' => $val['menu_name'],
|
||||
'menu_location' => $val['menu_location'],
|
||||
'menu_order' => $val['menu_order'],
|
||||
'menu_class' => $val['menu_class'],
|
||||
'menu_class' => intval($val['menu_class']),
|
||||
'menu_pages' => '',
|
||||
'menu_path' => $row['menu_path'],
|
||||
'menu_layout' => $this->dbLayout,
|
||||
'menu_parms' => ''
|
||||
);
|
||||
|
||||
$sql->db_Insert("menus",$insert);
|
||||
$sql->insert("menus",$insert);
|
||||
e107::getLog()->add('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
|
||||
|
||||
}
|
||||
@@ -756,14 +756,14 @@ class e_menuManager {
|
||||
'menu_name' => $row['menu_name'],
|
||||
'menu_location' => $location,
|
||||
'menu_order' => $menu_count,
|
||||
'menu_class' => $row['menu_class'],
|
||||
'menu_class' => intval($row['menu_class']),
|
||||
'menu_pages' => '',
|
||||
'menu_path' => $row['menu_path'],
|
||||
'menu_layout' => $this->dbLayout,
|
||||
'menu_parms' => ''
|
||||
);
|
||||
|
||||
$sql->db_Insert("menus",$insert, $this->debug);
|
||||
$sql->insert("menus",$insert, $this->debug);
|
||||
|
||||
e107::getLog()->add('MENU_01',$row['menu_name'].'[!br!]'.$location.'[!br!]'.$menu_count.'[!br!]'.$row['menu_path'],E_LOG_INFORMATIVE,'');
|
||||
$menu_count++;
|
||||
@@ -1697,7 +1697,7 @@ class e_menuManager {
|
||||
}
|
||||
elseif($_POST['mode'] == 'update')
|
||||
{
|
||||
$sql->db_Update("menus","menu_location = ".intval($area)." WHERE menu_id = ".intval($insertID)."",$this->debug);
|
||||
$sql->update("menus","menu_location = ".intval($area)." WHERE menu_id = ".intval($insertID)."",$this->debug);
|
||||
}
|
||||
|
||||
$c = 0;
|
||||
@@ -1712,7 +1712,7 @@ class e_menuManager {
|
||||
{
|
||||
list($b,$id) = explode("-",$val);
|
||||
$order[] = $id;
|
||||
$sql->db_Update("menus","menu_order = ".$c." WHERE menu_id = ".intval($id)."",$this->debug);
|
||||
$sql->update("menus","menu_order = ".$c." WHERE menu_id = ".intval($id)."",$this->debug);
|
||||
$c++;
|
||||
}
|
||||
|
||||
|
@@ -477,6 +477,7 @@ class e_db_mysql
|
||||
}
|
||||
catch(PDOException $ex)
|
||||
{
|
||||
|
||||
$sQryRes = false;
|
||||
}
|
||||
}
|
||||
@@ -530,9 +531,9 @@ class e_db_mysql
|
||||
{
|
||||
$buglink = is_null($rli) ? $this->mySQLaccess : $rli;
|
||||
|
||||
if(is_array($query))
|
||||
if(is_array($query) && is_object($ex))
|
||||
{
|
||||
$query = "PREPARE: ".$query['PREPARE']."<br />BIND:".print_a($query['BIND'],true); // ,true);
|
||||
$query = "ERROR: ".$ex->errorInfo[2]."<br />PREPARE: ".$query['PREPARE']."<br />BIND:".print_a($query['BIND'],true); // ,true);
|
||||
}
|
||||
|
||||
$db_debug->Mark_Query($query, $buglink, $sQryRes, $aTrace, $mytime, $pTable);
|
||||
|
@@ -370,16 +370,18 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
|
||||
|
||||
function sc_poll($parm='')
|
||||
{
|
||||
if(is_readable(e_PLUGIN."poll/poll_class.php"))
|
||||
{
|
||||
|
||||
if(!e107::isInstalled('poll'))
|
||||
{
|
||||
require_once(e_PLUGIN."poll/poll_class.php");
|
||||
$pollo = new poll;
|
||||
$type = ($parm == 'front') ? 'front' : 'forum';
|
||||
|
||||
$poll_form = $pollo -> renderPollForm($type);
|
||||
return null;
|
||||
}
|
||||
|
||||
require_once(e_PLUGIN."poll/poll_class.php");
|
||||
$pollo = new poll;
|
||||
$type = ($parm == 'front') ? 'front' : 'forum';
|
||||
|
||||
$poll_form = $pollo -> renderPollForm($type);
|
||||
|
||||
if ($this->var['action'] == 'nt' && check_class($this->forum->prefs->get('poll')) && strpos(e_QUERY, 'edit') === false)
|
||||
{
|
||||
|
Reference in New Issue
Block a user