@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $block['modules'][$i]['highlight'] = true; |
| 53 | 53 | $block['nothome'] = true; |
| 54 | 54 | } |
| 55 | - /* @var $plugin MenusPluginInterface */ |
|
| 55 | + /* @var $plugin MenusPluginInterface */ |
|
| 56 | 56 | if ($xoops->isModule() && $module->getVar('dirname') == $xoops->module->getVar('dirname') && $plugin = \Xoops\Module\Plugin::getPlugin($module->getVar('dirname'), 'menus')) { |
| 57 | 57 | $sublinks = $plugin->subMenus(); |
| 58 | 58 | foreach ($sublinks as $sublink) { |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | if (in_array($i, $read_allowed)) { |
| 42 | 42 | $block['modules'][$i]['name'] = $module->getVar('name'); |
| 43 | 43 | $block['modules'][$i]['dirname'] = $module->getVar('dirname'); |
| 44 | - if (XoopsLoad::fileExists($xoops->path('modules/' . $module->getVar('dirname') . '/icons/logo_small.png'))) { |
|
| 45 | - $block['modules'][$i]['image'] = $xoops->url('modules/' . $module->getVar('dirname') . '/icons/logo_small.png'); |
|
| 44 | + if (XoopsLoad::fileExists($xoops->path('modules/'.$module->getVar('dirname').'/icons/logo_small.png'))) { |
|
| 45 | + $block['modules'][$i]['image'] = $xoops->url('modules/'.$module->getVar('dirname').'/icons/logo_small.png'); |
|
| 46 | 46 | } |
| 47 | 47 | if ($xoops->isModule() && ($i == $xoops->module->getVar('mid'))) { |
| 48 | 48 | $block['modules'][$i]['highlight'] = true; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | foreach ($sublinks as $sublink) { |
| 59 | 59 | $block['modules'][$i]['sublinks'][] = array( |
| 60 | 60 | 'name' => $sublink['name'], |
| 61 | - 'url' => \XoopsBaseConfig::get('url') . '/modules/' . $module->getVar('dirname') . '/' . $sublink['url'] |
|
| 61 | + 'url' => \XoopsBaseConfig::get('url').'/modules/'.$module->getVar('dirname').'/'.$sublink['url'] |
|
| 62 | 62 | ); |
| 63 | 63 | } |
| 64 | 64 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $count = count($newmembers); |
| 41 | 41 | for ($i = 0; $i < $count; ++$i) { |
| 42 | 42 | if ($options[1] == 1) { |
| 43 | - $block['users'][$i]['avatar'] = $newmembers[$i]->getVar('user_avatar') !== 'blank.gif' ? \XoopsBaseConfig::get('uploads-url') . '/' . $newmembers[$i]->getVar('user_avatar') : ''; |
|
| 43 | + $block['users'][$i]['avatar'] = $newmembers[$i]->getVar('user_avatar') !== 'blank.gif' ? \XoopsBaseConfig::get('uploads-url').'/'.$newmembers[$i]->getVar('user_avatar') : ''; |
|
| 44 | 44 | } else { |
| 45 | 45 | $block['users'][$i]['avatar'] = ''; |
| 46 | 46 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | function b_system_newmembers_edit($options) |
| 55 | 55 | { |
| 56 | 56 | $block_form = new Xoops\Form\BlockForm(); |
| 57 | - $block_form->addElement( new Xoops\Form\Text(SystemLocale::NUMBER_OF_USERS_TO_DISPLAY, 'options[0]', 1, 3, $options[0]), true); |
|
| 57 | + $block_form->addElement(new Xoops\Form\Text(SystemLocale::NUMBER_OF_USERS_TO_DISPLAY, 'options[0]', 1, 3, $options[0]), true); |
|
| 58 | 58 | $block_form->addElement(new Xoops\Form\RadioYesNo(SystemLocale::DISPLAY_USERS_AVATARS, 'options[1]', $options[1])); |
| 59 | 59 | return $block_form->render(); |
| 60 | 60 | } |
@@ -25,20 +25,20 @@ discard block |
||
| 25 | 25 | $theme_options = ''; |
| 26 | 26 | $theme_set_allowed = $xoops->getConfig('theme_set_allowed'); |
| 27 | 27 | foreach ($theme_set_allowed as $theme) { |
| 28 | - $theme_options .= '<option value="' . $theme . '"'; |
|
| 28 | + $theme_options .= '<option value="'.$theme.'"'; |
|
| 29 | 29 | if ($theme == $xoops->getConfig('theme_set')) { |
| 30 | 30 | $theme_options .= ' selected="selected"'; |
| 31 | 31 | } |
| 32 | - $theme_options .= '>' . $theme . '</option>'; |
|
| 32 | + $theme_options .= '>'.$theme.'</option>'; |
|
| 33 | 33 | } |
| 34 | 34 | $block = array(); |
| 35 | 35 | if ($options[0] == 1) { |
| 36 | - $block['theme_select'] = "<img vspace=\"2\" id=\"xoops_theme_img\" src=\"" . \XoopsBaseConfig::get('themes-url') . "/" . $xoops->getConfig('theme_set') . "/screenshot.png\" alt=\"screenshot\" width=\"" . (int)($options[1]) . "\" /><br /><select class=\"span2\" id=\"xoops_theme_select\" name=\"xoops_theme_select\" onchange=\"showImgSelected('xoops_theme_img', 'xoops_theme_select', 'themes', '/screenshot.png', '" . \XoopsBaseConfig::get('url') . "');\">" . $theme_options . "</select><br /><input type=\"submit\" value=\"" . XoopsLocale::A_GO . "\" />"; |
|
| 36 | + $block['theme_select'] = "<img vspace=\"2\" id=\"xoops_theme_img\" src=\"".\XoopsBaseConfig::get('themes-url')."/".$xoops->getConfig('theme_set')."/screenshot.png\" alt=\"screenshot\" width=\"".(int)($options[1])."\" /><br /><select class=\"span2\" id=\"xoops_theme_select\" name=\"xoops_theme_select\" onchange=\"showImgSelected('xoops_theme_img', 'xoops_theme_select', 'themes', '/screenshot.png', '".\XoopsBaseConfig::get('url')."');\">".$theme_options."</select><br /><input type=\"submit\" value=\"".XoopsLocale::A_GO."\" />"; |
|
| 37 | 37 | } else { |
| 38 | - $block['theme_select'] = '<select class="span2" name="xoops_theme_select" onchange="submit();" size="3">' . $theme_options . '</select>'; |
|
| 38 | + $block['theme_select'] = '<select class="span2" name="xoops_theme_select" onchange="submit();" size="3">'.$theme_options.'</select>'; |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - $block['theme_select'] .= '<br />(' . sprintf(SystemLocale::F_THEMES, '<strong>' . count($theme_set_allowed) . '</strong>') . ')<br />'; |
|
| 41 | + $block['theme_select'] .= '<br />('.sprintf(SystemLocale::F_THEMES, '<strong>'.count($theme_set_allowed).'</strong>').')<br />'; |
|
| 42 | 42 | return $block; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -46,6 +46,6 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $block_form = new Xoops\Form\BlockForm(); |
| 48 | 48 | $block_form->addElement(new Xoops\Form\RadioYesNo(SystemLocale::DISPLAY_SCREENSHOT_IMAGE, 'options[0]', $options[0])); |
| 49 | - $block_form->addElement( new Xoops\Form\Text(SystemLocale::SCREENSHOT_IMAGE_WIDTH, 'options[1]', 1, 3, $options[1]), true); |
|
| 49 | + $block_form->addElement(new Xoops\Form\Text(SystemLocale::SCREENSHOT_IMAGE_WIDTH, 'options[1]', 1, 3, $options[1]), true); |
|
| 50 | 50 | return $block_form->render(); |
| 51 | 51 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | if (is_array($menu) && !empty($menu)) { |
| 42 | 42 | $block['modules'][$i]['name'] = $menu['name']; |
| 43 | - $block['modules'][$i]['link'] = $xoops->url('modules/' . $dirname . '/' . $menu['link']); |
|
| 43 | + $block['modules'][$i]['link'] = $xoops->url('modules/'.$dirname.'/'.$menu['link']); |
|
| 44 | 44 | $block['modules'][$i]['image'] = $menu['image']; |
| 45 | 45 | $block['modules'][$i]['icon'] = 'glyphicon glyphicon-none'; |
| 46 | 46 | $block['modules'][$i]['dirname'] = $dirname; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $block['modules'][$i]['sublinks'][] = array( |
| 55 | 55 | 'name' => $sublink['name'], |
| 56 | 56 | 'title' => $sublink['name'], |
| 57 | - 'url' => $xoops->url('modules/' . $dirname . '/' . $sublink['url']) |
|
| 57 | + 'url' => $xoops->url('modules/'.$dirname.'/'.$sublink['url']) |
|
| 58 | 58 | ); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // View Account |
| 68 | 68 | array_unshift($block['modules'], array( |
| 69 | 69 | 'name' => XoopsLocale::VIEW_ACCOUNT, |
| 70 | - 'link' => $xoops->url('userinfo.php?uid=' . $xoops->user->getVar('uid')), |
|
| 70 | + 'link' => $xoops->url('userinfo.php?uid='.$xoops->user->getVar('uid')), |
|
| 71 | 71 | 'icon' => 'glyphicon glyphicon-user', |
| 72 | 72 | 'title' => XoopsLocale::VIEW_ACCOUNT, |
| 73 | 73 | )); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $name = XoopsLocale::INBOX; |
| 101 | 101 | $class = ''; |
| 102 | 102 | if ($pm_count = $pm_handler->getCount($criteria)) { |
| 103 | - $name = XoopsLocale::INBOX . ' <span class="badge">' . $pm_count . '</span>'; |
|
| 103 | + $name = XoopsLocale::INBOX.' <span class="badge">'.$pm_count.'</span>'; |
|
| 104 | 104 | //$class = 'text-info'; |
| 105 | 105 | } |
| 106 | 106 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $members = ''; |
| 51 | 51 | for ($i = 0; $i < $total; ++$i) { |
| 52 | 52 | if ($onlines[$i]['online_uid'] > 0) { |
| 53 | - $members .= ' <a href="' . \XoopsBaseConfig::get('url') . '/userinfo.php?uid=' . $onlines[$i]['online_uid'] . '" title="' . $onlines[$i]['online_uname'] . '">' . $onlines[$i]['online_uname'] . '</a>,'; |
|
| 53 | + $members .= ' <a href="'.\XoopsBaseConfig::get('url').'/userinfo.php?uid='.$onlines[$i]['online_uid'].'" title="'.$onlines[$i]['online_uname'].'">'.$onlines[$i]['online_uname'].'</a>,'; |
|
| 54 | 54 | } else { |
| 55 | 55 | ++$guests; |
| 56 | 56 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $block['online_total'] = sprintf(XoopsLocale::F_USERS_ONLINE, $total); |
| 59 | 59 | if ($xoops->isModule()) { |
| 60 | 60 | $mytotal = $online_handler->getCount(new Criteria('online_module', $xoops->module->getVar('mid'))); |
| 61 | - $block['online_total'] .= ' (' . sprintf(XoopsLocale::F_USERS_BROWSING, $mytotal, $xoops->module->getVar('name')) . ')'; |
|
| 61 | + $block['online_total'] .= ' ('.sprintf(XoopsLocale::F_USERS_BROWSING, $mytotal, $xoops->module->getVar('name')).')'; |
|
| 62 | 62 | } |
| 63 | 63 | $block['lang_members'] = XoopsLocale::MEMBERS; |
| 64 | 64 | $block['lang_guests'] = XoopsLocale::GUESTS; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | for ($i = 0; $i < $count; ++$i) { |
| 42 | 42 | $block['users'][$i]['rank'] = $i + 1; |
| 43 | 43 | if ($options[1] == 1) { |
| 44 | - $block['users'][$i]['avatar'] = $topposters[$i]->getVar('user_avatar') !== 'blank.gif' ? \XoopsBaseConfig::get('uploads-url') . '/' . $topposters[$i]->getVar('user_avatar') : ''; |
|
| 44 | + $block['users'][$i]['avatar'] = $topposters[$i]->getVar('user_avatar') !== 'blank.gif' ? \XoopsBaseConfig::get('uploads-url').'/'.$topposters[$i]->getVar('user_avatar') : ''; |
|
| 45 | 45 | } else { |
| 46 | 46 | $block['users'][$i]['avatar'] = ''; |
| 47 | 47 | } |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | return false; |
| 122 | 122 | } |
| 123 | 123 | $language = empty($language) ? $xoops->getConfig('language') : $language; |
| 124 | - $path = 'modules/' . $domain . '/language/'; |
|
| 125 | - if (XoopsLoad::fileExists($file = $xoops->path($path . $language . '/admin/' . $name . '.php'))) { |
|
| 124 | + $path = 'modules/'.$domain.'/language/'; |
|
| 125 | + if (XoopsLoad::fileExists($file = $xoops->path($path.$language.'/admin/'.$name.'.php'))) { |
|
| 126 | 126 | $ret = include_once $file; |
| 127 | 127 | } else { |
| 128 | - $ret = include_once $xoops->path($path . 'english/admin/' . $name . '.php'); |
|
| 128 | + $ret = include_once $xoops->path($path.'english/admin/'.$name.'.php'); |
|
| 129 | 129 | } |
| 130 | 130 | return $ret; |
| 131 | 131 | } |
@@ -138,16 +138,16 @@ discard block |
||
| 138 | 138 | public function adminVersion($version, $value = '') |
| 139 | 139 | { |
| 140 | 140 | static $tblVersion = array(); |
| 141 | - if (is_array($tblVersion) && array_key_exists($version . '.' . $value, $tblVersion)) { |
|
| 142 | - return $tblVersion[$version . '.' . $value]; |
|
| 141 | + if (is_array($tblVersion) && array_key_exists($version.'.'.$value, $tblVersion)) { |
|
| 142 | + return $tblVersion[$version.'.'.$value]; |
|
| 143 | 143 | } |
| 144 | 144 | $xoops = Xoops::getInstance(); |
| 145 | - $path = $xoops->path('modules/system/admin/' . $version . '/xoops_version.php'); |
|
| 145 | + $path = $xoops->path('modules/system/admin/'.$version.'/xoops_version.php'); |
|
| 146 | 146 | if (XoopsLoad::fileExists($path)) { |
| 147 | 147 | $modversion = array(); |
| 148 | 148 | include $path; |
| 149 | 149 | $retvalue = $modversion[$value]; |
| 150 | - $tblVersion[$version . '.' . $value] = $retvalue; |
|
| 150 | + $tblVersion[$version.'.'.$value] = $retvalue; |
|
| 151 | 151 | return $retvalue; |
| 152 | 152 | } |
| 153 | 153 | return ''; |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function cleanCache($cache) |
| 175 | 175 | { |
| 176 | - $cachePath = \XoopsBaseConfig::get('var-path') . '/caches/'; |
|
| 176 | + $cachePath = \XoopsBaseConfig::get('var-path').'/caches/'; |
|
| 177 | 177 | $total_smarty_cache = 0; |
| 178 | 178 | $total_smarty_compile = 0; |
| 179 | 179 | $total_xoops_cache = 0; |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | for ($i = 0; $i < count($cache); ++$i) { |
| 182 | 182 | switch ($cache[$i]) { |
| 183 | 183 | case 1: |
| 184 | - $files = glob($cachePath . 'smarty_cache/*.*'); |
|
| 184 | + $files = glob($cachePath.'smarty_cache/*.*'); |
|
| 185 | 185 | $total_smarty_cache = 0; |
| 186 | 186 | foreach ($files as $filename) { |
| 187 | 187 | if (basename(strtolower($filename)) !== 'index.html') { |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | break; |
| 193 | 193 | |
| 194 | 194 | case 2: |
| 195 | - $files = glob($cachePath . 'smarty_compile/*.*'); |
|
| 195 | + $files = glob($cachePath.'smarty_compile/*.*'); |
|
| 196 | 196 | $total_smarty_compile = 0; |
| 197 | 197 | foreach ($files as $filename) { |
| 198 | 198 | if (basename(strtolower($filename)) !== 'index.html') { |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | // ask the cache to clear itself |
| 207 | 207 | $status = Xoops::getInstance()->cache()->delete('system'); |
| 208 | 208 | // this section captures legacy cache use only |
| 209 | - $files = glob($cachePath . 'xoops_cache/*.*'); |
|
| 209 | + $files = glob($cachePath.'xoops_cache/*.*'); |
|
| 210 | 210 | $total_xoops_cache = 0; |
| 211 | 211 | foreach ($files as $filename) { |
| 212 | 212 | if (basename(strtolower($filename)) != 'index.html') { |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | ++$total_xoops_cache; |
| 215 | 215 | } |
| 216 | 216 | } |
| 217 | - $total_xoops_cache = $status || ($total_xoops_cache>0); |
|
| 217 | + $total_xoops_cache = $status || ($total_xoops_cache > 0); |
|
| 218 | 218 | break; |
| 219 | 219 | } |
| 220 | 220 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // View Account |
| 29 | 29 | $ret[] = [ |
| 30 | 30 | 'name' => XoopsLocale::VIEW_ACCOUNT, |
| 31 | - 'link' => $xoops->url('userinfo.php?uid=' . $xoops->user->getVar('uid')), |
|
| 31 | + 'link' => $xoops->url('userinfo.php?uid='.$xoops->user->getVar('uid')), |
|
| 32 | 32 | 'icon' => 'glyphicon-user', |
| 33 | 33 | ]; |
| 34 | 34 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $name = XoopsLocale::INBOX; |
| 60 | 60 | if ($pm_count = $pm_handler->getCount($criteria)) { |
| 61 | - $name = XoopsLocale::INBOX . ' <span class="badge">' . $pm_count . '</span>'; |
|
| 61 | + $name = XoopsLocale::INBOX.' <span class="badge">'.$pm_count.'</span>'; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $ret[] = [ |
@@ -75,13 +75,13 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $xoops = \Xoops::getInstance(); |
| 78 | - $flagDir = $this->flagSource . $sizeDir . '/'; |
|
| 79 | - $flagFile = $flagDir . $countryCode . '.png'; |
|
| 78 | + $flagDir = $this->flagSource.$sizeDir.'/'; |
|
| 79 | + $flagFile = $flagDir.$countryCode.'.png'; |
|
| 80 | 80 | |
| 81 | 81 | $file = $xoops->path($flagFile); |
| 82 | 82 | // switch to unknown if file is not readable |
| 83 | 83 | if (!is_readable($file)) { |
| 84 | - $flagFile = $flagDir . '_unknown.png'; |
|
| 84 | + $flagFile = $flagDir.'_unknown.png'; |
|
| 85 | 85 | } |
| 86 | 86 | $url = $xoops->url($flagFile); |
| 87 | 87 | return $url; |
@@ -94,24 +94,24 @@ discard block |
||
| 94 | 94 | * |
| 95 | 95 | * @var string[] |
| 96 | 96 | */ |
| 97 | - private $overrideMap = array ( |
|
| 98 | - 'AC' => 'SH', // *Ascension Island part of Saint Helena, Ascension and Tristan da Cunha |
|
| 99 | - 'BQ' => 'NL', // Caribbean Netherlands |
|
| 100 | - 'BV' => 'NO', // Bouvet Island, dependency of Norway |
|
| 101 | - 'CP' => 'FR', // *Clipperton Island, overseas possession of France |
|
| 102 | - 'DG' => 'GB', // *Diego Garcia, British Indian Ocean Territory disputed sovereignty |
|
| 103 | - 'EA' => 'ES', // *Ceuta & Melilla, Spanish cities on the north coast of Africa |
|
| 104 | - 'GF' => 'FR', // French Guiana, overseas region of France |
|
| 105 | - 'GP' => 'FR', // Guadeloupe, overseas region of France |
|
| 106 | - 'HM' => 'AU', // Heard & McDonald Islands, Australian external territory |
|
| 107 | - 'IO' => 'GB', // British Indian Ocean Territory |
|
| 108 | - 'PM' => 'FR', // St. Pierre & Miquelon, territorial overseas collectivity of France |
|
| 109 | - 'RE' => 'FR', // Réunion, overseas region of France |
|
| 110 | - 'SJ' => 'NO', // Svalbard & Jan Mayen, integrated parts of Norway not allocated to counties |
|
| 111 | - 'SX' => 'NL', // Sint Maarten, constituent country of the Kingdom of the Netherlands |
|
| 112 | - 'TA' => 'SH', // *Tristan da Cunha part of Saint Helena, Ascension and Tristan da Cunha |
|
| 113 | - 'UM' => 'US', // U.S. Outlying Islands |
|
| 114 | - 'XK' => '_kosovo', // (User-assigned range) temporary assigned code |
|
| 97 | + private $overrideMap = array( |
|
| 98 | + 'AC' => 'SH', // *Ascension Island part of Saint Helena, Ascension and Tristan da Cunha |
|
| 99 | + 'BQ' => 'NL', // Caribbean Netherlands |
|
| 100 | + 'BV' => 'NO', // Bouvet Island, dependency of Norway |
|
| 101 | + 'CP' => 'FR', // *Clipperton Island, overseas possession of France |
|
| 102 | + 'DG' => 'GB', // *Diego Garcia, British Indian Ocean Territory disputed sovereignty |
|
| 103 | + 'EA' => 'ES', // *Ceuta & Melilla, Spanish cities on the north coast of Africa |
|
| 104 | + 'GF' => 'FR', // French Guiana, overseas region of France |
|
| 105 | + 'GP' => 'FR', // Guadeloupe, overseas region of France |
|
| 106 | + 'HM' => 'AU', // Heard & McDonald Islands, Australian external territory |
|
| 107 | + 'IO' => 'GB', // British Indian Ocean Territory |
|
| 108 | + 'PM' => 'FR', // St. Pierre & Miquelon, territorial overseas collectivity of France |
|
| 109 | + 'RE' => 'FR', // Réunion, overseas region of France |
|
| 110 | + 'SJ' => 'NO', // Svalbard & Jan Mayen, integrated parts of Norway not allocated to counties |
|
| 111 | + 'SX' => 'NL', // Sint Maarten, constituent country of the Kingdom of the Netherlands |
|
| 112 | + 'TA' => 'SH', // *Tristan da Cunha part of Saint Helena, Ascension and Tristan da Cunha |
|
| 113 | + 'UM' => 'US', // U.S. Outlying Islands |
|
| 114 | + 'XK' => '_kosovo', // (User-assigned range) temporary assigned code |
|
| 115 | 115 | ); |
| 116 | 116 | |
| 117 | 117 | /** |