@@ -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 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | require_once $GLOBALS['xoops']->path('class/template.php'); |
| 71 | 71 | $breadcrumbTpl = new \XoopsTpl(); |
| 72 | 72 | $breadcrumbTpl->assign('breadcrumb', $this->bread); |
| 73 | - $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl'); |
|
| 73 | + $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl'); |
|
| 74 | 74 | unset($breadcrumbTpl); |
| 75 | 75 | |
| 76 | 76 | return $html; |
@@ -34,19 +34,19 @@ discard block |
||
| 34 | 34 | // $sql .= " WHERE metakey='version' LIMIT 1"; |
| 35 | 35 | // $query = $GLOBALS['xoopsDB']->query($sql); |
| 36 | 36 | // list($meta) = $GLOBALS['xoopsDB']->fetchRow($query); |
| 37 | - $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>" . constant('CO_' . $moduleDirNameUpper . '_IMAGEINFO') . "</legend>\n"; |
|
| 37 | + $html .= "<fieldset><legend style='font-weight: bold; color: #900;'>".constant('CO_'.$moduleDirNameUpper.'_IMAGEINFO')."</legend>\n"; |
|
| 38 | 38 | $html .= "<div style='padding: 8px;'>\n"; |
| 39 | 39 | // $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_METAVERSION') . $meta . "</div>\n"; |
| 40 | 40 | // $html .= "<br>\n"; |
| 41 | 41 | // $html .= "<br>\n"; |
| 42 | - $html .= '<div>' . constant('CO_' . $moduleDirNameUpper . '_SPHPINI') . "</div>\n"; |
|
| 42 | + $html .= '<div>'.constant('CO_'.$moduleDirNameUpper.'_SPHPINI')."</div>\n"; |
|
| 43 | 43 | $html .= "<ul>\n"; |
| 44 | 44 | // |
| 45 | - $gdlib = function_exists('gd_info') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>'; |
|
| 46 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib; |
|
| 45 | + $gdlib = function_exists('gd_info') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_GDON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_GDOFF').'</span>'; |
|
| 46 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS').$gdlib; |
|
| 47 | 47 | if (function_exists('gd_info')) { |
| 48 | 48 | if (true === ($gdlib = gd_info())) { |
| 49 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>'; |
|
| 49 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_GDLIBVERSION').'<b>'.$gdlib['GD Version'].'</b>'; |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | // |
@@ -56,18 +56,18 @@ discard block |
||
| 56 | 56 | // $registerglobals = (!ini_get('register_globals')) ? "<span style=\"color: green;\">" . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>' : "<span style=\"color: red;\">" . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>'; |
| 57 | 57 | // $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals; |
| 58 | 58 | // |
| 59 | - $downloads = ini_get('file_uploads') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>'; |
|
| 60 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads; |
|
| 59 | + $downloads = ini_get('file_uploads') ? '<span style="color: green;">'.constant('CO_'.$moduleDirNameUpper.'_ON').'</span>' : '<span style="color: red;">'.constant('CO_'.$moduleDirNameUpper.'_OFF').'</span>'; |
|
| 60 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS').$downloads; |
|
| 61 | 61 | // |
| 62 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . ini_get('upload_max_filesize') . "</span></b>\n"; |
|
| 63 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . ini_get('post_max_size') . "</span></b>\n"; |
|
| 64 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT') . ' <b><span style="color: blue;">' . ini_get('memory_limit') . "</span></b>\n"; |
|
| 62 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE').' <b><span style="color: blue;">'.ini_get('upload_max_filesize')."</span></b>\n"; |
|
| 63 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE').' <b><span style="color: blue;">'.ini_get('post_max_size')."</span></b>\n"; |
|
| 64 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT').' <b><span style="color: blue;">'.ini_get('memory_limit')."</span></b>\n"; |
|
| 65 | 65 | $html .= "</ul>\n"; |
| 66 | 66 | $html .= "<ul>\n"; |
| 67 | - $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERPATH') . ' <b>' . XOOPS_ROOT_PATH . "</b>\n"; |
|
| 67 | + $html .= '<li>'.constant('CO_'.$moduleDirNameUpper.'_SERVERPATH').' <b>'.XOOPS_ROOT_PATH."</b>\n"; |
|
| 68 | 68 | $html .= "</ul>\n"; |
| 69 | 69 | $html .= "<br>\n"; |
| 70 | - $html .= constant('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC') . "\n"; |
|
| 70 | + $html .= constant('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC')."\n"; |
|
| 71 | 71 | $html .= '</div>'; |
| 72 | 72 | $html .= '</fieldset><br>'; |
| 73 | 73 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | throw new \RuntimeException(sprintf('Unable to create the %s directory', $folder)); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - file_put_contents($folder . '/index.html', '<script>history.go(-1);</script>'); |
|
| 36 | + file_put_contents($folder.'/index.html', '<script>history.go(-1);</script>'); |
|
| 37 | 37 | } |
| 38 | 38 | } catch (\Exception $e) { |
| 39 | 39 | echo 'Caught exception: ', $e->getMessage(), "\n", '<br>'; |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | if (!mkdir($dst) && !is_dir($dst)) { |
| 62 | 62 | while (false !== ($file = readdir($dir))) { |
| 63 | 63 | if (('.' !== $file) && ('..' !== $file)) { |
| 64 | - if (is_dir($src . '/' . $file)) { |
|
| 65 | - self::recurseCopy($src . '/' . $file, $dst . '/' . $file); |
|
| 64 | + if (is_dir($src.'/'.$file)) { |
|
| 65 | + self::recurseCopy($src.'/'.$file, $dst.'/'.$file); |
|
| 66 | 66 | } else { |
| 67 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
| 67 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | self::rrmdir($fObj->getPathname()); |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 162 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 163 | 163 | return rmdir($src); // remove the directory & return results |
| 164 | 164 | } |
| 165 | 165 | |
@@ -192,14 +192,14 @@ discard block |
||
| 192 | 192 | $iterator = new \DirectoryIterator($src); |
| 193 | 193 | foreach ($iterator as $fObj) { |
| 194 | 194 | if ($fObj->isFile()) { |
| 195 | - rename($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 195 | + rename($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 196 | 196 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
| 197 | 197 | // Try recursively on directory |
| 198 | - self::rmove($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 198 | + self::rmove($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 199 | 199 | // rmdir($fObj->getPath()); // now delete the directory |
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | - $iterator = null; // clear iterator Obj to close file/directory |
|
| 202 | + $iterator = null; // clear iterator Obj to close file/directory |
|
| 203 | 203 | return rmdir($src); // remove the directory & return results |
| 204 | 204 | } |
| 205 | 205 | |
@@ -235,9 +235,9 @@ discard block |
||
| 235 | 235 | $iterator = new \DirectoryIterator($src); |
| 236 | 236 | foreach ($iterator as $fObj) { |
| 237 | 237 | if ($fObj->isFile()) { |
| 238 | - copy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 238 | + copy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 239 | 239 | } elseif (!$fObj->isDot() && $fObj->isDir()) { |
| 240 | - self::rcopy($fObj->getPathname(), "{$dest}/" . $fObj->getFilename()); |
|
| 240 | + self::rcopy($fObj->getPathname(), "{$dest}/".$fObj->getFilename()); |
|
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | return true; |
@@ -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 checkbox options for a group permission form |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | public function setOptionTree(&$optionTree) |
| 111 | 111 | { |
| 112 | - $this->_optionTree =& $optionTree; |
|
| 112 | + $this->_optionTree = & $optionTree; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /** |
@@ -134,34 +134,34 @@ discard block |
||
| 134 | 134 | $ret = ''; |
| 135 | 135 | |
| 136 | 136 | if (count($this->_appendix) > 0) { |
| 137 | - $ret .= '<table class="outer"><tr>'; |
|
| 137 | + $ret .= '<table class="outer"><tr>'; |
|
| 138 | 138 | $cols = 1; |
| 139 | 139 | foreach ($this->_appendix as $append) { |
| 140 | 140 | if ($cols > 4) { |
| 141 | - $ret .= '</tr><tr>'; |
|
| 141 | + $ret .= '</tr><tr>'; |
|
| 142 | 142 | $cols = 1; |
| 143 | 143 | } |
| 144 | 144 | $checked = $append['selected'] ? 'checked' : ''; |
| 145 | - $name = 'perms[' . $append['permname'] . ']'; |
|
| 145 | + $name = 'perms['.$append['permname'].']'; |
|
| 146 | 146 | $itemid = $append['itemid']; |
| 147 | 147 | $itemid = $append['itemid']; |
| 148 | - $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked>{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\"><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\"><br></td>"; |
|
| 148 | + $ret .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked>{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\"><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\"><br></td>"; |
|
| 149 | 149 | ++$cols; |
| 150 | 150 | } |
| 151 | 151 | $ret .= '</tr></table>'; |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - $ret .= '<table class="outer"><tr>'; |
|
| 154 | + $ret .= '<table class="outer"><tr>'; |
|
| 155 | 155 | $cols = 1; |
| 156 | 156 | foreach ($this->_optionTree[0]['children'] as $topitem) { |
| 157 | 157 | if ($cols > 4) { |
| 158 | - $ret .= '</tr><tr>'; |
|
| 158 | + $ret .= '</tr><tr>'; |
|
| 159 | 159 | $cols = 1; |
| 160 | 160 | } |
| 161 | 161 | $tree = '<td class="odd">'; |
| 162 | 162 | $prefix = ''; |
| 163 | 163 | $this->renderOptionTree($tree, $this->_optionTree[$topitem], $prefix); |
| 164 | - $ret .= $tree . '</td>'; |
|
| 164 | + $ret .= $tree.'</td>'; |
|
| 165 | 165 | ++$cols; |
| 166 | 166 | } |
| 167 | 167 | $ret .= '</tr></table>'; |
@@ -180,21 +180,21 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | private function renderOptionTree(&$tree, $option, $prefix, $parentIds = []) |
| 182 | 182 | { |
| 183 | - $tree .= $prefix . '<input type="checkbox" name="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" id="' . $this->getName() . '[groups][' . $this->_groupId . '][' . $option['id'] . ']" onclick="'; |
|
| 183 | + $tree .= $prefix.'<input type="checkbox" name="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" id="'.$this->getName().'[groups]['.$this->_groupId.']['.$option['id'].']" onclick="'; |
|
| 184 | 184 | // If there are parent elements, add javascript that will |
| 185 | 185 | // make them selecteded when this element is checked to make |
| 186 | 186 | // sure permissions to parent items are added as well. |
| 187 | 187 | foreach ($parentIds as $pid) { |
| 188 | - $parent_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $pid . ']'; |
|
| 189 | - $tree .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 188 | + $parent_ele = $this->getName().'[groups]['.$this->_groupId.']['.$pid.']'; |
|
| 189 | + $tree .= "var ele = xoopsGetElementById('".$parent_ele."'); if (ele.checked !== true) {ele.checked = this.checked;}"; |
|
| 190 | 190 | } |
| 191 | 191 | // If there are child elements, add javascript that will |
| 192 | 192 | // make them unchecked when this element is unchecked to make |
| 193 | 193 | // sure permissions to child items are not added when there |
| 194 | 194 | // is no permission to this item. |
| 195 | 195 | foreach ($option['allchild'] as $cid) { |
| 196 | - $child_ele = $this->getName() . '[groups][' . $this->_groupId . '][' . $cid . ']'; |
|
| 197 | - $tree .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 196 | + $child_ele = $this->getName().'[groups]['.$this->_groupId.']['.$cid.']'; |
|
| 197 | + $tree .= "var ele = xoopsGetElementById('".$child_ele."'); if (this.checked !== true) {ele.checked = false;}"; |
|
| 198 | 198 | } |
| 199 | 199 | $tree .= '" value="1"'; |
| 200 | 200 | if (null !== $this->_value && in_array($option['id'], $this->_value)) { |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | if (isset($option['children'])) { |
| 219 | 219 | foreach ($option['children'] as $child) { |
| 220 | 220 | array_push($parentIds, $option['id']); |
| 221 | - $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix . ' -', $parentIds); |
|
| 221 | + $this->renderOptionTree($tree, $this->_optionTree[$child], $prefix.' -', $parentIds); |
|
| 222 | 222 | } |
| 223 | 223 | } |
| 224 | 224 | } |
@@ -379,20 +379,20 @@ |
||
| 379 | 379 | $tree .= ' checked'; |
| 380 | 380 | } |
| 381 | 381 | $tree .= '>' |
| 382 | - . $option['name'] |
|
| 383 | - . '<input type="hidden" name="' |
|
| 384 | - . $this->getName() |
|
| 385 | - . '[parents][' |
|
| 386 | - . $option['id'] |
|
| 387 | - . ']" value="' |
|
| 388 | - . implode(':', $parentIds) |
|
| 389 | - . '"><input type="hidden" name="' |
|
| 390 | - . $this->getName() |
|
| 391 | - . '[itemname][' |
|
| 392 | - . $option['id'] |
|
| 393 | - . ']" value="' |
|
| 394 | - . htmlspecialchars($option['name'], ENT_QUOTES) |
|
| 395 | - . "\"><br>\n"; |
|
| 382 | + . $option['name'] |
|
| 383 | + . '<input type="hidden" name="' |
|
| 384 | + . $this->getName() |
|
| 385 | + . '[parents][' |
|
| 386 | + . $option['id'] |
|
| 387 | + . ']" value="' |
|
| 388 | + . implode(':', $parentIds) |
|
| 389 | + . '"><input type="hidden" name="' |
|
| 390 | + . $this->getName() |
|
| 391 | + . '[itemname][' |
|
| 392 | + . $option['id'] |
|
| 393 | + . ']" value="' |
|
| 394 | + . htmlspecialchars($option['name'], ENT_QUOTES) |
|
| 395 | + . "\"><br>\n"; |
|
| 396 | 396 | if (isset($option['children'])) { |
| 397 | 397 | foreach ($option['children'] as $child) { |
| 398 | 398 | array_push($parentIds, $option['id']); |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
| 5 | 5 | */ |
| 6 | -spl_autoload_register(function ($class) { |
|
| 6 | +spl_autoload_register(function($class) { |
|
| 7 | 7 | // project-specific namespace prefix |
| 8 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
| 8 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
| 9 | 9 | |
| 10 | 10 | // base directory for the namespace prefix |
| 11 | - $base_dir = __DIR__ . '/../class/'; |
|
| 11 | + $base_dir = __DIR__.'/../class/'; |
|
| 12 | 12 | |
| 13 | 13 | // does the class use the namespace prefix? |
| 14 | 14 | $len = strlen($prefix); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | // replace the namespace prefix with the base directory, replace namespace |
| 24 | 24 | // separators with directory separators in the relative class name, append |
| 25 | 25 | // with .php |
| 26 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
| 26 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
| 27 | 27 | |
| 28 | 28 | // if the file exists, require it |
| 29 | 29 | if (file_exists($file)) { |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public static function eventCoreIncludeCommonEnd($args) |
| 30 | 30 | { |
| 31 | - include __DIR__ . '/autoloader.php'; |
|
| 31 | + include __DIR__.'/autoloader.php'; |
|
| 32 | 32 | } |
| 33 | 33 | } |