@@ -131,7 +131,7 @@ |
||
131 | 131 | $oldFiles = array($xfHelper->path('include/functions.php'), |
132 | 132 | $xfHelper->path('class/utilities.php') |
133 | 133 | ); |
134 | - foreach($oldFiles as $file) { |
|
134 | + foreach ($oldFiles as $file) { |
|
135 | 135 | if (is_file($file)) { |
136 | 136 | if (false === ($delOk = unlink($file))) { |
137 | 137 | $module->setErrors(sprintf(_AM_XOOPSFAQ_ERROR_BAD_REMOVE, $file)); |
@@ -95,14 +95,14 @@ discard block |
||
95 | 95 | |
96 | 96 | include_once $GLOBALS['xoops']->path('/class/xoopsformloader.php'); |
97 | 97 | |
98 | - $caption = ($this->isNew()) ? _AM_XOOPSFAQ_CREATE_NEW: sprintf(_AM_XOOPSFAQ_MODIFY_ITEM, $this->getVar('contents_title')); |
|
98 | + $caption = ($this->isNew()) ? _AM_XOOPSFAQ_CREATE_NEW : sprintf(_AM_XOOPSFAQ_MODIFY_ITEM, $this->getVar('contents_title')); |
|
99 | 99 | $form = new XoopsThemeForm($caption, 'content', $_SERVER['REQUEST_URI'], 'post', true); |
100 | 100 | // $form->addElement(new XoopsFormHiddenToken()); |
101 | 101 | $form->addElement(new xoopsFormHidden('op', 'save')); |
102 | 102 | $form->addElement(new xoopsFormHidden('contents_id', $this->getVar('contents_id', 'e'))); |
103 | 103 | |
104 | 104 | // Active |
105 | - $contents_active = new XoopsFormRadioYN(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE, 'contents_active', $this->getVar('contents_active', 'e'), ' ' . _YES . '', ' ' . _NO . '' ); |
|
105 | + $contents_active = new XoopsFormRadioYN(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE, 'contents_active', $this->getVar('contents_active', 'e'), ' ' . _YES . '', ' ' . _NO . ''); |
|
106 | 106 | $contents_active->setDescription(_AM_XOOPSFAQ_E_CONTENTS_ACTIVE_DESC); |
107 | 107 | $form->addElement($contents_active, false); |
108 | 108 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $form->addElement($contents_weight, false); |
128 | 128 | |
129 | 129 | // Editor |
130 | - $options_tray = new XoopsFormElementTray(_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>'); |
|
130 | + $options_tray = new XoopsFormElementTray(_AM_XOOPSFAQ_E_CONTENTS_CONTENT, '<br>'); |
|
131 | 131 | if (class_exists('XoopsFormEditor')) { |
132 | 132 | // $editorConfigs = array('editor' => $GLOBALS['xoopsConfig']['general_editor'], |
133 | 133 | $editorConfigs = array('editor' => $xfHelper->getConfig('use_wysiwyg', 'dhtmltextarea'), |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | $criteria->setLimit(0); |
256 | 256 | $obj['list'] = $this->getObjects($criteria, false); |
257 | 257 | } else { |
258 | - $obj['list'] = $this->getObjects($sort, false); |
|
258 | + $obj['list'] = $this->getObjects($sort, false); |
|
259 | 259 | } |
260 | 260 | $obj['count'] = (false !== $obj['list']) ? count($obj['list']) : 0; |
261 | 261 | return $obj; |
@@ -27,13 +27,13 @@ |
||
27 | 27 | /** @var Xmf\Module\Helper\GenericHelper $xfHelper */ |
28 | 28 | $myts = MyTextSanitizer::getInstance(); |
29 | 29 | |
30 | - $moduleDirName = basename(dirname(__DIR__)) ; |
|
30 | + $moduleDirName = basename(dirname(__DIR__)); |
|
31 | 31 | $xfHelper = Xmf\Module\Helper::getHelper($moduleDirName); |
32 | 32 | $xfCatHandler = $xfHelper->getHandler('category'); |
33 | 33 | $catList = $xfCatHandler->getList(); |
34 | 34 | |
35 | - $retVal = array() ; |
|
36 | - foreach ($catList as $id=>$title){ |
|
35 | + $retVal = array(); |
|
36 | + foreach ($catList as $id=>$title) { |
|
37 | 37 | $retVal['parent'][] = array('id' => $id, |
38 | 38 | 'title' => $myts->htmlSpecialChars($title), |
39 | 39 | 'url' => $xfHelper->url('index.php?cat_id=' . $id) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | return $ret; |
44 | 44 | } |
45 | 45 | |
46 | - $moduleDirName = basename(dirname(__DIR__)) ; |
|
46 | + $moduleDirName = basename(dirname(__DIR__)); |
|
47 | 47 | xoops_load('constants', $moduleDirName); |
48 | 48 | |
49 | 49 | /** @var XoopsfaqCategoryHandler $xfCatHandler */ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $catCount = !empty($catArray) ? count($catArray) : 0; |
74 | 74 | $totalLimit = (int)$limit - $catCount; |
75 | 75 | foreach ($catArray as $cId => $cat) { |
76 | - $ret[] = array ('image' => 'assets/images/folder.png', |
|
76 | + $ret[] = array('image' => 'assets/images/folder.png', |
|
77 | 77 | 'link' => $xfHelper->url('index.php?cat_id=' . $cId), |
78 | 78 | 'title' => $cat['category_title'], |
79 | 79 | ); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | $contentArray = $xfFaqHandler->getAll($criteria, $contentFields, false); |
105 | 105 | foreach ($contentArray as $content) { |
106 | - $ret[] = array ('image' => 'assets/images/question2.gif', |
|
106 | + $ret[] = array('image' => 'assets/images/question2.gif', |
|
107 | 107 | 'link' => $xfHelper->url('index.php?cat_id=' . $content['contents_cid'] . '#q' . $content['contents_id']), |
108 | 108 | 'title' => $content['contents_title'], |
109 | 109 | 'time' => $content['contents_publish'], |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | /** @var XoopsObject $contentObj */ |
60 | 60 | foreach ($contentObjs as $contentObj) { |
61 | - $retVal[] = array ('image' => '', |
|
61 | + $retVal[] = array('image' => '', |
|
62 | 62 | 'title' => $contentObj->getVar('contents_title'), |
63 | 63 | 'link' => $contentObj->getVar('contents_contents'), |
64 | 64 | 'time' => $contentObj->getVar('contents_publish'), |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $moduleDirName = basename(dirname(__DIR__)); |
39 | 39 | xoops_load('constants', $moduleDirName); |
40 | 40 | |
41 | - $myts = MyTextSanitizer::getInstance(); |
|
41 | + $myts = MyTextSanitizer::getInstance(); |
|
42 | 42 | |
43 | 43 | /** @var XoopsfaqCategoryHandler $xfCatHandler */ |
44 | 44 | /** @var XoopsfaqContentsHandler $xfFaqHandler */ |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $moduleDirName = basename(dirname(__DIR__)); |
40 | 40 | xoops_load('constants', $moduleDirName); |
41 | 41 | |
42 | - $myts = MyTextSanitizer::getInstance(); |
|
42 | + $myts = MyTextSanitizer::getInstance(); |
|
43 | 43 | |
44 | 44 | /** @var XoopsfaqCategoryHandler $xfCatHandler */ |
45 | 45 | /** @var XoopsfaqContentsHandler $xfFaqHandler */ |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $faqTitle = $myts->displayTarea($faqObj->getVar('contents_title')); |
85 | 85 | if (!empty($options[1])) { |
86 | 86 | $txtAns = strip_tags($faqObj->getVar('contents_contents')); // get rid of html for block |
87 | - $faqAns = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0 ,0 ,0 ,0); |
|
87 | + $faqAns = $myts->displayTarea(xoops_substr($txtAns, 0, $options[1]), 0, 0, 0, 0, 0); |
|
88 | 88 | } else { |
89 | 89 | $faqAns = $myts->displayTarea($faqObj->getVar('contents_contents'), |
90 | 90 | (int)$faqObj->getVar('dohtml'), |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $formSelect->addOptionArray($optionArray); |
131 | 131 | $selOptions = (false === strpos($options[3], ',')) ? $options[3] : explode(',', $options[3]); |
132 | 132 | $formSelect->setValue($selOptions); |
133 | - $selectCat = $formSelect->render(); |
|
133 | + $selectCat = $formSelect->render(); |
|
134 | 134 | |
135 | 135 | $ychck = (isset($options[2]) && ($options[2] > 0)) ? ' checked' : ''; |
136 | 136 | $nchck = !empty($ychck) ? '' : ' checked'; |