@@ -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 | $GLOBALS['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,16 +77,16 @@ 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); |
84 | - $catQnasWithSub += $subcats[$subcat_id]['total']; |
|
84 | + $catQnasWithSub += $subcats[$subcat_id]['total']; |
|
85 | 85 | } |
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'; |
@@ -6,15 +6,15 @@ 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 | // At which record shall we start for the Categories |
14 | -$catstart = isset($_GET['catstart']) ? (int)$_GET['catstart'] : 0; |
|
14 | +$catstart = isset($_GET['catstart']) ? (int) $_GET['catstart'] : 0; |
|
15 | 15 | |
16 | 16 | // At which record shall we start for the FAQs |
17 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
17 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
18 | 18 | |
19 | 19 | // Creating the category handler object |
20 | 20 | $categoryHandler = sf_gethandler('category'); |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | |
43 | 43 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_index.tpl'; |
44 | 44 | |
45 | -include_once XOOPS_ROOT_PATH . '/header.php'; |
|
46 | -include_once __DIR__ . '/footer.php'; |
|
45 | +include_once XOOPS_ROOT_PATH.'/header.php'; |
|
46 | +include_once __DIR__.'/footer.php'; |
|
47 | 47 | |
48 | 48 | //get all categories for future reference |
49 | 49 | $allcategories = $categoryHandler->getObjects(null, true); |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
66 | 66 | if (isset($last_qnaObj[$subcat_id])) { |
67 | 67 | $subcat->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
68 | - $subcat->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question(50) . '</a>'); |
|
68 | + $subcat->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question(50).'</a>'); |
|
69 | 69 | } |
70 | 70 | $subcat->setVar('faqcount', $totalQnas[$subcat_id]); |
71 | 71 | $categories[$cat_id]['subcats'][$subcat_id] = $subcat->toArray(null, true); |
72 | - $total += $totalQnas[$subcat_id]; |
|
72 | + $total += $totalQnas[$subcat_id]; |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | $memberHandler = xoops_getHandler('member'); |
104 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
104 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
105 | 105 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
106 | 106 | $faq = $faqsObj[$i]->toArray(null, $allcategories); |
107 | 107 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | } |
115 | 115 | } |
116 | 116 | // Language constants |
117 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
117 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
118 | 118 | $xoopsTpl->assign(array( |
119 | 119 | 'lang_on' => _MD_SF_ON, |
120 | 120 | 'lang_postedby' => _MD_SF_POSTEDBY, |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'lang_hits' => _MD_SF_HITS |
125 | 125 | )); |
126 | 126 | |
127 | -$moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
127 | +$moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
128 | 128 | $xoopsTpl->assign('lang_mainhead', sprintf(_MD_SF_OPEN_WELCOME, $xoopsConfig['sitename'])); |
129 | 129 | $xoopsTpl->assign('lang_mainintro', $myts->displayTarea($xoopsModuleConfig['openquestionintromsg'], 1)); |
130 | 130 | $xoopsTpl->assign('lang_total', _MD_SF_TOTAL_QUESTIONS); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $xoopsTpl->assign('lang_description', _MD_SF_DESCRIPTION); |
133 | 133 | $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY); |
134 | 134 | $xoopsTpl->assign('sectionname', $moduleName); |
135 | -$xoopsTpl->assign('whereInSection', "<a href='index.php'>" . $moduleName . '</a> > ' . _MD_SF_OPEN_SECTION); |
|
135 | +$xoopsTpl->assign('whereInSection', "<a href='index.php'>".$moduleName.'</a> > '._MD_SF_OPEN_SECTION); |
|
136 | 136 | |
137 | 137 | $xoopsTpl->assign('displayFull', false); |
138 | 138 | $xoopsTpl->assign('displaylastfaqs', $xoopsModuleConfig['displaylastfaqs']); |
@@ -148,25 +148,25 @@ discard block |
||
148 | 148 | $xoopsTpl->assign('lang_category', _MD_SF_CATEGORY); |
149 | 149 | |
150 | 150 | // Category Navigation Bar |
151 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
151 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
152 | 152 | $pagenav = new XoopsPageNav($totalCategories, $xoopsModuleConfig['catperpage'], $catstart, 'catstart', ''); |
153 | 153 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
154 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
154 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
155 | 155 | } else { |
156 | - $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
156 | + $xoopsTpl->assign('catnavbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | // FAQ Navigation Bar |
160 | 160 | $pagenav = new XoopsPageNav($totalFaqs, $xoopsModuleConfig['indexperpage'], $start, 'start', ''); |
161 | 161 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
162 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
162 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
163 | 163 | } else { |
164 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
164 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | // Page Title Hack by marcan |
168 | 168 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
169 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category->getVar('name')); |
|
169 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category->getVar('name')); |
|
170 | 170 | // End Page Title Hack by marcan |
171 | 171 | |
172 | -include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
172 | +include_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | $uid = $xoopsUser ? $xoopsUser->getVar('uid') : 0; |
12 | 12 | $isAdmin = (sf_userIsAdmin() || sf_moderator()); |
13 | 13 | |
14 | -$xoopsTpl->assign('sf_adminpage', "<a href='" . XOOPS_URL . "/modules/smartfaq/admin/index.php'>" . _MD_SF_ADMIN_PAGE . '</a>'); |
|
14 | +$xoopsTpl->assign('sf_adminpage', "<a href='".XOOPS_URL."/modules/smartfaq/admin/index.php'>"._MD_SF_ADMIN_PAGE.'</a>'); |
|
15 | 15 | $xoopsTpl->assign('isAdmin', $isAdmin); |
16 | 16 | |
17 | 17 | $xoopsTpl->assign(array( |
@@ -34,4 +34,4 @@ discard block |
||
34 | 34 | |
35 | 35 | $xoopsTpl->assign('ref_smartfaq', 'SmartFAQ is developed by The SmartFactory (http://www.smartfactory.ca), a division of InBox Solutions (http://www.inboxsolutions.net)'); |
36 | 36 | |
37 | -$xoopsTpl->assign('xoops_module_header', "<link rel='stylesheet' type='text/css' href='" . XOOPS_URL . "/modules/smartfaq/assets/css/smartfaq.css'/>"); |
|
37 | +$xoopsTpl->assign('xoops_module_header', "<link rel='stylesheet' type='text/css' href='".XOOPS_URL."/modules/smartfaq/assets/css/smartfaq.css'/>"); |
@@ -6,11 +6,11 @@ |
||
6 | 6 | * Licence: GNU |
7 | 7 | */ |
8 | 8 | |
9 | -include __DIR__ . '/../../mainfile.php'; |
|
9 | +include __DIR__.'/../../mainfile.php'; |
|
10 | 10 | |
11 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
12 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php'; |
|
13 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php'; |
|
14 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php'; |
|
11 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
12 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; |
|
13 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; |
|
14 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; |
|
15 | 15 | |
16 | 16 | $myts = MyTextSanitizer::getInstance(); |
@@ -6,9 +6,9 @@ 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 | -$categoryid = isset($_GET['categoryid']) ? (int)$_GET['categoryid'] : 0; |
|
11 | +$categoryid = isset($_GET['categoryid']) ? (int) $_GET['categoryid'] : 0; |
|
12 | 12 | |
13 | 13 | // Creating the category handler object |
14 | 14 | $categoryHandler = sf_gethandler('category'); |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | } |
33 | 33 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_category.tpl'; |
34 | 34 | |
35 | -include_once XOOPS_ROOT_PATH . '/header.php'; |
|
36 | -include_once __DIR__ . '/footer.php'; |
|
35 | +include_once XOOPS_ROOT_PATH.'/header.php'; |
|
36 | +include_once __DIR__.'/footer.php'; |
|
37 | 37 | |
38 | 38 | // At which record shall we start |
39 | -$start = isset($_GET['start']) ? (int)$_GET['start'] : 0; |
|
39 | +$start = isset($_GET['start']) ? (int) $_GET['start'] : 0; |
|
40 | 40 | |
41 | 41 | // Creating the faq handler object |
42 | 42 | $faqHandler = sf_gethandler('faq'); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // Get the last smartfaq |
71 | 71 | $last_qnaObj = $faqHandler->getLastPublishedByCat(); |
72 | 72 | } |
73 | -$lastfaqsize = (int)$xoopsModuleConfig['lastfaqsize']; |
|
73 | +$lastfaqsize = (int) $xoopsModuleConfig['lastfaqsize']; |
|
74 | 74 | // Creating the sub-categories objects that belong to the selected category |
75 | 75 | $subcatsObj = $categoryHandler->getCategories(0, 0, $categoryid); |
76 | 76 | $total_subcats = count($subcatsObj); |
@@ -82,18 +82,18 @@ discard block |
||
82 | 82 | if (isset($totalQnas[$subcat_id]) && $totalQnas[$subcat_id] > 0) { |
83 | 83 | if (isset($last_qnaObj[$subcat_id])) { |
84 | 84 | $subcatsObj[$i]->setVar('last_faqid', $last_qnaObj[$subcat_id]->getVar('faqid')); |
85 | - $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=" . $last_qnaObj[$subcat_id]->getVar('faqid') . "'>" . $last_qnaObj[$subcat_id]->question($lastfaqsize) . '</a>'); |
|
85 | + $subcatsObj[$i]->setVar('last_question_link', "<a href='faq.php?faqid=".$last_qnaObj[$subcat_id]->getVar('faqid')."'>".$last_qnaObj[$subcat_id]->question($lastfaqsize).'</a>'); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | $subcatsObj[$i]->setVar('faqcount', $totalQnas[$subcat_id]); |
89 | 89 | $subcats[$subcat_id] = $subcatsObj[$i]->toArray(); |
90 | - $total_faqs += $totalQnas[$subcat_id]; |
|
90 | + $total_faqs += $totalQnas[$subcat_id]; |
|
91 | 91 | //}replacé ligne 92 |
92 | 92 | } |
93 | 93 | $xoopsTpl->assign('subcats', $subcats); |
94 | 94 | } |
95 | 95 | $thiscategory_faqcount = isset($totalQnas[$categoryid]) ? $totalQnas[$categoryid] : 0; |
96 | -$category['total'] = $thiscategory_faqcount + $total_faqs; |
|
96 | +$category['total'] = $thiscategory_faqcount+$total_faqs; |
|
97 | 97 | |
98 | 98 | if (count($faqsObj) > 0) { |
99 | 99 | $userids = array(); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | $memberHandler = xoops_getHandler('member'); |
112 | - $users = $memberHandler->getUsers(new Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
112 | + $users = $memberHandler->getUsers(new Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
113 | 113 | // Adding the Q&As of the selected category |
114 | 114 | for ($i = 0; $i < $totalQnasOnPage; ++$i) { |
115 | 115 | $faq = $faqsObj[$i]->toArray(null, $categoryObj); |
@@ -164,26 +164,26 @@ discard block |
||
164 | 164 | $xoopsTpl->assign('lang_comments', _MD_SF_COMMENTS); |
165 | 165 | |
166 | 166 | // The Navigation Bar |
167 | -include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
168 | -$pagenav = new XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid=' . $categoryObj->getVar('categoryid')); |
|
167 | +include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
168 | +$pagenav = new XoopsPageNav($thiscategory_faqcount, $xoopsModuleConfig['indexperpage'], $start, 'start', 'categoryid='.$categoryObj->getVar('categoryid')); |
|
169 | 169 | if ($xoopsModuleConfig['useimagenavpage'] == 1) { |
170 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderImageNav() . '</div>'); |
|
170 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderImageNav().'</div>'); |
|
171 | 171 | } else { |
172 | - $xoopsTpl->assign('navbar', '<div style="text-align:right;">' . $pagenav->renderNav() . '</div>'); |
|
172 | + $xoopsTpl->assign('navbar', '<div style="text-align:right;">'.$pagenav->renderNav().'</div>'); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | $xoopsTpl->assign('category', $category); |
176 | 176 | |
177 | 177 | // Page Title Hack by marcan |
178 | 178 | $module_name = $myts->htmlSpecialChars($xoopsModule->getVar('name')); |
179 | -$xoopsTpl->assign('xoops_pagetitle', $module_name . ' - ' . $category['name']); |
|
179 | +$xoopsTpl->assign('xoops_pagetitle', $module_name.' - '.$category['name']); |
|
180 | 180 | // End Page Title Hack by marcan |
181 | 181 | |
182 | 182 | //code to include smartie |
183 | -if (file_exists(XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php')) { |
|
184 | - include_once XOOPS_ROOT_PATH . '/modules/smarttie/smarttie_links.php'; |
|
183 | +if (file_exists(XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php')) { |
|
184 | + include_once XOOPS_ROOT_PATH.'/modules/smarttie/smarttie_links.php'; |
|
185 | 185 | $xoopsTpl->assign('smarttie', 1); |
186 | 186 | } |
187 | 187 | //end code for smarttie |
188 | 188 | |
189 | -include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
189 | +include_once XOOPS_ROOT_PATH.'/footer.php'; |
@@ -6,7 +6,7 @@ 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 $xoopsUser, $xoopsConfig, $xoopsModuleConfig, $xoopsModule; |
12 | 12 | |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | global $xoopsUser, $myts; |
85 | 85 | |
86 | 86 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.tpl'; |
87 | - include_once XOOPS_ROOT_PATH . '/header.php'; |
|
88 | - include_once __DIR__ . '/footer.php'; |
|
87 | + include_once XOOPS_ROOT_PATH.'/header.php'; |
|
88 | + include_once __DIR__.'/footer.php'; |
|
89 | 89 | |
90 | 90 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
91 | 91 | |
92 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
92 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
93 | 93 | $faq = $faqObj->toArray(null, $categoryObj, false); |
94 | 94 | $faq['categoryPath'] = $categoryObj->getCategoryPath(true); |
95 | 95 | $faq['answer'] = $answerObj->answer(); |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME); |
103 | 103 | |
104 | 104 | $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name()))); |
105 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO); |
|
105 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUB_INTRO); |
|
106 | 106 | |
107 | - include_once __DIR__ . '/include/submit.inc.php'; |
|
107 | + include_once __DIR__.'/include/submit.inc.php'; |
|
108 | 108 | |
109 | - include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
109 | + include_once XOOPS_ROOT_PATH.'/footer.php'; |
|
110 | 110 | |
111 | 111 | exit(); |
112 | 112 | break; |
@@ -170,14 +170,14 @@ discard block |
||
170 | 170 | $attachments_tmp = unserialize(base64_decode($_POST['attachments_tmp'])); |
171 | 171 | if (isset($_POST['delete_tmp']) && count($_POST['delete_tmp'])) { |
172 | 172 | foreach ($_POST['delete_tmp'] as $key) { |
173 | - unlink(XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0]); |
|
173 | + unlink(XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attachments_tmp[$key][0]); |
|
174 | 174 | unset($attachments_tmp[$key]); |
175 | 175 | } |
176 | 176 | } |
177 | 177 | } |
178 | 178 | if (count($attachments_tmp)) { |
179 | 179 | foreach ($attachments_tmp as $key => $attach) { |
180 | - if (rename(XOOPS_CACHE_PATH . '/' . $attachments_tmp[$key][0], XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $attachments_tmp[$key][0])) { |
|
180 | + if (rename(XOOPS_CACHE_PATH.'/'.$attachments_tmp[$key][0], XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$attachments_tmp[$key][0])) { |
|
181 | 181 | $post_obj->setAttachment($attach[0], $attach[1], $attach[2]); |
182 | 182 | } |
183 | 183 | } |
@@ -187,11 +187,11 @@ discard block |
||
187 | 187 | if (isset($_FILES['userfile']['name']) && $_FILES['userfile']['name'] != '' |
188 | 188 | && $topicHandler->getPermission($forum_obj, $topic_status, 'attach') |
189 | 189 | ) { |
190 | - require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname', 'n') . '/class/uploader.php'; |
|
190 | + require_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname', 'n').'/class/uploader.php'; |
|
191 | 191 | $maxfilesize = $forum_obj->getVar('attach_maxkb') * 1024; |
192 | 192 | $uploaddir = XOOPS_CACHE_PATH; |
193 | 193 | |
194 | - $uploader = new sfUploader($uploaddir, $newAnswerObj->getVar('attach_ext'), (int)$maxfilesize, (int)$xoopsModuleConfig['max_img_width'], (int)$xoopsModuleConfig['max_img_height']); |
|
194 | + $uploader = new sfUploader($uploaddir, $newAnswerObj->getVar('attach_ext'), (int) $maxfilesize, (int) $xoopsModuleConfig['max_img_width'], (int) $xoopsModuleConfig['max_img_height']); |
|
195 | 195 | |
196 | 196 | if ($_FILES['userfile']['error'] > 0) { |
197 | 197 | switch ($_FILES['userfile']['error']) { |
@@ -209,19 +209,19 @@ discard block |
||
209 | 209 | $uploader->setCheckMediaTypeByExt(); |
210 | 210 | |
211 | 211 | if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { |
212 | - $prefix = is_object($xoopsUser) ? (string)$xoopsUser->uid() . '_' : 'newbb_'; |
|
212 | + $prefix = is_object($xoopsUser) ? (string) $xoopsUser->uid().'_' : 'newbb_'; |
|
213 | 213 | $uploader->setPrefix($prefix); |
214 | 214 | if (!$uploader->upload()) { |
215 | - $error_message[] = $error_upload =& $uploader->getErrors(); |
|
215 | + $error_message[] = $error_upload = & $uploader->getErrors(); |
|
216 | 216 | } else { |
217 | 217 | if (is_file($uploader->getSavedDestination())) { |
218 | - if (rename(XOOPS_CACHE_PATH . '/' . $uploader->getSavedFileName(), XOOPS_ROOT_PATH . '/' . $xoopsModuleConfig['dir_attachments'] . '/' . $uploader->getSavedFileName())) { |
|
218 | + if (rename(XOOPS_CACHE_PATH.'/'.$uploader->getSavedFileName(), XOOPS_ROOT_PATH.'/'.$xoopsModuleConfig['dir_attachments'].'/'.$uploader->getSavedFileName())) { |
|
219 | 219 | $post_obj->setAttachment($uploader->getSavedFileName(), $uploader->getMediaName(), $uploader->getMediaType()); |
220 | 220 | } |
221 | 221 | } |
222 | 222 | } |
223 | 223 | } else { |
224 | - $error_message[] = $error_upload =& $uploader->getErrors(); |
|
224 | + $error_message[] = $error_upload = & $uploader->getErrors(); |
|
225 | 225 | } |
226 | 226 | } |
227 | 227 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | } else { |
255 | 255 | // Subscribe the user to On Published notification, if requested |
256 | 256 | if ($notifypub == 1) { |
257 | - include_once XOOPS_ROOT_PATH . '/include/notification_constants.php'; |
|
257 | + include_once XOOPS_ROOT_PATH.'/include/notification_constants.php'; |
|
258 | 258 | $notificationHandler = xoops_getHandler('notification'); |
259 | 259 | $notificationHandler->subscribe('faq', $newFaqObj->faqid(), 'approved', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE); |
260 | 260 | } |
@@ -277,20 +277,20 @@ discard block |
||
277 | 277 | $categoryObj = $categoryHandler->create(); |
278 | 278 | |
279 | 279 | $GLOBALS['xoopsOption']['template_main'] = 'smartfaq_submit.html'; |
280 | - include_once XOOPS_ROOT_PATH . '/header.php'; |
|
281 | - include_once __DIR__ . '/footer.php'; |
|
280 | + include_once XOOPS_ROOT_PATH.'/header.php'; |
|
281 | + include_once __DIR__.'/footer.php'; |
|
282 | 282 | |
283 | 283 | $name = $xoopsUser ? ucwords($xoopsUser->getVar('uname')) : 'Anonymous'; |
284 | 284 | $notifypub = 1; |
285 | - $moduleName =& $myts->displayTarea($xoopsModule->getVar('name')); |
|
285 | + $moduleName = & $myts->displayTarea($xoopsModule->getVar('name')); |
|
286 | 286 | $xoopsTpl->assign('whereInSection', $moduleName); |
287 | 287 | $xoopsTpl->assign('lang_submit', _MD_SF_SUB_SNEWNAME); |
288 | 288 | |
289 | 289 | $xoopsTpl->assign('lang_intro_title', sprintf(_MD_SF_SUB_SNEWNAME, ucwords($xoopsModule->name()))); |
290 | - $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY . "<b>$name</b>, " . _MD_SF_SUB_INTRO); |
|
290 | + $xoopsTpl->assign('lang_intro_text', _MD_SF_GOODDAY."<b>$name</b>, "._MD_SF_SUB_INTRO); |
|
291 | 291 | |
292 | - include_once __DIR__ . '/include/submit.inc.php'; |
|
292 | + include_once __DIR__.'/include/submit.inc.php'; |
|
293 | 293 | |
294 | - include_once XOOPS_ROOT_PATH . '/footer.php'; |
|
294 | + include_once XOOPS_ROOT_PATH.'/footer.php'; |
|
295 | 295 | break; |
296 | 296 | } |
@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | */ |
8 | 8 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
9 | 9 | |
10 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/category.php'; |
|
11 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/faq.php'; |
|
12 | -include_once XOOPS_ROOT_PATH . '/modules/smartfaq/class/answer.php'; |
|
10 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/category.php'; |
|
11 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/faq.php'; |
|
12 | +include_once XOOPS_ROOT_PATH.'/modules/smartfaq/class/answer.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @return mixed|null |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | break; |
64 | 64 | |
65 | 65 | case 'inside': |
66 | - return XOOPS_URL . '/modules/smartfaq/doc/'; |
|
66 | + return XOOPS_URL.'/modules/smartfaq/doc/'; |
|
67 | 67 | break; |
68 | 68 | |
69 | 69 | case 'custom': |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | { |
81 | 81 | $ret = ''; |
82 | 82 | foreach ($errors as $key => $value) { |
83 | - $ret .= '<br> - ' . $value; |
|
83 | + $ret .= '<br> - '.$value; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | return $ret; |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | $spaces .= '--'; |
104 | 104 | } |
105 | 105 | |
106 | - $ret .= "<option value='" . $categoryObj->categoryid() . "'"; |
|
106 | + $ret .= "<option value='".$categoryObj->categoryid()."'"; |
|
107 | 107 | if ($selectedid == $categoryObj->categoryid()) { |
108 | 108 | $ret .= ' selected'; |
109 | 109 | } |
110 | - $ret .= '>' . $spaces . $categoryObj->name() . "</option>\n"; |
|
110 | + $ret .= '>'.$spaces.$categoryObj->name()."</option>\n"; |
|
111 | 111 | |
112 | 112 | $subCategoriesObj = $categoryHandler->getCategories(0, 0, $categoryObj->categoryid()); |
113 | 113 | if (count($subCategoriesObj) > 0) { |
@@ -128,10 +128,10 @@ discard block |
||
128 | 128 | */ |
129 | 129 | function sf_createCategorySelect($selectedid = 0, $parentcategory = 0, $allCatOption = true) |
130 | 130 | { |
131 | - $ret = '' . _MB_SF_SELECTCAT . " <select name='options[]'>"; |
|
131 | + $ret = ''._MB_SF_SELECTCAT." <select name='options[]'>"; |
|
132 | 132 | if ($allCatOption) { |
133 | 133 | $ret .= "<option value='0'"; |
134 | - $ret .= '>' . _MB_SF_ALLCAT . "</option>\n"; |
|
134 | + $ret .= '>'._MB_SF_ALLCAT."</option>\n"; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | // Creating the category handler object |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | $smartModule = sf_getModuleInfo(); |
201 | 201 | |
202 | - $modfootertxt = 'Module ' . $smartModule->getInfo('name') . ' - Version ' . $smartModule->getInfo('version') . ''; |
|
202 | + $modfootertxt = 'Module '.$smartModule->getInfo('name').' - Version '.$smartModule->getInfo('version').''; |
|
203 | 203 | |
204 | 204 | $modfooter = "<a href='" |
205 | 205 | . $smartModule->getInfo('support_site_url') |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | |
306 | 306 | $gpermHandler = xoops_getHandler('groupperm'); |
307 | 307 | |
308 | - $sql = 'SELECT faqid FROM ' . $xoopsDB->prefix('smartfaq_faq') . " WHERE categoryid = '$categoryid' "; |
|
308 | + $sql = 'SELECT faqid FROM '.$xoopsDB->prefix('smartfaq_faq')." WHERE categoryid = '$categoryid' "; |
|
309 | 309 | $result = $xoopsDB->query($sql); |
310 | 310 | |
311 | 311 | if (count($result) > 0) { |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | $ret = array(); |
421 | 421 | global $xoopsDB; |
422 | 422 | |
423 | - $result = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('smartfaq_faq') . " WHERE faqid = '$faqid'"); |
|
423 | + $result = $xoopsDB->query('SELECT * FROM '.$xoopsDB->prefix('smartfaq_faq')." WHERE faqid = '$faqid'"); |
|
424 | 424 | $ret = $xoopsDB->fetcharray($result); |
425 | 425 | |
426 | 426 | return $ret; |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | { |
440 | 440 | global $xoopsUser, $xoopsModule, $xoopsModuleConfig, $xoopsConfig; |
441 | 441 | $adminLinks = ''; |
442 | - $modulePath = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/'; |
|
442 | + $modulePath = XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/'; |
|
443 | 443 | $page = $open ? 'question.php' : 'faq.php'; |
444 | 444 | if ($xoopsUser && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { |
445 | 445 | // Edit button |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | . "'/></a>"; |
486 | 486 | $adminLinks .= ' '; |
487 | 487 | // Email button |
488 | - $maillink = 'mailto:?subject=' |
|
488 | + $maillink = 'mailto:?subject=' |
|
489 | 489 | . sprintf(_MD_SF_INTARTICLE, $xoopsConfig['sitename']) |
490 | 490 | . '&body=' |
491 | 491 | . sprintf(_MD_SF_INTARTFOUND, $xoopsConfig['sitename']) |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | . $modulePath |
494 | 494 | . 'faq.php?faqid=' |
495 | 495 | . $faqid; |
496 | - $adminLinks .= '<a href="' . $maillink . "\"><img src='" . $modulePath . "assets/images/links/friend.gif' title='" . _MD_SF_MAIL . "' alt='" . _MD_SF_MAIL . "'/></a>"; |
|
496 | + $adminLinks .= '<a href="'.$maillink."\"><img src='".$modulePath."assets/images/links/friend.gif' title='"._MD_SF_MAIL."' alt='"._MD_SF_MAIL."'/></a>"; |
|
497 | 497 | $adminLinks .= ' '; |
498 | 498 | // Submit New Answer button |
499 | 499 | if ($xoopsModuleConfig['allownewanswer'] && (is_object($xoopsUser) || $xoopsModuleConfig['anonpost'])) { |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | return $userid; |
529 | 529 | } |
530 | 530 | |
531 | - $userid = (int)$userid; |
|
531 | + $userid = (int) $userid; |
|
532 | 532 | if ($userid > 0) { |
533 | 533 | if ($users == array()) { |
534 | 534 | //fetching users |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | if (!isset($users[$userid])) { |
539 | 539 | return $GLOBALS['xoopsConfig']['anonymous']; |
540 | 540 | } |
541 | - $user =& $users[$userid]; |
|
541 | + $user = & $users[$userid]; |
|
542 | 542 | } |
543 | 543 | |
544 | 544 | if (is_object($user)) { |
@@ -552,9 +552,9 @@ discard block |
||
552 | 552 | $fullname = $user->getVar('name'); |
553 | 553 | } |
554 | 554 | if (!empty($fullname)) { |
555 | - $linkeduser = "$fullname [<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . $ts->htmlSpecialChars($username) . '</a>]'; |
|
555 | + $linkeduser = "$fullname [<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".$ts->htmlSpecialChars($username).'</a>]'; |
|
556 | 556 | } else { |
557 | - $linkeduser = "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $userid . "'>" . ucwords($ts->htmlSpecialChars($username)) . '</a>'; |
|
557 | + $linkeduser = "<a href='".XOOPS_URL.'/userinfo.php?uid='.$userid."'>".ucwords($ts->htmlSpecialChars($username)).'</a>'; |
|
558 | 558 | } |
559 | 559 | |
560 | 560 | return $linkeduser; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | //--> |
636 | 636 | </script> |
637 | 637 | <?php |
638 | - echo "<h3 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('" . $tablename . "'); toggleIcon('" . $iconname . "');\">"; |
|
638 | + echo "<h3 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('".$tablename."'); toggleIcon('".$iconname."');\">"; |
|
639 | 639 | } |
640 | 640 | |
641 | 641 | /** |
@@ -648,16 +648,16 @@ discard block |
||
648 | 648 | static $handlers; |
649 | 649 | $name = strtolower(trim($name)); |
650 | 650 | if (!isset($handlers[$name])) { |
651 | - if (file_exists($hnd_file = XOOPS_ROOT_PATH . '/modules/smartfaq/class/' . $name . '.php')) { |
|
651 | + if (file_exists($hnd_file = XOOPS_ROOT_PATH.'/modules/smartfaq/class/'.$name.'.php')) { |
|
652 | 652 | require_once $hnd_file; |
653 | 653 | } |
654 | - $class = 'sf' . ucfirst($name) . 'Handler'; |
|
654 | + $class = 'sf'.ucfirst($name).'Handler'; |
|
655 | 655 | if (class_exists($class)) { |
656 | 656 | $handlers[$name] = new $class($GLOBALS['xoopsDB']); |
657 | 657 | } |
658 | 658 | } |
659 | 659 | if (!$optional && !isset($handlers[$name])) { |
660 | - trigger_error('Class <b>' . $class . '</b> does not exist<br>Handler Name: ' . $name, E_USER_ERROR); |
|
660 | + trigger_error('Class <b>'.$class.'</b> does not exist<br>Handler Name: '.$name, E_USER_ERROR); |
|
661 | 661 | } |
662 | 662 | $false = false; |
663 | 663 |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
29 | 29 | exit('Access Denied'); |
30 | 30 | } |
31 | -include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
32 | -include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
31 | +include_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
32 | +include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blocksadmin.php'; |
|
33 | 33 | |
34 | 34 | $op = 'list'; |
35 | 35 | if (isset($HTTP_POST_VARS)) { |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | || $HTTP_GET_VARS['op'] === 'previewpopup' |
45 | 45 | ) { |
46 | 46 | $op = $HTTP_GET_VARS['op']; |
47 | - $bid = isset($HTTP_GET_VARS['bid']) ? (int)$HTTP_GET_VARS['bid'] : 0; |
|
47 | + $bid = isset($HTTP_GET_VARS['bid']) ? (int) $HTTP_GET_VARS['bid'] : 0; |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | |
51 | 51 | if (isset($previewblock)) { |
52 | 52 | xoops_cp_header(); |
53 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
53 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
54 | 54 | $xoopsTpl = new XoopsTpl(); |
55 | 55 | $xoopsTpl->xoops_setCaching(0); |
56 | 56 | if (isset($bid)) { |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | . $myblock->getContent('S', $bctype) |
85 | 85 | . '</td></tr></table></body></html>'; |
86 | 86 | |
87 | - $dummyfile = '_dummyfile_' . time() . '.html'; |
|
88 | - $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w'); |
|
87 | + $dummyfile = '_dummyfile_'.time().'.html'; |
|
88 | + $fp = fopen(XOOPS_CACHE_PATH.'/'.$dummyfile, 'w'); |
|
89 | 89 | fwrite($fp, $dummyhtml); |
90 | 90 | fclose($fp); |
91 | 91 | $block['edit_form'] = false; |
@@ -96,24 +96,24 @@ discard block |
||
96 | 96 | $block['visible'] = $bvisible; |
97 | 97 | $block['title'] = $myblock->getVar('title', 'E'); |
98 | 98 | $block['content'] = $myblock->getVar('content', 'E'); |
99 | - $block['modules'] =& $bmodule; |
|
99 | + $block['modules'] = & $bmodule; |
|
100 | 100 | $block['ctype'] = isset($bctype) ? $bctype : $myblock->getVar('c_type'); |
101 | 101 | $block['is_custom'] = true; |
102 | - $block['cachetime'] = (int)$bcachetime; |
|
103 | - echo '<a href="admin.php?fct=blocksadmin">' . _AM_BADMIN . '</a> <span style="font-weight:bold;">»»</span> ' . $block['form_title'] . '<br><br>'; |
|
104 | - include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blockform.php'; |
|
102 | + $block['cachetime'] = (int) $bcachetime; |
|
103 | + echo '<a href="admin.php?fct=blocksadmin">'._AM_BADMIN.'</a> <span style="font-weight:bold;">»»</span> '.$block['form_title'].'<br><br>'; |
|
104 | + include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php'; |
|
105 | 105 | $form->display(); |
106 | 106 | xoops_cp_footer(); |
107 | 107 | echo '<script type="text/javascript"> |
108 | 108 | <!--// |
109 | - preview_window = openWithSelfMain("' . XOOPS_URL . '/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file=' . $dummyfile . '", "popup", 250, 200); |
|
109 | + preview_window = openWithSelfMain("' . XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file='.$dummyfile.'", "popup", 250, 200); |
|
110 | 110 | //--> |
111 | 111 | </script>'; |
112 | 112 | exit(); |
113 | 113 | } |
114 | 114 | |
115 | 115 | if ($op === 'previewpopup') { |
116 | - $file = str_replace('..', '', XOOPS_CACHE_PATH . '/' . trim($HTTP_GET_VARS['file'])); |
|
116 | + $file = str_replace('..', '', XOOPS_CACHE_PATH.'/'.trim($HTTP_GET_VARS['file'])); |
|
117 | 117 | if (file_exists($file)) { |
118 | 118 | include $file; |
119 | 119 | @unlink($file); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | if ($op === 'update') { |
154 | - $bcachetime = isset($bcachetime) ? (int)$bcachetime : 0; |
|
154 | + $bcachetime = isset($bcachetime) ? (int) $bcachetime : 0; |
|
155 | 155 | $options = isset($options) ? $options : array(); |
156 | 156 | $bcontent = isset($bcontent) ? $bcontent : ''; |
157 | 157 | $bctype = isset($bctype) ? $bctype : ''; |
@@ -252,27 +252,27 @@ discard block |
||
252 | 252 | $sql = sprintf('DELETE FROM %s WHERE block_id = %u', $db->prefix('block_module_link'), $bid); |
253 | 253 | $db->query($sql); |
254 | 254 | foreach ($bmodule as $bmid) { |
255 | - $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int)$bmid); |
|
255 | + $sql = sprintf('INSERT INTO %s (block_id, module_id) VALUES (%u, %d)', $db->prefix('block_module_link'), $bid, (int) $bmid); |
|
256 | 256 | $db->query($sql); |
257 | 257 | } |
258 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
258 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
259 | 259 | $xoopsTpl = new XoopsTpl(); |
260 | 260 | $xoopsTpl->xoops_setCaching(2); |
261 | 261 | if ($myblock->getVar('template') != '') { |
262 | - if ($xoopsTpl->is_cached('db:' . $myblock->getVar('template'))) { |
|
263 | - if (!$xoopsTpl->clear_cache('db:' . $myblock->getVar('template'))) { |
|
264 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
262 | + if ($xoopsTpl->is_cached('db:'.$myblock->getVar('template'))) { |
|
263 | + if (!$xoopsTpl->clear_cache('db:'.$myblock->getVar('template'))) { |
|
264 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
265 | 265 | } |
266 | 266 | } |
267 | 267 | } else { |
268 | - if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'block' . $bid)) { |
|
269 | - if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'block' . $bid)) { |
|
270 | - $msg = 'Unable to clear cache for block ID' . $bid; |
|
268 | + if ($xoopsTpl->is_cached('db:system_dummy.tpl', 'block'.$bid)) { |
|
269 | + if (!$xoopsTpl->clear_cache('db:system_dummy.tpl', 'block'.$bid)) { |
|
270 | + $msg = 'Unable to clear cache for block ID'.$bid; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | } |
274 | 274 | } else { |
275 | - $msg = 'Failed update of block. ID:' . $bid; |
|
275 | + $msg = 'Failed update of block. ID:'.$bid; |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | return $msg; // GIJ + |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | function xoops_module_update_smartfaq($module) |
10 | 10 | { |
11 | 11 | // Load SmartDbUpdater from the SmartObject Framework if present |
12 | - $smartdbupdater = XOOPS_ROOT_PATH . '/modules/smartobject/class/smartdbupdater.php'; |
|
12 | + $smartdbupdater = XOOPS_ROOT_PATH.'/modules/smartobject/class/smartdbupdater.php'; |
|
13 | 13 | if (!file_exists($smartdbupdater)) { |
14 | - $smartdbupdater = XOOPS_ROOT_PATH . '/modules/smartfaq/class/smartdbupdater.php'; |
|
14 | + $smartdbupdater = XOOPS_ROOT_PATH.'/modules/smartfaq/class/smartdbupdater.php'; |
|
15 | 15 | } |
16 | 16 | include_once $smartdbupdater; |
17 | 17 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | ob_start(); |
21 | 21 | |
22 | - echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>'; |
|
22 | + echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>'; |
|
23 | 23 | |
24 | 24 | // Adding partialview field |
25 | 25 | $table = new SmartDbTable('smartfaq_faq'); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Check for items with categoryid=0 |
72 | 72 | */ |
73 | - include_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php'; |
|
73 | + include_once XOOPS_ROOT_PATH.'/modules/smartfaq/include/functions.php'; |
|
74 | 74 | $smartfaq_faqHandler = $answerHandler = sf_gethandler('faq'); |
75 | 75 | $smartfaq_categoryHandler = $answerHandler = sf_gethandler('category'); |
76 | 76 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | ob_start(); |
106 | 106 | |
107 | - include_once XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/include/functions.php'; |
|
107 | + include_once XOOPS_ROOT_PATH.'/modules/'.$module->getVar('dirname').'/include/functions.php'; |
|
108 | 108 | |
109 | 109 | $feedback = ob_get_clean(); |
110 | 110 | if (method_exists($module, 'setMessage')) { |