Exemplo n.º 1
0
 function isKnowledgebaseEnabled()
 {
     global $thisclient;
     if ($this->get('restrict_kb', false) && (!$thisclient || $thisclient->isGuest())) {
         return false;
     }
     require_once INCLUDE_DIR . 'class.faq.php';
     return $this->get('enable_kb') && FAQ::countPublishedFAQs();
 }
Exemplo n.º 2
0
 function isKnowledgebaseEnabled()
 {
     require_once INCLUDE_DIR . 'class.faq.php';
     return $this->config['enable_kb'] && FAQ::countPublishedFAQs();
 }
Exemplo n.º 3
0
<?php

/*********************************************************************
    kb.inc.php

    File included on every knowledgebase file.

    Peter Rotich <*****@*****.**>
    Copyright (c)  2006-2013 osTicket
    http://www.osticket.com

    Released under the GNU General Public License WITHOUT ANY WARRANTY.
    See LICENSE.TXT for details.

    vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
require_once '../client.inc.php';
require_once INCLUDE_DIR . 'class.faq.php';
/* Bail out if knowledgebase is disabled or if we have no public-published FAQs. */
if (!$cfg || !$cfg->isKnowledgebaseEnabled() || !FAQ::countPublishedFAQs()) {
    header('Location: ../');
    exit;
}
$nav = new UserNav($thisclient, 'kb');