コード例 #1
0
ファイル: class.config.php プロジェクト: gizur/osticket
 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();
 }
コード例 #2
0
 function isKnowledgebaseEnabled()
 {
     require_once INCLUDE_DIR . 'class.faq.php';
     return $this->config['enable_kb'] && FAQ::countPublishedFAQs();
 }
コード例 #3
0
ファイル: kb.inc.php プロジェクト: dmiguel92/osTicket-1.8
<?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');