1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 16:17:14 +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:
Cameron
2016-03-23 10:22:21 -07:00
parent f1a2c00160
commit 1c16094dea
3 changed files with 18 additions and 15 deletions

View File

@@ -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)
{