@@ -28,42 +28,42 @@ discard block |
||
28 | 28 | if (empty($fct)) { |
29 | 29 | $fct = 'preferences'; |
30 | 30 | } |
31 | -include __DIR__ . '/../../../mainfile.php'; |
|
32 | -include XOOPS_ROOT_PATH . '/include/cp_functions.php'; |
|
31 | +include __DIR__.'/../../../mainfile.php'; |
|
32 | +include XOOPS_ROOT_PATH.'/include/cp_functions.php'; |
|
33 | 33 | |
34 | -require_once XOOPS_ROOT_PATH . '/kernel/module.php'; |
|
34 | +require_once XOOPS_ROOT_PATH.'/kernel/module.php'; |
|
35 | 35 | |
36 | 36 | $admintest = 0; |
37 | 37 | |
38 | 38 | if (is_object($xoopsUser)) { |
39 | 39 | $xoopsModule = XoopsModule::getByDirname('system'); |
40 | 40 | if (!$xoopsUser->isAdmin($xoopsModule->mid())) { |
41 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
41 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
42 | 42 | } |
43 | 43 | $admintest = 1; |
44 | 44 | } else { |
45 | - redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM); |
|
45 | + redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // include system category definitions |
49 | -require_once XOOPS_ROOT_PATH . '/modules/system/constants.php'; |
|
49 | +require_once XOOPS_ROOT_PATH.'/modules/system/constants.php'; |
|
50 | 50 | $error = false; |
51 | 51 | if (0 != $admintest) { |
52 | 52 | if (isset($fct) && '' != $fct) { |
53 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) { |
|
53 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php')) { |
|
54 | 54 | xoops_loadLanguage('admin', 'system'); |
55 | - xoops_loadLanguage('admin/' . $fct, 'system'); |
|
55 | + xoops_loadLanguage('admin/'.$fct, 'system'); |
|
56 | 56 | |
57 | - include XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php'; |
|
57 | + include XOOPS_ROOT_PATH.'/modules/system/admin/'.$fct.'/xoops_version.php'; |
|
58 | 58 | $syspermHandler = xoops_getHandler('groupperm'); |
59 | 59 | $category = !empty($modversion['category']) ? (int)$modversion['category'] : 0; |
60 | 60 | unset($modversion); |
61 | 61 | if ($category > 0) { |
62 | - $groups =& $xoopsUser->getGroups(); |
|
62 | + $groups = & $xoopsUser->getGroups(); |
|
63 | 63 | if (in_array(XOOPS_GROUP_ADMIN, $groups) |
64 | 64 | || false !== $syspermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) { |
65 | 65 | if (file_exists("../include/{$fct}.inc.php")) { |
66 | - require_once __DIR__ . "/../include/{$fct}.inc.php"; |
|
66 | + require_once __DIR__."/../include/{$fct}.inc.php"; |
|
67 | 67 | } else { |
68 | 68 | $error = true; |
69 | 69 | } |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | $error = true; |
72 | 72 | } |
73 | 73 | } elseif ('version' === $fct) { |
74 | - if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) { |
|
75 | - require_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php'; |
|
74 | + if (file_exists(XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php')) { |
|
75 | + require_once XOOPS_ROOT_PATH.'/modules/system/admin/version/main.php'; |
|
76 | 76 | } else { |
77 | 77 | $error = true; |
78 | 78 | } |
@@ -92,26 +92,26 @@ discard block |
||
92 | 92 | echo '<h4>System Configuration</h4>'; |
93 | 93 | echo '<table class="outer" cellpadding="4" cellspacing="1">'; |
94 | 94 | echo '<tr>'; |
95 | - $groups =& $xoopsUser->getGroups(); |
|
95 | + $groups = & $xoopsUser->getGroups(); |
|
96 | 96 | $all_ok = false; |
97 | 97 | if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { |
98 | 98 | $syspermHandler = xoops_getHandler('groupperm'); |
99 | - $ok_syscats =& $syspermHandler->getItemIds('system_admin', $groups); |
|
99 | + $ok_syscats = & $syspermHandler->getItemIds('system_admin', $groups); |
|
100 | 100 | } else { |
101 | 101 | $all_ok = true; |
102 | 102 | } |
103 | - $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin'; |
|
103 | + $admin_dir = XOOPS_ROOT_PATH.'/modules/system/admin'; |
|
104 | 104 | $handle = opendir($admin_dir); |
105 | 105 | $counter = 0; |
106 | 106 | $class = 'even'; |
107 | 107 | while ($file = readdir($handle)) { |
108 | - if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) { |
|
109 | - include $admin_dir . '/' . $file . '/xoops_version.php'; |
|
108 | + if ('cvs' !== strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir.'/'.$file)) { |
|
109 | + include $admin_dir.'/'.$file.'/xoops_version.php'; |
|
110 | 110 | if ($modversion['hasAdmin']) { |
111 | 111 | $category = isset($modversion['category']) ? (int)$modversion['category'] : 0; |
112 | 112 | if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) { |
113 | 113 | echo "<td class='$class' align='center' valign='bottom' width='19%'>"; |
114 | - echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n"; |
|
114 | + echo "<a href='".XOOPS_URL.'/modules/system/admin.php?fct='.$file."'><b>".trim($modversion['name'])."</b></a>\n"; |
|
115 | 115 | echo '</td>'; |
116 | 116 | ++$counter; |
117 | 117 | $class = ('even' === $class) ? 'odd' : 'even'; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } |
127 | 127 | } |
128 | 128 | while ($counter < 5) { |
129 | - echo '<td class="' . $class . '"> </td>'; |
|
129 | + echo '<td class="'.$class.'"> </td>'; |
|
130 | 130 | $class = ('even' === $class) ? 'odd' : 'even'; |
131 | 131 | ++$counter; |
132 | 132 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | if (0 != $maxLength) { |
188 | 188 | if (!XOOPS_USE_MULTIBYTES) { |
189 | 189 | if (strlen($ret) >= $maxLength) { |
190 | - $ret = substr($ret, 0, $maxLength - 1) . '...'; |
|
190 | + $ret = substr($ret, 0, $maxLength - 1).'...'; |
|
191 | 191 | } |
192 | 192 | } |
193 | 193 | } |
@@ -379,14 +379,14 @@ discard block |
||
379 | 379 | $theAnswers = $answerHandler->getAllAnswers($this->faqid(), Constants::SF_AN_STATUS_APPROVED, 1, 0); |
380 | 380 | //echo "test"; |
381 | 381 | //exit; |
382 | - $this->answer =& $theAnswers[0]; |
|
382 | + $this->answer = & $theAnswers[0]; |
|
383 | 383 | break; |
384 | 384 | |
385 | 385 | case Constants::SF_STATUS_ANSWERED: |
386 | 386 | $theAnswers = $answerHandler->getAllAnswers($this->faqid(), Constants::SF_AN_STATUS_PROPOSED, 1, 0); |
387 | 387 | //echo "test"; |
388 | 388 | //exit; |
389 | - $this->answer =& $theAnswers[0]; |
|
389 | + $this->answer = & $theAnswers[0]; |
|
390 | 390 | break; |
391 | 391 | |
392 | 392 | case Constants::SF_STATUS_PUBLISHED: |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | $tags['MODULE_NAME'] = $myts->displayTarea($smartModule->getVar('name')); |
473 | 473 | $tags['FAQ_NAME'] = $this->question(); |
474 | 474 | $tags['CATEGORY_NAME'] = $this->getCategoryName(); |
475 | - $tags['CATEGORY_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/category.php?categoryid=' . $this->categoryid(); |
|
475 | + $tags['CATEGORY_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/category.php?categoryid='.$this->categoryid(); |
|
476 | 476 | $tags['FAQ_QUESTION'] = $this->question(); |
477 | 477 | $answerObj = $this->answer(); |
478 | 478 | if (is_object($answerObj)) { |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | foreach ($notifications as $notification) { |
485 | 485 | switch ($notification) { |
486 | 486 | case Constants::SF_NOT_FAQ_PUBLISHED: |
487 | - $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/faq.php?faqid=' . $this->faqid(); |
|
487 | + $tags['FAQ_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/faq.php?faqid='.$this->faqid(); |
|
488 | 488 | |
489 | 489 | $notificationHandler->triggerEvent('global_faq', 0, 'published', $tags); |
490 | 490 | $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'published', $tags); |
@@ -492,20 +492,20 @@ discard block |
||
492 | 492 | break; |
493 | 493 | |
494 | 494 | case Constants::SF_NOT_FAQ_SUBMITTED: |
495 | - $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/faq.php?faqid=' . $this->faqid(); |
|
495 | + $tags['WAITINGFILES_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/admin/faq.php?faqid='.$this->faqid(); |
|
496 | 496 | $notificationHandler->triggerEvent('global_faq', 0, 'submitted', $tags); |
497 | 497 | $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'submitted', $tags); |
498 | 498 | break; |
499 | 499 | |
500 | 500 | case Constants::SF_NOT_QUESTION_PUBLISHED: |
501 | - $tags['FAQ_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/answer.php?faqid=' . $this->faqid(); |
|
501 | + $tags['FAQ_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/answer.php?faqid='.$this->faqid(); |
|
502 | 502 | $notificationHandler->triggerEvent('global_question', 0, 'published', $tags); |
503 | 503 | $notificationHandler->triggerEvent('category_question', $this->categoryid(), 'published', $tags); |
504 | 504 | $notificationHandler->triggerEvent('question', $this->faqid(), 'approved', $tags); |
505 | 505 | break; |
506 | 506 | |
507 | 507 | case Constants::SF_NOT_QUESTION_SUBMITTED: |
508 | - $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/question.php?op=mod&faqid=' . $this->faqid(); |
|
508 | + $tags['WAITINGFILES_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/admin/question.php?op=mod&faqid='.$this->faqid(); |
|
509 | 509 | $notificationHandler->triggerEvent('global_question', 0, 'submitted', $tags); |
510 | 510 | $notificationHandler->triggerEvent('category_question', $this->categoryid(), 'submitted', $tags); |
511 | 511 | break; |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | break; |
516 | 516 | |
517 | 517 | case Constants::SF_NOT_NEW_ANSWER_PROPOSED: |
518 | - $tags['WAITINGFILES_URL'] = XOOPS_URL . '/modules/' . $smartModule->getVar('dirname') . '/admin/answer.php?op=mod&faqid=' . $this->faqid(); |
|
518 | + $tags['WAITINGFILES_URL'] = XOOPS_URL.'/modules/'.$smartModule->getVar('dirname').'/admin/answer.php?op=mod&faqid='.$this->faqid(); |
|
519 | 519 | $notificationHandler->triggerEvent('global_faq', 0, 'answer_proposed', $tags); |
520 | 520 | $notificationHandler->triggerEvent('category_faq', $this->categoryid(), 'answer_proposed', $tags); |
521 | 521 | break; |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | $text = _MD_SF_FAQCOMEFROM; |
630 | 630 | } |
631 | 631 | |
632 | - return $text . $xoopsConfig['sitename'] . ' : <a href=' . XOOPS_URL . '/modules/smartfaq/faq.php?faqid=' . $this->faqid() . '>' . XOOPS_URL . '/modules/smartfaq/faq.php?faqid=' . $this->faqid() . '</a>'; |
|
632 | + return $text.$xoopsConfig['sitename'].' : <a href='.XOOPS_URL.'/modules/smartfaq/faq.php?faqid='.$this->faqid().'>'.XOOPS_URL.'/modules/smartfaq/faq.php?faqid='.$this->faqid().'</a>'; |
|
633 | 633 | } |
634 | 634 | |
635 | 635 | /** |
@@ -648,9 +648,9 @@ discard block |
||
648 | 648 | $faq['question'] = $this->question(); |
649 | 649 | $page = (Constants::SF_STATUS_OPENED == $this->status()) ? 'answer.php' : 'faq.php'; |
650 | 650 | |
651 | - $faq['questionlink'] = "<a href='$page?faqid=" . $this->faqid() . "'>" . $this->question($lastfaqsize) . '</a>'; |
|
651 | + $faq['questionlink'] = "<a href='$page?faqid=".$this->faqid()."'>".$this->question($lastfaqsize).'</a>'; |
|
652 | 652 | if ($linkInQuestion) { |
653 | - $faq['fullquestionlink'] = "<a href='$page?faqid=" . $this->faqid() . "'>" . $this->question() . '</a>'; |
|
653 | + $faq['fullquestionlink'] = "<a href='$page?faqid=".$this->faqid()."'>".$this->question().'</a>'; |
|
654 | 654 | } else { |
655 | 655 | $faq['fullquestionlink'] = $this->question(); |
656 | 656 | } |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | $categoryObj = $category[$this->categoryid()]; |
667 | 667 | } |
668 | 668 | $faq['categoryname'] = $categoryObj->getVar('name'); |
669 | - $faq['categorylink'] = "<a href='" . XOOPS_URL . '/modules/smartfaq/category.php?categoryid=' . $this->categoryid() . "'>" . $categoryObj->getVar('name') . '</a>'; |
|
669 | + $faq['categorylink'] = "<a href='".XOOPS_URL.'/modules/smartfaq/category.php?categoryid='.$this->categoryid()."'>".$categoryObj->getVar('name').'</a>'; |
|
670 | 670 | } |
671 | 671 | |
672 | 672 | return $faq; |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | |
28 | 28 | // defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
29 | 29 | |
30 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelement.php'; |
|
31 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhidden.php'; |
|
32 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formhiddentoken.php'; |
|
33 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formbutton.php'; |
|
34 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/formelementtray.php'; |
|
35 | -require_once XOOPS_ROOT_PATH . '/class/xoopsform/form.php'; |
|
30 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php'; |
|
31 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php'; |
|
32 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhiddentoken.php'; |
|
33 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php'; |
|
34 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php'; |
|
35 | +require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php'; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Renders a form for setting module specific group permissions |
@@ -162,11 +162,11 @@ discard block |
||
162 | 162 | } |
163 | 163 | $gpermHandler = xoops_getHandler('groupperm'); |
164 | 164 | $memberHandler = xoops_getHandler('member'); |
165 | - $glist =& $memberHandler->getGroupList(); |
|
165 | + $glist = & $memberHandler->getGroupList(); |
|
166 | 166 | foreach (array_keys($glist) as $i) { |
167 | 167 | // get selected item id(s) for each group |
168 | 168 | $selected = $gpermHandler->getItemIds($this->_permName, $i, $this->_modid); |
169 | - $ele = new Smartfaq\GroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected); |
|
169 | + $ele = new Smartfaq\GroupFormCheckBox($glist[$i], 'perms['.$this->_permName.']', $i, $selected); |
|
170 | 170 | $ele->setOptionTree($this->_itemTree); |
171 | 171 | |
172 | 172 | foreach ($this->_appendix as $key => $append) { |
@@ -193,18 +193,18 @@ discard block |
||
193 | 193 | $tray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
194 | 194 | $this->addElement($tray); |
195 | 195 | |
196 | - $ret = '<h4>' . $this->getTitle() . '</h4>' . $this->_permDesc . '<br>'; |
|
197 | - $ret .= "<form name='" . $this->getName() . "' id='" . $this->getName() . "' action='" . $this->getAction() . "' method='" . $this->getMethod() . "'" . $this->getExtra() . ">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
198 | - $elements =& $this->getElements(); |
|
196 | + $ret = '<h4>'.$this->getTitle().'</h4>'.$this->_permDesc.'<br>'; |
|
197 | + $ret .= "<form name='".$this->getName()."' id='".$this->getName()."' action='".$this->getAction()."' method='".$this->getMethod()."'".$this->getExtra().">\n<table width='100%' class='outer' cellspacing='1'>\n"; |
|
198 | + $elements = & $this->getElements(); |
|
199 | 199 | foreach (array_keys($elements) as $i) { |
200 | 200 | if (!is_object($elements[$i])) { |
201 | 201 | $ret .= $elements[$i]; |
202 | 202 | } elseif (!$elements[$i]->isHidden()) { |
203 | - $ret .= "<tr valign='top' align='left'><td class='head'>" . $elements[$i]->getCaption(); |
|
203 | + $ret .= "<tr valign='top' align='left'><td class='head'>".$elements[$i]->getCaption(); |
|
204 | 204 | if ('' != $elements[$i]->getDescription()) { |
205 | - $ret .= '<br><br><span style="font-weight: normal;">' . $elements[$i]->getDescription() . '</span>'; |
|
205 | + $ret .= '<br><br><span style="font-weight: normal;">'.$elements[$i]->getDescription().'</span>'; |
|
206 | 206 | } |
207 | - $ret .= "</td>\n<td class='even'>\n" . $elements[$i]->render() . "\n</td></tr>\n"; |
|
207 | + $ret .= "</td>\n<td class='even'>\n".$elements[$i]->render()."\n</td></tr>\n"; |
|
208 | 208 | } else { |
209 | 209 | $ret .= $elements[$i]->render(); |
210 | 210 | } |
@@ -22,25 +22,25 @@ discard block |
||
22 | 22 | $moduleDirName = basename(dirname(__DIR__)); |
23 | 23 | $moduleDirNameUpper = strtoupper($moduleDirName); |
24 | 24 | return (object)[ |
25 | - 'name' => strtoupper($moduleDirName) . ' Module Configurator', |
|
25 | + 'name' => strtoupper($moduleDirName).' Module Configurator', |
|
26 | 26 | 'paths' => [ |
27 | 27 | 'dirname' => $moduleDirName, |
28 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
29 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
30 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
31 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
32 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
28 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
29 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
30 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
31 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
32 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
33 | 33 | ], |
34 | 34 | 'uploadFolders' => [ |
35 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
36 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category', |
|
37 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots', |
|
35 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
36 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category', |
|
37 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots', |
|
38 | 38 | //XOOPS_UPLOAD_PATH . '/flags' |
39 | 39 | ], |
40 | 40 | 'copyBlankFiles' => [ |
41 | - constant($moduleDirNameUpper . '_UPLOAD_PATH'), |
|
42 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/category', |
|
43 | - constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/screenshots', |
|
41 | + constant($moduleDirNameUpper.'_UPLOAD_PATH'), |
|
42 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/category', |
|
43 | + constant($moduleDirNameUpper.'_UPLOAD_PATH').'/screenshots', |
|
44 | 44 | //XOOPS_UPLOAD_PATH . '/flags' |
45 | 45 | ], |
46 | 46 | |
@@ -75,6 +75,6 @@ discard block |
||
75 | 75 | '/images', |
76 | 76 | ], |
77 | 77 | 'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
78 | - <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>', |
|
78 | + <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>', |
|
79 | 79 | ]; |
80 | 80 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $sql = sprintf( |
93 | 93 | 'INSERT INTO `%s` (parentid, name, description, total, weight, created) VALUES (%u, %s, %s, %u, %u, %u)', |
94 | 94 | $this->db->prefix('smartfaq_categories'), |
95 | - $parentid, |
|
95 | + $parentid, |
|
96 | 96 | $this->db->quoteString($name), |
97 | 97 | $this->db->quoteString($description), |
98 | 98 | $total, |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | 'UPDATE `%s` SET parentid = %u, name = %s, description = %s, total = %s, weight = %u, created = %u WHERE categoryid = %u', |
105 | 105 | $this->db->prefix('smartfaq_categories'), |
106 | 106 | $parentid, |
107 | - $this->db->quoteString($name), |
|
107 | + $this->db->quoteString($name), |
|
108 | 108 | $this->db->quoteString($description), |
109 | 109 | $total, |
110 | 110 | $weight, |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | $false = false; |
49 | 49 | if ((int)$id > 0) { |
50 | - $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories') . ' WHERE categoryid=' . $id; |
|
50 | + $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories').' WHERE categoryid='.$id; |
|
51 | 51 | if (!$result = $this->db->query($sql)) { |
52 | 52 | return $false; |
53 | 53 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | // Deleteing the sub categories |
152 | - $subcats =& $this->getCategories(0, 0, $category->categoryid()); |
|
152 | + $subcats = & $this->getCategories(0, 0, $category->categoryid()); |
|
153 | 153 | foreach ($subcats as $subcat) { |
154 | 154 | $this->delete($subcat); |
155 | 155 | } |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | { |
187 | 187 | $ret = []; |
188 | 188 | $limit = $start = 0; |
189 | - $sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories'); |
|
189 | + $sql = 'SELECT * FROM '.$this->db->prefix('smartfaq_categories'); |
|
190 | 190 | if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) { |
191 | - $sql .= ' ' . $criteria->renderWhere(); |
|
191 | + $sql .= ' '.$criteria->renderWhere(); |
|
192 | 192 | if ('' != $criteria->getSort()) { |
193 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
193 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
194 | 194 | } |
195 | 195 | $limit = $criteria->getLimit(); |
196 | 196 | $start = $criteria->getStart(); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission'); |
248 | 248 | |
249 | 249 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
250 | - $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
250 | + $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
251 | 251 | } |
252 | 252 | $criteria->setStart($start); |
253 | 253 | $criteria->setLimit($limit); |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission'); |
287 | 287 | |
288 | 288 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
289 | - $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
289 | + $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | $criteria->add(new \Criteria('f.status', Constants::SF_STATUS_OPENED)); |
@@ -295,11 +295,11 @@ discard block |
||
295 | 295 | |
296 | 296 | $ret = []; |
297 | 297 | $limit = $start = 0; |
298 | - $sql = 'SELECT DISTINCT c.categoryid, c.parentid, c.name, c.description, c.total, c.weight, c.created FROM ' . $this->db->prefix('smartfaq_categories') . ' AS c INNER JOIN ' . $this->db->prefix('smartfaq_faq') . ' AS f ON c.categoryid = f.categoryid'; |
|
298 | + $sql = 'SELECT DISTINCT c.categoryid, c.parentid, c.name, c.description, c.total, c.weight, c.created FROM '.$this->db->prefix('smartfaq_categories').' AS c INNER JOIN '.$this->db->prefix('smartfaq_faq').' AS f ON c.categoryid = f.categoryid'; |
|
299 | 299 | if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) { |
300 | - $sql .= ' ' . $criteria->renderWhere(); |
|
300 | + $sql .= ' '.$criteria->renderWhere(); |
|
301 | 301 | if ('' != $criteria->getSort()) { |
302 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
302 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
303 | 303 | } |
304 | 304 | $limit = $criteria->getLimit(); |
305 | 305 | $start = $criteria->getStart(); |
@@ -328,9 +328,9 @@ discard block |
||
328 | 328 | */ |
329 | 329 | public function getCount($criteria = null) |
330 | 330 | { |
331 | - $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('smartfaq_categories'); |
|
331 | + $sql = 'SELECT COUNT(*) FROM '.$this->db->prefix('smartfaq_categories'); |
|
332 | 332 | if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) { |
333 | - $sql .= ' ' . $criteria->renderWhere(); |
|
333 | + $sql .= ' '.$criteria->renderWhere(); |
|
334 | 334 | } |
335 | 335 | $result = $this->db->query($sql); |
336 | 336 | if (!$result) { |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission'); |
359 | 359 | |
360 | 360 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
361 | - $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
361 | + $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
362 | 362 | } |
363 | 363 | } |
364 | 364 | |
@@ -382,16 +382,16 @@ discard block |
||
382 | 382 | $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission'); |
383 | 383 | |
384 | 384 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
385 | - $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
385 | + $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
386 | 386 | } |
387 | 387 | } |
388 | 388 | |
389 | 389 | $criteria->add(new \Criteria('f.status', Constants::SF_STATUS_OPENED)); |
390 | 390 | |
391 | - $sql = 'SELECT COUNT(c.categoryid) FROM ' . $this->db->prefix('smartfaq_categories') . ' AS c INNER JOIN ' . $this->db->prefix('smartfaq_faq') . ' AS f ON c.categoryid = f.categoryid'; |
|
391 | + $sql = 'SELECT COUNT(c.categoryid) FROM '.$this->db->prefix('smartfaq_categories').' AS c INNER JOIN '.$this->db->prefix('smartfaq_faq').' AS f ON c.categoryid = f.categoryid'; |
|
392 | 392 | |
393 | 393 | if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) { |
394 | - $sql .= ' ' . $criteria->renderWhere(); |
|
394 | + $sql .= ' '.$criteria->renderWhere(); |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | $result = $this->db->query($sql); |
@@ -409,16 +409,16 @@ discard block |
||
409 | 409 | */ |
410 | 410 | public function getSubCats($categories) |
411 | 411 | { |
412 | - $criteria = new \CriteriaCompo(new \Criteria('parentid', '(' . implode(',', array_keys($categories)) . ')'), 'IN'); |
|
412 | + $criteria = new \CriteriaCompo(new \Criteria('parentid', '('.implode(',', array_keys($categories)).')'), 'IN'); |
|
413 | 413 | $ret = []; |
414 | 414 | if (!Smartfaq\Utility::userIsAdmin()) { |
415 | 415 | /** @var Smartfaq\PermissionHandler $smartPermHandler */ |
416 | 416 | $smartPermHandler = Smartfaq\Helper::getInstance()->getHandler('Permission'); |
417 | 417 | |
418 | 418 | $categoriesGranted = $smartPermHandler->getPermissions('category'); |
419 | - $criteria->add(new \Criteria('categoryid', '(' . implode(',', $categoriesGranted) . ')', 'IN')); |
|
419 | + $criteria->add(new \Criteria('categoryid', '('.implode(',', $categoriesGranted).')', 'IN')); |
|
420 | 420 | } |
421 | - $subcats =& $this->getObjects($criteria, true); |
|
421 | + $subcats = & $this->getObjects($criteria, true); |
|
422 | 422 | foreach ($subcats as $subcat_id => $subcat) { |
423 | 423 | $ret[$subcat->getVar('parentid')][$subcat->getVar('categoryid')] = $subcat; |
424 | 424 | } |
@@ -434,9 +434,9 @@ discard block |
||
434 | 434 | */ |
435 | 435 | public function deleteAll($criteria = null) |
436 | 436 | { |
437 | - $sql = 'DELETE FROM ' . $this->db->prefix('smartfaq_categories'); |
|
437 | + $sql = 'DELETE FROM '.$this->db->prefix('smartfaq_categories'); |
|
438 | 438 | if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) { |
439 | - $sql .= ' ' . $criteria->renderWhere(); |
|
439 | + $sql .= ' '.$criteria->renderWhere(); |
|
440 | 440 | } |
441 | 441 | if (!$this->db->query($sql)) { |
442 | 442 | return false; |
@@ -458,10 +458,10 @@ discard block |
||
458 | 458 | **/ |
459 | 459 | public function updateAll($fieldname, $fieldvalue, \CriteriaElement $criteria = null) |
460 | 460 | { |
461 | - $set_clause = is_numeric($fieldvalue) ? $fieldname . ' = ' . $fieldvalue : $fieldname . ' = ' . $this->db->quoteString($fieldvalue); |
|
462 | - $sql = 'UPDATE ' . $this->db->prefix('smartfaq_categories') . ' SET ' . $set_clause; |
|
461 | + $set_clause = is_numeric($fieldvalue) ? $fieldname.' = '.$fieldvalue : $fieldname.' = '.$this->db->quoteString($fieldvalue); |
|
462 | + $sql = 'UPDATE '.$this->db->prefix('smartfaq_categories').' SET '.$set_clause; |
|
463 | 463 | if (null !== $criteria && is_subclass_of($criteria, 'CriteriaElement')) { |
464 | - $sql .= ' ' . $criteria->renderWhere(); |
|
464 | + $sql .= ' '.$criteria->renderWhere(); |
|
465 | 465 | } |
466 | 466 | if (!$this->db->queryF($sql)) { |
467 | 467 | return false; |
@@ -61,11 +61,11 @@ |
||
61 | 61 | $query = sprintf('ALTER TABLE `%s` RENAME %s', $from, $to); |
62 | 62 | $ret = $xoopsDB->queryF($query); |
63 | 63 | if (!$ret) { |
64 | - echo ' ' . sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from) . '<br>'; |
|
64 | + echo ' '.sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from).'<br>'; |
|
65 | 65 | |
66 | 66 | return false; |
67 | 67 | } else { |
68 | - echo ' ' . sprintf(_SDU_MSG_RENAME_TABLE, $from, $to) . '<br>'; |
|
68 | + echo ' '.sprintf(_SDU_MSG_RENAME_TABLE, $from, $to).'<br>'; |
|
69 | 69 | |
70 | 70 | return true; |
71 | 71 | } |
@@ -174,22 +174,22 @@ discard block |
||
174 | 174 | </td> |
175 | 175 | <td class='$class' align='center' nowrap='nowrap'> |
176 | 176 | <input type='radio' name='side[$bid]' value='" |
177 | - . Constants::XOOPS_SIDEBLOCK_LEFT |
|
178 | - . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
179 | - . Constants::XOOPS_CENTERBLOCK_LEFT |
|
180 | - . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
181 | - . Constants::XOOPS_CENTERBLOCK_CENTER |
|
182 | - . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
183 | - . Constants::XOOPS_CENTERBLOCK_RIGHT |
|
184 | - . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
185 | - . Constants::XOOPS_SIDEBLOCK_RIGHT |
|
186 | - . "'$ssel1> |
|
177 | + . Constants::XOOPS_SIDEBLOCK_LEFT |
|
178 | + . "'$ssel0>-<input type='radio' name='side[$bid]' value='" |
|
179 | + . Constants::XOOPS_CENTERBLOCK_LEFT |
|
180 | + . "'$ssel2><input type='radio' name='side[$bid]' value='" |
|
181 | + . Constants::XOOPS_CENTERBLOCK_CENTER |
|
182 | + . "'$ssel3><input type='radio' name='side[$bid]' value='" |
|
183 | + . Constants::XOOPS_CENTERBLOCK_RIGHT |
|
184 | + . "'$ssel4>-<input type='radio' name='side[$bid]' value='" |
|
185 | + . Constants::XOOPS_SIDEBLOCK_RIGHT |
|
186 | + . "'$ssel1> |
|
187 | 187 | <br> |
188 | 188 | <br> |
189 | 189 | <input type='radio' name='side[$bid]' value='-1'$sseln> |
190 | 190 | " |
191 | - . _NONE |
|
192 | - . " |
|
191 | + . _NONE |
|
192 | + . " |
|
193 | 193 | </td> |
194 | 194 | <td class='$class' align='center'> |
195 | 195 | <input type='text' name=weight[$bid] value='$weight' size='5' maxlength='5' style='text-align:right;'> |
@@ -206,8 +206,8 @@ discard block |
||
206 | 206 | </td> |
207 | 207 | <td class='$class' align='center'> |
208 | 208 | <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>" |
209 | - . _EDIT |
|
210 | - . "</a> |
|
209 | + . _EDIT |
|
210 | + . "</a> |
|
211 | 211 | <input type='hidden' name='bid[$bid]' value='$bid'> |
212 | 212 | </td> |
213 | 213 | </tr>\n"; |
@@ -240,14 +240,14 @@ discard block |
||
240 | 240 | } |
241 | 241 | |
242 | 242 | $form = new GroupPermForm('', 1, 'block_read', "<img id='bottomtableicon' src=" |
243 | - . XOOPS_URL |
|
244 | - . '/modules/' |
|
245 | - . $xoopsModule->dirname() |
|
246 | - . "/assets/images/icon/close12.gif alt=''></a> " |
|
247 | - . _AM_SF_GROUPS |
|
248 | - . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
249 | - . _AM_SF_GROUPSINFO |
|
250 | - . '</span>'); |
|
243 | + . XOOPS_URL |
|
244 | + . '/modules/' |
|
245 | + . $xoopsModule->dirname() |
|
246 | + . "/assets/images/icon/close12.gif alt=''></a> " |
|
247 | + . _AM_SF_GROUPS |
|
248 | + . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
|
249 | + . _AM_SF_GROUPSINFO |
|
250 | + . '</span>'); |
|
251 | 251 | $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
252 | 252 | $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
253 | 253 | foreach ($item_list as $item_id => $item_name) { |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | use XoopsModules\Smartfaq; |
16 | 16 | use XoopsModules\Smartfaq\Constants; |
17 | 17 | |
18 | -require_once __DIR__ . '/../../../include/cp_header.php'; |
|
19 | -require_once __DIR__ . '/mygrouppermform.php'; |
|
20 | -require_once XOOPS_ROOT_PATH . '/class/xoopsblock.php'; |
|
18 | +require_once __DIR__.'/../../../include/cp_header.php'; |
|
19 | +require_once __DIR__.'/mygrouppermform.php'; |
|
20 | +require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php'; |
|
21 | 21 | //require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->dirname() . '/include/functions.php'; |
22 | 22 | |
23 | -$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system'; |
|
23 | +$xoops_system_path = XOOPS_ROOT_PATH.'/modules/system'; |
|
24 | 24 | |
25 | 25 | // language files |
26 | 26 | $language = $xoopsConfig['language']; |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | |
31 | 31 | // to prevent from notice that constants already defined |
32 | 32 | $error_reporting_level = error_reporting(0); |
33 | -require_once __DIR__ . '/../../system/constants.php'; |
|
34 | -require_once __DIR__ . "/../../language/$language/admin.php"; |
|
35 | -require_once __DIR__ . "/../../language/$language/admin/blocksadmin.php"; |
|
33 | +require_once __DIR__.'/../../system/constants.php'; |
|
34 | +require_once __DIR__."/../../language/$language/admin.php"; |
|
35 | +require_once __DIR__."/../../language/$language/admin/blocksadmin.php"; |
|
36 | 36 | //require_once __DIR__ . '/../include/functions.php'; |
37 | 37 | error_reporting($error_reporting_level); |
38 | 38 | |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | |
46 | 46 | // check $xoopsModule |
47 | 47 | if (!is_object($xoopsModule)) { |
48 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
48 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | // check access right (needs system_admin of BLOCK) |
52 | 52 | $syspermHandler = xoops_getHandler('groupperm'); |
53 | 53 | if (!$syspermHandler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) { |
54 | - redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); |
|
54 | + redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // get blocks owned by the module |
@@ -78,20 +78,20 @@ discard block |
||
78 | 78 | |
79 | 79 | // displaying TH |
80 | 80 | Smartfaq\Utility::collapsableBar('toptable', 'toptableicon'); |
81 | - echo "<img id='toptableicon' src=" . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/assets/images/icon/close12.gif alt=''></a> " . _AM_SF_BLOCKS . '</h3>'; |
|
81 | + echo "<img id='toptableicon' src=".XOOPS_URL.'/modules/'.$xoopsModule->dirname()."/assets/images/icon/close12.gif alt=''></a> "._AM_SF_BLOCKS.'</h3>'; |
|
82 | 82 | echo "<div id='toptable'>"; |
83 | - echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . _AM_SF_BLOCKSTXT . '</span>'; |
|
83 | + echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'._AM_SF_BLOCKSTXT.'</span>'; |
|
84 | 84 | |
85 | 85 | echo " |
86 | 86 | <form action='admin.php' name='blockadmin' method='post'> |
87 | 87 | <table width='100%' class='outer' cellpadding='4' cellspacing='1'> |
88 | 88 | <tr valign='middle'> |
89 | - <th>" . _AM_TITLE . "</th> |
|
90 | - <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION . "</th> |
|
91 | - <th align='center'>" . _AM_WEIGHT . "</th> |
|
92 | - <th align='center'>" . _AM_VISIBLEIN . "</th> |
|
93 | - <th align='center'>" . _AM_BCACHETIME . "</th> |
|
94 | - <th align='center'>" . _AM_ACTION . "</th> |
|
89 | + <th>" . _AM_TITLE."</th> |
|
90 | + <th align='center' nowrap='nowrap'>" . _AM_SF_POSITION."</th> |
|
91 | + <th align='center'>" . _AM_WEIGHT."</th> |
|
92 | + <th align='center'>" . _AM_VISIBLEIN."</th> |
|
93 | + <th align='center'>" . _AM_BCACHETIME."</th> |
|
94 | + <th align='center'>" . _AM_ACTION."</th> |
|
95 | 95 | </tr>\n"; |
96 | 96 | |
97 | 97 | // blocks displaying loop |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | // target modules |
143 | 143 | $db = \XoopsDatabaseFactory::getDatabaseConnection(); |
144 | - $result = $db->query('SELECT module_id FROM ' . $db->prefix('block_module_link') . " WHERE block_id='$bid'"); |
|
144 | + $result = $db->query('SELECT module_id FROM '.$db->prefix('block_module_link')." WHERE block_id='$bid'"); |
|
145 | 145 | $selected_mids = []; |
146 | 146 | while (false !== (list($selected_mid) = $db->fetchRow($result))) { |
147 | 147 | $selected_mids[] = (int)$selected_mid; |
@@ -158,9 +158,9 @@ discard block |
||
158 | 158 | $myts = \MyTextSanitizer::getInstance(); |
159 | 159 | foreach ($module_list as $mid => $mname) { |
160 | 160 | if (in_array($mid, $selected_mids)) { |
161 | - $module_options .= "<option value='$mid' selected>" . $myts->displayTarea($mname) . "</option>\n"; |
|
161 | + $module_options .= "<option value='$mid' selected>".$myts->displayTarea($mname)."</option>\n"; |
|
162 | 162 | } else { |
163 | - $module_options .= "<option value='$mid'>" . $myts->displayTarea($mname) . "</option>\n"; |
|
163 | + $module_options .= "<option value='$mid'>".$myts->displayTarea($mname)."</option>\n"; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | <td class='foot' align='center' colspan='6'> |
221 | 221 | <input type='hidden' name='fct' value='blocksadmin'> |
222 | 222 | <input type='hidden' name='op' value='order'> |
223 | - <input type='submit' name='submit' value='" . _SUBMIT . "'> |
|
223 | + <input type='submit' name='submit' value='" . _SUBMIT."'> |
|
224 | 224 | </td> |
225 | 225 | </tr> |
226 | 226 | </table> |
@@ -248,8 +248,8 @@ discard block |
||
248 | 248 | . "</h3><div id='bottomtable'><span style=\"color: #567; margin: 3px 0 0 0; font-size: small; display: block; \">" |
249 | 249 | . _AM_SF_GROUPSINFO |
250 | 250 | . '</span>'); |
251 | - $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACTIVERIGHTS); |
|
252 | - $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name() . ' ' . _AM_ACCESSRIGHTS); |
|
251 | + $form->addAppendix('module_admin', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACTIVERIGHTS); |
|
252 | + $form->addAppendix('module_read', $xoopsModule->mid(), $xoopsModule->name().' '._AM_ACCESSRIGHTS); |
|
253 | 253 | foreach ($item_list as $item_id => $item_name) { |
254 | 254 | $form->addItem($item_id, $myts->displayTarea($item_name)); |
255 | 255 | } |
@@ -258,14 +258,14 @@ discard block |
||
258 | 258 | } |
259 | 259 | |
260 | 260 | if (!empty($_POST['submit'])) { |
261 | - include __DIR__ . '/mygroupperm.php'; |
|
261 | + include __DIR__.'/mygroupperm.php'; |
|
262 | 262 | require_once "$xoops_system_path/language/$language/admin.php"; |
263 | - redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
263 | + redirect_header(XOOPS_URL.'/modules/'.$xoopsModule->dirname().'/admin/myblocksadmin.php', 1, _AM_DBUPDATED); |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | xoops_cp_header(); |
267 | 267 | if (file_exists('./mymenu.php')) { |
268 | - include __DIR__ . '/mymenu.php'; |
|
268 | + include __DIR__.'/mymenu.php'; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | list_blocks(); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $selectId = (int)$selectId; |
71 | 71 | $arr = []; |
72 | - $sql = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ' '; |
|
72 | + $sql = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.' '; |
|
73 | 73 | if ('' !== $order) { |
74 | 74 | $sql .= " ORDER BY $order"; |
75 | 75 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | $selectId = (int)$selectId; |
98 | 98 | $idarray = []; |
99 | - $result = $this->db->query('SELECT ' . $this->id . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ''); |
|
99 | + $result = $this->db->query('SELECT '.$this->id.' FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.''); |
|
100 | 100 | $count = $this->db->getRowsNum($result); |
101 | 101 | if (0 == $count) { |
102 | 102 | return $idarray; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | public function getAllChildId($selectId, $order = '', array $idarray = []) |
121 | 121 | { |
122 | 122 | $selectId = (int)$selectId; |
123 | - $sql = 'SELECT ' . $this->id . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ''; |
|
123 | + $sql = 'SELECT '.$this->id.' FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.''; |
|
124 | 124 | if ('' !== $order) { |
125 | 125 | $sql .= " ORDER BY $order"; |
126 | 126 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | public function getAllParentId($selectId, $order = '', array $idarray = []) |
150 | 150 | { |
151 | 151 | $selectId = (int)$selectId; |
152 | - $sql = 'SELECT ' . $this->pid . ' FROM ' . $this->table . ' WHERE ' . $this->id . '=' . $selectId . ''; |
|
152 | + $sql = 'SELECT '.$this->pid.' FROM '.$this->table.' WHERE '.$this->id.'='.$selectId.''; |
|
153 | 153 | if ('' !== $order) { |
154 | 154 | $sql .= " ORDER BY $order"; |
155 | 155 | } |
@@ -176,14 +176,14 @@ discard block |
||
176 | 176 | public function getPathFromId($selectId, $title, $path = '') |
177 | 177 | { |
178 | 178 | $selectId = (int)$selectId; |
179 | - $result = $this->db->query('SELECT ' . $this->pid . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$selectId"); |
|
179 | + $result = $this->db->query('SELECT '.$this->pid.', '.$title.' FROM '.$this->table.' WHERE '.$this->id."=$selectId"); |
|
180 | 180 | if (0 == $this->db->getRowsNum($result)) { |
181 | 181 | return $path; |
182 | 182 | } |
183 | 183 | list($parentid, $name) = $this->db->fetchRow($result); |
184 | 184 | $myts = \MyTextSanitizer::getInstance(); |
185 | 185 | $name = $myts->htmlspecialchars($name); |
186 | - $path = '/' . $name . $path . ''; |
|
186 | + $path = '/'.$name.$path.''; |
|
187 | 187 | if (0 == $parentid) { |
188 | 188 | return $path; |
189 | 189 | } |
@@ -209,12 +209,12 @@ discard block |
||
209 | 209 | $sel_name = $this->id; |
210 | 210 | } |
211 | 211 | $myts = \MyTextSanitizer::getInstance(); |
212 | - echo "<select name='" . $sel_name . "'"; |
|
212 | + echo "<select name='".$sel_name."'"; |
|
213 | 213 | if ('' !== $onchange) { |
214 | - echo " onchange='" . $onchange . "'"; |
|
214 | + echo " onchange='".$onchange."'"; |
|
215 | 215 | } |
216 | 216 | echo ">\n"; |
217 | - $sql = 'SELECT ' . $this->id . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->pid . '=0'; |
|
217 | + $sql = 'SELECT '.$this->id.', '.$title.' FROM '.$this->table.' WHERE '.$this->pid.'=0'; |
|
218 | 218 | if ('' !== $order) { |
219 | 219 | $sql .= " ORDER BY $order"; |
220 | 220 | } |
@@ -232,11 +232,11 @@ discard block |
||
232 | 232 | $arr = $this->getChildTreeArray($catid, $order); |
233 | 233 | foreach ($arr as $option) { |
234 | 234 | $option['prefix'] = str_replace('.', '--', $option['prefix']); |
235 | - $catpath = $option['prefix'] . ' ' . $myts->htmlspecialchars($option[$title]); |
|
235 | + $catpath = $option['prefix'].' '.$myts->htmlspecialchars($option[$title]); |
|
236 | 236 | if ($option[$this->id] == $preset_id) { |
237 | 237 | $sel = " selected='selected'"; |
238 | 238 | } |
239 | - echo "<option value='" . $option[$this->id] . "'$sel>$catpath</option>\n"; |
|
239 | + echo "<option value='".$option[$this->id]."'$sel>$catpath</option>\n"; |
|
240 | 240 | $sel = ''; |
241 | 241 | } |
242 | 242 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | { |
258 | 258 | $path = !empty($path) ? $path : ''; |
259 | 259 | $selectId = (int)$selectId; |
260 | - $sql = 'SELECT ' . $this->pid . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$selectId"; |
|
260 | + $sql = 'SELECT '.$this->pid.', '.$title.' FROM '.$this->table.' WHERE '.$this->id."=$selectId"; |
|
261 | 261 | $result = $this->db->query($sql); |
262 | 262 | if (0 == $this->db->getRowsNum($result)) { |
263 | 263 | return $path; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | list($parentid, $name) = $this->db->fetchRow($result); |
266 | 266 | $myts = \MyTextSanitizer::getInstance(); |
267 | 267 | $name = $myts->htmlspecialchars($name); |
268 | - $path = "<li><a href='" . $funcURL . '&' . $this->id . '=' . $selectId . "'>" . $name . '</a></li>' . $path . ''; |
|
268 | + $path = "<li><a href='".$funcURL.'&'.$this->id.'='.$selectId."'>".$name.'</a></li>'.$path.''; |
|
269 | 269 | if (0 == $parentid) { |
270 | 270 | return $path; |
271 | 271 | } |
@@ -285,12 +285,12 @@ discard block |
||
285 | 285 | public function getIdPathFromId($selectId, $path = '') |
286 | 286 | { |
287 | 287 | $selectId = (int)$selectId; |
288 | - $result = $this->db->query('SELECT ' . $this->pid . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$selectId"); |
|
288 | + $result = $this->db->query('SELECT '.$this->pid.' FROM '.$this->table.' WHERE '.$this->id."=$selectId"); |
|
289 | 289 | if (0 == $this->db->getRowsNum($result)) { |
290 | 290 | return $path; |
291 | 291 | } |
292 | 292 | list($parentid) = $this->db->fetchRow($result); |
293 | - $path = '/' . $selectId . $path . ''; |
|
293 | + $path = '/'.$selectId.$path.''; |
|
294 | 294 | if (0 == $parentid) { |
295 | 295 | return $path; |
296 | 296 | } |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | public function getAllChild($selectId = 0, $order = '', array $parray = []) |
312 | 312 | { |
313 | 313 | $selectId = (int)$selectId; |
314 | - $sql = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ' '; |
|
314 | + $sql = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.' '; |
|
315 | 315 | if ('' !== $order) { |
316 | 316 | $sql .= " ORDER BY $order"; |
317 | 317 | } |
@@ -341,7 +341,7 @@ discard block |
||
341 | 341 | public function getChildTreeArray($selectId = 0, $order = '', array $parray = [], $r_prefix = '') |
342 | 342 | { |
343 | 343 | $selectId = (int)$selectId; |
344 | - $sql = 'SELECT * FROM ' . $this->table . ' WHERE ' . $this->pid . '=' . $selectId . ' '; |
|
344 | + $sql = 'SELECT * FROM '.$this->table.' WHERE '.$this->pid.'='.$selectId.' '; |
|
345 | 345 | if ('' !== $order) { |
346 | 346 | $sql .= " ORDER BY $order"; |
347 | 347 | } |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | return $parray; |
352 | 352 | } |
353 | 353 | while (false !== ($row = $this->db->fetchArray($result))) { |
354 | - $row['prefix'] = $r_prefix . '.'; |
|
354 | + $row['prefix'] = $r_prefix.'.'; |
|
355 | 355 | array_push($parray, $row); |
356 | 356 | $parray = $this->getChildTreeArray($row[$this->id], $order, $parray, $row['prefix']); |
357 | 357 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | //Verifies that a MySQL table exists |
23 | 23 | $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection(); |
24 | 24 | $realname = $xoopsDB->prefix($table); |
25 | - $sql = 'SHOW TABLES FROM ' . XOOPS_DB_NAME; |
|
25 | + $sql = 'SHOW TABLES FROM '.XOOPS_DB_NAME; |
|
26 | 26 | $ret = $xoopsDB->queryF($sql); |
27 | 27 | while (false !== (list($m_table) = $xoopsDB->fetchRow($ret))) { |
28 | 28 | if ($m_table == $realname) { |
@@ -163,14 +163,14 @@ discard block |
||
163 | 163 | public function getExistingFieldsArray() |
164 | 164 | { |
165 | 165 | global $xoopsDB; |
166 | - $result = $xoopsDB->queryF('SHOW COLUMNS FROM ' . $this->name()); |
|
166 | + $result = $xoopsDB->queryF('SHOW COLUMNS FROM '.$this->name()); |
|
167 | 167 | while (false !== ($existing_field = $xoopsDB->fetchArray($result))) { |
168 | 168 | $fields[$existing_field['Field']] = $existing_field['Type']; |
169 | 169 | if ('YES' !== $existing_field['Null']) { |
170 | 170 | $fields[$existing_field['Field']] .= ' NOT NULL'; |
171 | 171 | } |
172 | 172 | if ($existing_field['Extra']) { |
173 | - $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra']; |
|
173 | + $fields[$existing_field['Field']] .= ' '.$existing_field['Extra']; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | $query = sprintf('INSERT INTO `%s` VALUES ("%s")', $this->name(), $data); |
247 | 247 | $ret = $xoopsDB->queryF($query); |
248 | 248 | if (!$ret) { |
249 | - echo ' ' . sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()) . '<br>'; |
|
249 | + echo ' '.sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()).'<br>'; |
|
250 | 250 | } else { |
251 | - echo ' ' . sprintf(_SDU_MSG_ADD_DATA, $this->name()) . '<br>'; |
|
251 | + echo ' '.sprintf(_SDU_MSG_ADD_DATA, $this->name()).'<br>'; |
|
252 | 252 | } |
253 | 253 | } |
254 | 254 | |
@@ -413,9 +413,9 @@ discard block |
||
413 | 413 | |
414 | 414 | $ret = $xoopsDB->queryF($query); |
415 | 415 | if (!$ret) { |
416 | - echo ' ' . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . '<br>'; |
|
416 | + echo ' '.sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()).'<br>'; |
|
417 | 417 | } else { |
418 | - echo ' ' . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . '<br>'; |
|
418 | + echo ' '.sprintf(_SDU_MSG_CREATE_TABLE, $this->name()).'<br>'; |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | return $ret; |
@@ -434,11 +434,11 @@ discard block |
||
434 | 434 | $query = sprintf('DROP TABLE `%s`', $this->name()); |
435 | 435 | $ret = $xoopsDB->queryF($query); |
436 | 436 | if (!$ret) { |
437 | - echo ' ' . sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()) . '<br>'; |
|
437 | + echo ' '.sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()).'<br>'; |
|
438 | 438 | |
439 | 439 | return false; |
440 | 440 | } else { |
441 | - echo ' ' . sprintf(_SDU_MSG_DROP_TABLE, $this->name()) . '<br>'; |
|
441 | + echo ' '.sprintf(_SDU_MSG_DROP_TABLE, $this->name()).'<br>'; |
|
442 | 442 | |
443 | 443 | return true; |
444 | 444 | } |
@@ -462,9 +462,9 @@ discard block |
||
462 | 462 | $ret = $ret && $xoopsDB->queryF($query); |
463 | 463 | if ($alteredField['showerror']) { |
464 | 464 | if (!$ret) { |
465 | - echo ' ' . sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()) . '<br>'; |
|
465 | + echo ' '.sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()).'<br>'; |
|
466 | 466 | } else { |
467 | - echo ' ' . sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()) . '<br>'; |
|
467 | + echo ' '.sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()).'<br>'; |
|
468 | 468 | } |
469 | 469 | } |
470 | 470 | } |
@@ -488,9 +488,9 @@ discard block |
||
488 | 488 | //echo $query; |
489 | 489 | $ret = $ret && $xoopsDB->queryF($query); |
490 | 490 | if (!$ret) { |
491 | - echo ' ' . sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()) . '<br>'; |
|
491 | + echo ' '.sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()).'<br>'; |
|
492 | 492 | } else { |
493 | - echo ' ' . sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()) . '<br>'; |
|
493 | + echo ' '.sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()).'<br>'; |
|
494 | 494 | } |
495 | 495 | } |
496 | 496 | |
@@ -513,9 +513,9 @@ discard block |
||
513 | 513 | $query = sprintf('UPDATE `%s` SET %s = %s', $this->name(), $updatedField['name'], $updatedField['value']); |
514 | 514 | $ret = $ret && $xoopsDB->queryF($query); |
515 | 515 | if (!$ret) { |
516 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . '<br>'; |
|
516 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).'<br>'; |
|
517 | 517 | } else { |
518 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
|
518 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>'; |
|
519 | 519 | } |
520 | 520 | } |
521 | 521 | |
@@ -538,9 +538,9 @@ discard block |
||
538 | 538 | //echo $query."<br>"; |
539 | 539 | $ret = $ret && $xoopsDB->queryF($query); |
540 | 540 | if (!$ret) { |
541 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . '<br>'; |
|
541 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).'<br>'; |
|
542 | 542 | } else { |
543 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
|
543 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>'; |
|
544 | 544 | } |
545 | 545 | } |
546 | 546 | |
@@ -564,9 +564,9 @@ discard block |
||
564 | 564 | |
565 | 565 | $ret = $ret && $xoopsDB->queryF($query); |
566 | 566 | if (!$ret) { |
567 | - echo ' ' . sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()) . '<br>'; |
|
567 | + echo ' '.sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()).'<br>'; |
|
568 | 568 | } else { |
569 | - echo ' ' . sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()) . '<br>'; |
|
569 | + echo ' '.sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()).'<br>'; |
|
570 | 570 | } |
571 | 571 | } |
572 | 572 |