@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */ |
37 | 37 | $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq'); |
38 | 38 | // creating the FAQ objects that belong to the selected category |
39 | - $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
39 | + $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
40 | 40 | |
41 | 41 | if ($faqsObj) { |
42 | 42 | foreach ($faqsObj as $iValue) { |
@@ -69,40 +69,40 @@ discard block |
||
69 | 69 | |
70 | 70 | $form = Smartfaq\Utility::createCategorySelect($options[0]); |
71 | 71 | |
72 | - $form .= ' <br>' . _MB_SF_ORDER . " <select name='options[]'>"; |
|
72 | + $form .= ' <br>'._MB_SF_ORDER." <select name='options[]'>"; |
|
73 | 73 | |
74 | 74 | $form .= "<option value='datesub'"; |
75 | 75 | if ('datesub' === $options[1]) { |
76 | 76 | $form .= ' selected'; |
77 | 77 | } |
78 | - $form .= '>' . _MB_SF_DATE . "</option>\n"; |
|
78 | + $form .= '>'._MB_SF_DATE."</option>\n"; |
|
79 | 79 | |
80 | 80 | $form .= "<option value='counter'"; |
81 | 81 | if ('counter' === $options[1]) { |
82 | 82 | $form .= ' selected'; |
83 | 83 | } |
84 | - $form .= '>' . _MB_SF_HITS . "</option>\n"; |
|
84 | + $form .= '>'._MB_SF_HITS."</option>\n"; |
|
85 | 85 | |
86 | 86 | $form .= "<option value='weight'"; |
87 | 87 | if ('weight' === $options[1]) { |
88 | 88 | $form .= ' selected'; |
89 | 89 | } |
90 | - $form .= '>' . _MB_SF_WEIGHT . "</option>\n"; |
|
90 | + $form .= '>'._MB_SF_WEIGHT."</option>\n"; |
|
91 | 91 | |
92 | 92 | $form .= "</select>\n"; |
93 | 93 | |
94 | - $form .= ' ' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_FAQS . ''; |
|
95 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[3] . "'> " . _MB_SF_LENGTH . ''; |
|
94 | + $form .= ' '._MB_SF_DISP." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_FAQS.''; |
|
95 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[3]."'> "._MB_SF_LENGTH.''; |
|
96 | 96 | |
97 | - $form .= '<br>' . _MB_SF_SHOW_DATE . " <input type='radio' id='options[]' name='options[]' value='1'"; |
|
97 | + $form .= '<br>'._MB_SF_SHOW_DATE." <input type='radio' id='options[]' name='options[]' value='1'"; |
|
98 | 98 | if (1 == $options[4]) { |
99 | 99 | $form .= ' checked'; |
100 | 100 | } |
101 | - $form .= '> ' . _YES . "<input type='radio' id='options[]' name='options[]' value='0'"; |
|
101 | + $form .= '> '._YES."<input type='radio' id='options[]' name='options[]' value='0'"; |
|
102 | 102 | if (0 == $options[4]) { |
103 | 103 | $form .= ' checked'; |
104 | 104 | } |
105 | - $form .= '> ' . _NO . ''; |
|
105 | + $form .= '> '._NO.''; |
|
106 | 106 | |
107 | 107 | return $form; |
108 | 108 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** @var \XoopsModules\Smartfaq\FaqHandler $faqHandler */ |
35 | 35 | $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq'); |
36 | 36 | // creating the FAQ objects that belong to the selected category |
37 | - $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
37 | + $faqsObj = $faqHandler->getAllPublished($limit, 0, $categoryid, $sort); |
|
38 | 38 | |
39 | 39 | if ($faqsObj) { |
40 | 40 | foreach ($faqsObj as $iValue) { |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | |
61 | 61 | $form = Smartfaq\Utility::createCategorySelect($options[0]); |
62 | 62 | |
63 | - $form .= ' <br>' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[1] . "'> " . _MB_SF_FAQS . ''; |
|
64 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_LENGTH . ''; |
|
63 | + $form .= ' <br>'._MB_SF_DISP." <input type='text' name='options[]' value='".$options[1]."'> "._MB_SF_FAQS.''; |
|
64 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_LENGTH.''; |
|
65 | 65 | |
66 | 66 | return $form; |
67 | 67 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | $memberHandler = xoops_getHandler('member'); |
65 | - $users = $memberHandler->getUsers(new \Criteria('uid', '(' . implode(',', array_keys($userids)) . ')', 'IN'), true); |
|
65 | + $users = $memberHandler->getUsers(new \Criteria('uid', '('.implode(',', array_keys($userids)).')', 'IN'), true); |
|
66 | 66 | foreach ($faqsObj as $iValue) { |
67 | 67 | $faqs['categoryid'] = $iValue->categoryid(); |
68 | 68 | $faqs['question'] = $iValue->question($maxQuestionLength); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $block['lang_poster'] = _MB_SF_ANSWEREDBY; |
85 | 85 | $block['lang_date'] = _MB_SF_DATE; |
86 | 86 | $modulename = $myts->htmlSpecialChars($smartModule->getVar('name')); |
87 | - $block['lang_visitfaq'] = _MB_SF_VISITFAQ . ' ' . $modulename; |
|
87 | + $block['lang_visitfaq'] = _MB_SF_VISITFAQ.' '.$modulename; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | return $block; |
@@ -100,30 +100,30 @@ discard block |
||
100 | 100 | |
101 | 101 | $form = Smartfaq\Utility::createCategorySelect($options[0]); |
102 | 102 | |
103 | - $form .= ' <br>' . _MB_SF_ORDER . " <select name='options[]'>"; |
|
103 | + $form .= ' <br>'._MB_SF_ORDER." <select name='options[]'>"; |
|
104 | 104 | |
105 | 105 | $form .= "<option value='datesub'"; |
106 | 106 | if ('datesub' === $options[1]) { |
107 | 107 | $form .= ' selected'; |
108 | 108 | } |
109 | - $form .= '>' . _MB_SF_DATE . "</option>\n"; |
|
109 | + $form .= '>'._MB_SF_DATE."</option>\n"; |
|
110 | 110 | |
111 | 111 | $form .= "<option value='counter'"; |
112 | 112 | if ('counter' === $options[1]) { |
113 | 113 | $form .= ' selected'; |
114 | 114 | } |
115 | - $form .= '>' . _MB_SF_HITS . "</option>\n"; |
|
115 | + $form .= '>'._MB_SF_HITS."</option>\n"; |
|
116 | 116 | |
117 | 117 | $form .= "<option value='weight'"; |
118 | 118 | if ('weight' === $options[1]) { |
119 | 119 | $form .= ' selected'; |
120 | 120 | } |
121 | - $form .= '>' . _MB_SF_WEIGHT . "</option>\n"; |
|
121 | + $form .= '>'._MB_SF_WEIGHT."</option>\n"; |
|
122 | 122 | |
123 | 123 | $form .= "</select>\n"; |
124 | 124 | |
125 | - $form .= ' ' . _MB_SF_DISP . " <input type='text' name='options[]' value='" . $options[2] . "'> " . _MB_SF_FAQS . ''; |
|
126 | - $form .= ' <br>' . _MB_SF_CHARS . " <input type='text' name='options[]' value='" . $options[3] . "'> " . _MB_SF_LENGTH . ''; |
|
125 | + $form .= ' '._MB_SF_DISP." <input type='text' name='options[]' value='".$options[2]."'> "._MB_SF_FAQS.''; |
|
126 | + $form .= ' <br>'._MB_SF_CHARS." <input type='text' name='options[]' value='".$options[3]."'> "._MB_SF_LENGTH.''; |
|
127 | 127 | |
128 | 128 | return $form; |
129 | 129 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $faqHandler = \XoopsModules\Smartfaq\Helper::getInstance()->getHandler('Faq'); |
29 | 29 | |
30 | 30 | // creating the FAQ objects that belong to the selected category |
31 | - $faqsObj = $faqHandler->getContextualFaqs($limit); |
|
31 | + $faqsObj = $faqHandler->getContextualFaqs($limit); |
|
32 | 32 | |
33 | 33 | if ($faqsObj) { |
34 | 34 | foreach ($faqsObj as $iValue) { |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | */ |
49 | 49 | function b_faqs_context_edit($options) |
50 | 50 | { |
51 | - $form = '' . _MB_SF_DISP . ' '; |
|
52 | - $form .= "<input type='text' name='options[]' value='" . $options[0] . "'> " . _MB_SF_FAQS . ''; |
|
51 | + $form = ''._MB_SF_DISP.' '; |
|
52 | + $form .= "<input type='text' name='options[]' value='".$options[0]."'> "._MB_SF_FAQS.''; |
|
53 | 53 | |
54 | 54 | return $form; |
55 | 55 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $filename = 'open_category.php'; |
167 | 167 | } |
168 | 168 | if ($withAllLink) { |
169 | - $ret = "<a href='" . XOOPS_URL . '/modules/smartfaq/' . $filename . '?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>'; |
|
169 | + $ret = "<a href='".XOOPS_URL.'/modules/smartfaq/'.$filename.'?categoryid='.$this->categoryid()."'>".$this->name().'</a>'; |
|
170 | 170 | } else { |
171 | 171 | $ret = $this->name(); |
172 | 172 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | exit; |
180 | 180 | } |
181 | 181 | $parentid = $parentObj->parentid(); |
182 | - $ret = $parentObj->getCategoryPath(true, $open) . ' > ' . $ret; |
|
182 | + $ret = $parentObj->getCategoryPath(true, $open).' > '.$ret; |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | return $ret; |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $tags = []; |
237 | 237 | $tags['MODULE_NAME'] = $myts->htmlSpecialChars($smartModule->getVar('name')); |
238 | 238 | $tags['CATEGORY_NAME'] = $this->name(); |
239 | - $tags['CATEGORY_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/category.php?categoryid=' . $this->categoryid(); |
|
239 | + $tags['CATEGORY_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/category.php?categoryid='.$this->categoryid(); |
|
240 | 240 | |
241 | 241 | $notificationHandler = xoops_getHandler('notification'); |
242 | 242 | $notificationHandler->triggerEvent('global_faq', 0, 'category_created', $tags); |
@@ -252,9 +252,9 @@ discard block |
||
252 | 252 | $category['categoryid'] = $this->categoryid(); |
253 | 253 | $category['name'] = $this->name(); |
254 | 254 | if (false !== $open) { |
255 | - $category['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/open_category.php?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>'; |
|
255 | + $category['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/open_category.php?categoryid='.$this->categoryid()."'>".$this->name().'</a>'; |
|
256 | 256 | } else { |
257 | - $category['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/category.php?categoryid=' . $this->categoryid() . "'>" . $this->name() . '</a>'; |
|
257 | + $category['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/category.php?categoryid='.$this->categoryid()."'>".$this->name().'</a>'; |
|
258 | 258 | } |
259 | 259 | $category['total'] = $this->getVar('faqcount'); |
260 | 260 | $category['description'] = $this->description(); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | { |
72 | 72 | $ret = false; |
73 | 73 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
74 | - $class = '\\XoopsModules\\' . ucfirst(strtolower(basename(dirname(__DIR__)))) . '\\' . $name . 'Handler'; |
|
74 | + $class = '\\XoopsModules\\'.ucfirst(strtolower(basename(dirname(__DIR__)))).'\\'.$name.'Handler'; |
|
75 | 75 | $ret = new $class($db); |
76 | 76 | return $ret; |
77 | 77 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
14 | 14 | |
15 | -require_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
15 | +require_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Class Uploader |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * |
21 | 21 | */ |
22 | 22 | |
23 | -require_once __DIR__ . '/../../include/common.php'; |
|
23 | +require_once __DIR__.'/../../include/common.php'; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Class Configurator |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | class Configurator |
29 | 29 | { |
30 | 30 | public $uploadFolders = []; |
31 | - public $blankFiles = []; |
|
31 | + public $blankFiles = []; |
|
32 | 32 | public $templateFolders = []; |
33 | 33 | public $oldFiles = []; |
34 | 34 | public $oldFolders = []; |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | $capsDirName = strtoupper($moduleDirName); |
44 | 44 | $this->name = 'Module Configurator'; |
45 | 45 | $this->uploadFolders = [ |
46 | - constant($capsDirName . '_UPLOAD_PATH'), |
|
47 | - constant($capsDirName . '_UPLOAD_PATH') . '/content', |
|
48 | - constant($capsDirName . '_UPLOAD_PATH') . '/images', |
|
49 | - constant($capsDirName . '_UPLOAD_PATH') . '/images/category', |
|
50 | - constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails', |
|
46 | + constant($capsDirName.'_UPLOAD_PATH'), |
|
47 | + constant($capsDirName.'_UPLOAD_PATH').'/content', |
|
48 | + constant($capsDirName.'_UPLOAD_PATH').'/images', |
|
49 | + constant($capsDirName.'_UPLOAD_PATH').'/images/category', |
|
50 | + constant($capsDirName.'_UPLOAD_PATH').'/images/thumbnails', |
|
51 | 51 | ]; |
52 | 52 | $this->blankFiles = [ |
53 | - constant($capsDirName . '_UPLOAD_PATH'), |
|
54 | - constant($capsDirName . '_UPLOAD_PATH') . '/images/category', |
|
55 | - constant($capsDirName . '_UPLOAD_PATH') . '/images/thumbnails', |
|
53 | + constant($capsDirName.'_UPLOAD_PATH'), |
|
54 | + constant($capsDirName.'_UPLOAD_PATH').'/images/category', |
|
55 | + constant($capsDirName.'_UPLOAD_PATH').'/images/thumbnails', |
|
56 | 56 | ]; |
57 | 57 | |
58 | 58 | $this->templateFolders = [ |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | '/templates/admin/' |
62 | 62 | |
63 | 63 | ]; |
64 | - $this->oldFiles = [ |
|
64 | + $this->oldFiles = [ |
|
65 | 65 | '/class/request.php', |
66 | 66 | '/class/registry.php', |
67 | 67 | '/class/utilities.php', |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | '/include/functions.php', |
71 | 71 | '/ajaxrating.txt' |
72 | 72 | ]; |
73 | - $this->oldFolders = [ |
|
73 | + $this->oldFolders = [ |
|
74 | 74 | '/images', |
75 | 75 | '/css', |
76 | 76 | '/js', |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | //check for minimum XOOPS version |
38 | 38 | $currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string |
39 | 39 | if (null === $requiredVer) { |
40 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
40 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
41 | 41 | } |
42 | - $success = true; |
|
42 | + $success = true; |
|
43 | 43 | |
44 | 44 | if (version_compare($currentVer, $requiredVer, '<')) { |
45 | - $success = false; |
|
46 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
45 | + $success = false; |
|
46 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | return $success; |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | // check for minimum PHP version |
64 | 64 | $success = true; |
65 | 65 | $verNum = PHP_VERSION; |
66 | - $reqVer =& $module->getInfo('min_php'); |
|
66 | + $reqVer = & $module->getInfo('min_php'); |
|
67 | 67 | if (false !== $reqVer && '' !== $reqVer) { |
68 | 68 | if (version_compare($verNum, $reqVer, '<')) { |
69 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
69 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
70 | 70 | $success = false; |
71 | 71 | } |
72 | 72 | } |