@@ -7,5 +7,5 @@ |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 11 | -include_once XOOPS_ROOT_PATH . '/include/comment_delete.php'; |
|
| 10 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 11 | +include_once XOOPS_ROOT_PATH.'/include/comment_delete.php'; |
|
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | function smartfaq_com_update($faq_id, $total_num) |
| 11 | 11 | { |
| 12 | 12 | $db = &XoopsDatabaseFactory::getDatabaseConnection(); |
| 13 | - $sql = 'UPDATE ' . $db->prefix('smartfaq_faq') . ' SET comments = ' . $total_num . ' WHERE faqid = ' . $faq_id; |
|
| 13 | + $sql = 'UPDATE '.$db->prefix('smartfaq_faq').' SET comments = '.$total_num.' WHERE faqid = '.$faq_id; |
|
| 14 | 14 | $db->query($sql); |
| 15 | 15 | } |
| 16 | 16 | |
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 11 | -include_once XOOPS_ROOT_PATH . '/include/comment_reply.php'; |
|
| 10 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 11 | +include_once XOOPS_ROOT_PATH.'/include/comment_reply.php'; |
|
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 11 | -include_once XOOPS_ROOT_PATH . '/include/comment_post.php'; |
|
| 10 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 11 | +include_once XOOPS_ROOT_PATH.'/include/comment_post.php'; |
|
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 11 | -include_once XOOPS_ROOT_PATH . '/include/comment_edit.php'; |
|
| 10 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 11 | +include_once XOOPS_ROOT_PATH.'/include/comment_edit.php'; |
|
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 11 | -include XOOPS_ROOT_PATH . '/include/notification_update.php'; |
|
| 10 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 11 | +include XOOPS_ROOT_PATH.'/include/notification_update.php'; |
|
@@ -7,5 +7,5 @@ |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
| 11 | -include_once XOOPS_ROOT_PATH . '/include/comment_new.php'; |
|
| 10 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
| 11 | +include_once XOOPS_ROOT_PATH.'/include/comment_new.php'; |
|
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * @version $Id $ |
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | -include_once __DIR__ . '/admin_header.php'; |
|
| 21 | +include_once __DIR__.'/admin_header.php'; |
|
| 22 | 22 | |
| 23 | 23 | xoops_cp_header(); |
| 24 | 24 | |
@@ -27,4 +27,4 @@ discard block |
||
| 27 | 27 | echo $aboutAdmin->addNavigation('about.php'); |
| 28 | 28 | echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); |
| 29 | 29 | |
| 30 | -include_once __DIR__ . '/admin_footer.php'; |
|
| 30 | +include_once __DIR__.'/admin_footer.php'; |
|
@@ -6,16 +6,16 @@ discard block |
||
| 6 | 6 | * Licence: GNU |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -include_once __DIR__ . '/header.php'; |
|
| 9 | +include_once __DIR__.'/header.php'; |
|
| 10 | 10 | |
| 11 | 11 | global $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
| 12 | 12 | |
| 13 | 13 | $xoopsOption['template_main'] = 'smartfaq_category.tpl'; |
| 14 | 14 | |
| 15 | -include_once(XOOPS_ROOT_PATH . '/header.php'); |
|
| 16 | -include_once __DIR__ . '/footer.php'; |
|
| 15 | +include_once(XOOPS_ROOT_PATH.'/header.php'); |
|
| 16 | +include_once __DIR__.'/footer.php'; |
|
| 17 | 17 | |
| 18 | -$categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
| 18 | +$categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0; |
|
| 19 | 19 | |
| 20 | 20 | // Creating the category object for the selected category |
| 21 | 21 | $categoryObj = new sfCategory($categoryid); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $categoryHandler = sf_gethandler('category'); |
| 35 | 35 | |
| 36 | 36 | // At which record shall we start |
| 37 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
| 37 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
| 38 | 38 | |
| 39 | 39 | // Creating the faq handler object |
| 40 | 40 | $faqHandler = sf_gethandler('faq'); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $last_qnaObj = $faqHandler->getLastPublishedByCat(array(_SF_STATUS_OPENED)); |
| 59 | 59 | if (isset($last_qnaObj[$categoryid])) { |
| 60 | 60 | $categoryObj->setVar('last_faqid', $last_qnaObj[$categoryid]->getVar('faqid')); |
| 61 | - $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$categoryid]->getVar('faqid') . "'>" . $last_qnaObj[$categoryid]->question(50) . '</a>'); |
|
| 61 | + $categoryObj->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$categoryid]->getVar('faqid')."'>".$last_qnaObj[$categoryid]->question(50).'</a>'); |
|
| 62 | 62 | } |
| 63 | 63 | // Populating the smarty variables with informations related to the selected category |
| 64 | 64 | $category = $categoryObj->toArray(null, true); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
| 78 | 78 | if (isset($last_qnaObj[$subcat_id])) { |
| 79 | 79 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
| 80 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question(50) . '</a>'); |
|
| 80 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question(50).'</a>'); |
|
| 81 | 81 | } |
| 82 | 82 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
| 83 | 83 | $subcats[$subcat_id] = $subcat->toArray(null, true); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | $xoopsTpl->assign('subcats', $subcats); |
| 88 | 88 | } |
| 89 | -$category['total'] = $catQnasWithSub + $totalQnas[$categoryid]; |
|
| 89 | +$category['total'] = $catQnasWithSub+$totalQnas[$categoryid]; |
|
| 90 | 90 | if ($faqsObj) { |
| 91 | 91 | $userids = array(); |
| 92 | 92 | foreach ($faqsObj as $key => $thisfaq) { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $memberHandler = xoops_getHandler('member'); |
| 98 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
| 98 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
| 99 | 99 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
| 100 | 100 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
| 101 | 101 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | // Language constants |
| 110 | -$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name')) . " > <a href='open_index.php'>" . _MD_SF_OPEN_SECTION . '</a>'); |
|
| 110 | +$xoopsTpl->assign('whereInSection', $myts->htmlSpecialChars($xoopsModule->getVar('name'))." > <a href='open_index.php'>"._MD_SF_OPEN_SECTION.'</a>'); |
|
| 111 | 111 | $xoopsTpl->assign('modulename', $xoopsModule->dirname()); |
| 112 | 112 | |
| 113 | 113 | $xoopsTpl->assign('displaylastfaqs', true); |
@@ -124,19 +124,19 @@ discard block |
||
| 124 | 124 | $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY); |
| 125 | 125 | |
| 126 | 126 | // The Navigation Bar |
| 127 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 128 | -$pagenav = new XoopsPageNav($totalQnas[$categoryid], $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid')); |
|
| 127 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 128 | +$pagenav = new XoopsPageNav($totalQnas[$categoryid], $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid')); |
|
| 129 | 129 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
| 130 | - $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'; |
|
| 130 | + $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'; |
|
| 131 | 131 | } else { |
| 132 | - $category['navbar'] = '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'; |
|
| 132 | + $category['navbar'] = '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'; |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | $xoopsTpl->assign('category', $category); |
| 136 | 136 | |
| 137 | 137 | // Page Title Hack by marcan |
| 138 | 138 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
| 139 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']); |
|
| 139 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']); |
|
| 140 | 140 | // End Page Title Hack by marcan |
| 141 | 141 | |
| 142 | -include_once(XOOPS_ROOT_PATH . '/footer.php'); |
|
| 142 | +include_once(XOOPS_ROOT_PATH.'/footer.php'); |
|