@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $skipmember->addOption(0, _AM_XCAPTCHA_DISABLE); |
| 48 | 48 | $this->addElement($skipmember, false); |
| 49 | 49 | |
| 50 | - $this->addElement(new Xoops\Form\Text(_AM_XCAPTCHA_MAXATTEMPTS, 'maxattempts', 2, 2, $this->config['maxattempts'] ), true); |
|
| 50 | + $this->addElement(new Xoops\Form\Text(_AM_XCAPTCHA_MAXATTEMPTS, 'maxattempts', 2, 2, $this->config['maxattempts']), true); |
|
| 51 | 51 | |
| 52 | 52 | $this->addElement(new Xoops\Form\Hidden('type', 'config')); |
| 53 | 53 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @version $Id$ |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | -include __DIR__ . '/header.php'; |
|
| 19 | +include __DIR__.'/header.php'; |
|
| 20 | 20 | |
| 21 | 21 | switch ($op) { |
| 22 | 22 | |
@@ -78,8 +78,8 @@ discard block |
||
| 78 | 78 | } else { |
| 79 | 79 | $confirm = $xoops->confirm(array( |
| 80 | 80 | 'ok' => 1, 'xlanguage_id' => $xlanguage_id, 'op' => 'del' |
| 81 | - ), $_SERVER['REQUEST_URI'], sprintf(_AM_XLANGUAGE_DELETE_CFM . "<br /><b><span style='color : Red'> %s </span></b><br /><br />", $lang->getVar('xlanguage_name'))); |
|
| 82 | - $confirm = '<div class="confirm">' . $confirm . '</div>'; |
|
| 81 | + ), $_SERVER['REQUEST_URI'], sprintf(_AM_XLANGUAGE_DELETE_CFM."<br /><b><span style='color : Red'> %s </span></b><br /><br />", $lang->getVar('xlanguage_name'))); |
|
| 82 | + $confirm = '<div class="confirm">'.$confirm.'</div>'; |
|
| 83 | 83 | $admin_page->addInfoBox(_MI_XLANGUAGE_DELETE); |
| 84 | 84 | $admin_page->addInfoBoxLine($confirm); |
| 85 | 85 | $admin_page->displayIndex(); |
@@ -104,4 +104,4 @@ discard block |
||
| 104 | 104 | $admin_page->displayIndex(); |
| 105 | 105 | break; |
| 106 | 106 | } |
| 107 | -include __DIR__ . '/footer.php'; |
|
| 107 | +include __DIR__.'/footer.php'; |
|
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @version $Id$ |
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
| 19 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
| 20 | 20 | |
| 21 | 21 | $op = ''; |
| 22 | 22 | if (isset($_POST)) { |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public static function eventCoreIncludeCommonEnd($args) |
| 35 | 35 | { |
| 36 | - if (XoopsLoad::fileExists($hnd_file = dirname(__DIR__) . '/api.php')) { |
|
| 36 | + if (XoopsLoad::fileExists($hnd_file = dirname(__DIR__).'/api.php')) { |
|
| 37 | 37 | include_once $hnd_file; |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | if (strpos($expr, '[-_]') === false) { |
| 83 | 83 | $expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr); |
| 84 | 84 | } |
| 85 | - if (($envType == 1 && preg_match('^(' . $expr . ')(;q=[0-9]\\.[0-9])?$^', $str)) || ($envType == 2 && preg_match('(\(|\[|;[[:space:]])(' . $expr . ')(;|\]|\))', $str))) { |
|
| 85 | + if (($envType == 1 && preg_match('^('.$expr.')(;q=[0-9]\\.[0-9])?$^', $str)) || ($envType == 2 && preg_match('(\(|\[|;[[:space:]])('.$expr.')(;|\]|\))', $str))) { |
|
| 86 | 86 | $lang = $key; |
| 87 | 87 | break; |
| 88 | 88 | } |
@@ -194,14 +194,14 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | // create the pattern between language tags |
| 196 | 196 | $pqhtmltags = explode(',', preg_quote($xoops->registry()->get('XLANGUAGE_TAGS_RESERVED'), '/')); |
| 197 | - $mid_pattern = '(?:(?!(' . implode('|', $pqhtmltags) . ')).)*'; |
|
| 197 | + $mid_pattern = '(?:(?!('.implode('|', $pqhtmltags).')).)*'; |
|
| 198 | 198 | |
| 199 | 199 | $patterns = array(); |
| 200 | 200 | $replaces = array(); |
| 201 | 201 | /* */ |
| 202 | 202 | if (isset($xlanguage_langs[$xoopsConfigLanguage])) { |
| 203 | 203 | $lang = $xlanguage_langs[$xoopsConfigLanguage]; |
| 204 | - $patterns[] = '/(\[([^\]]*\|)?' . preg_quote($lang) . '(\|[^\]]*)?\])(' . $mid_pattern . ')(\[\/([^\]]*\|)?' . preg_quote($lang) . '(\|[^\]]*)?\])/isU'; |
|
| 204 | + $patterns[] = '/(\[([^\]]*\|)?'.preg_quote($lang).'(\|[^\]]*)?\])('.$mid_pattern.')(\[\/([^\]]*\|)?'.preg_quote($lang).'(\|[^\]]*)?\])/isU'; |
|
| 205 | 205 | $replaces[] = '$4'; |
| 206 | 206 | } |
| 207 | 207 | /* */ |
@@ -210,11 +210,11 @@ discard block |
||
| 210 | 210 | continue; |
| 211 | 211 | } |
| 212 | 212 | $name = $xlanguage_langs[$_lang]; |
| 213 | - $patterns[] = '/(\[([^\]]*\|)?' . preg_quote($name) . '(\|[^\]]*)?\])(' . $mid_pattern . ')(\[\/([^\]]*\|)?' . preg_quote($name) . '(\|[^\]]*)?(\]\<br[\s]?[\/]?\>|\]))/isU'; |
|
| 213 | + $patterns[] = '/(\[([^\]]*\|)?'.preg_quote($name).'(\|[^\]]*)?\])('.$mid_pattern.')(\[\/([^\]]*\|)?'.preg_quote($name).'(\|[^\]]*)?(\]\<br[\s]?[\/]?\>|\]))/isU'; |
|
| 214 | 214 | $replaces[] = ''; |
| 215 | 215 | } |
| 216 | 216 | if (!empty($xoopsConfigLanguage)) { |
| 217 | - $s = preg_replace('/\[[\/]?[\|]?' . preg_quote($xoopsConfigLanguage) . '[\|]?\](\<br \/\>)?/i', '', $s); |
|
| 217 | + $s = preg_replace('/\[[\/]?[\|]?'.preg_quote($xoopsConfigLanguage).'[\|]?\](\<br \/\>)?/i', '', $s); |
|
| 218 | 218 | } |
| 219 | 219 | if (count($replaces) > 0) { |
| 220 | 220 | $s = preg_replace($patterns, $replaces, $s); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | $ret = $matches[1]; |
| 237 | 237 | if (!empty($xlanguage_langs)) { |
| 238 | - $pattern = '/(\[([\/])?(' . implode('|', array_map('preg_quote', array_values($xlanguage_langs))) . ')([\|\]]))/isU'; |
|
| 238 | + $pattern = '/(\[([\/])?('.implode('|', array_map('preg_quote', array_values($xlanguage_langs))).')([\|\]]))/isU'; |
|
| 239 | 239 | $ret = preg_replace($pattern, '[\\2\\3\\4', $ret); |
| 240 | 240 | } |
| 241 | 241 | return $ret; |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | if (!$xoops->registry()->get('XLANGUAGE_THEME_ENABLE')) { |
| 253 | 253 | return false; |
| 254 | 254 | } |
| 255 | - include_once \XoopsBaseConfig::get('root-path') . '/modules/xlanguage/blocks/xlanguage_blocks.php'; |
|
| 255 | + include_once \XoopsBaseConfig::get('root-path').'/modules/xlanguage/blocks/xlanguage_blocks.php'; |
|
| 256 | 256 | if (empty($options)) { |
| 257 | 257 | $options[0] = 'images'; // display style: image, text, select |
| 258 | 258 | $options[1] = ' '; // delimitor |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | $block = b_xlanguage_select_show($options); |
| 263 | 263 | $xoops->theme()->addStylesheet('modules/xlanguage/css/block.css'); |
| 264 | 264 | $xoops->tpl()->assign('block', $block); |
| 265 | - $xlanguage_switch_code = "<div id='xo-language' class='" . $options[0] . "'>" . $xoops->tpl()->fetch('block:xlanguage/xlanguage_block.tpl') . "</div>"; |
|
| 265 | + $xlanguage_switch_code = "<div id='xo-language' class='".$options[0]."'>".$xoops->tpl()->fetch('block:xlanguage/xlanguage_block.tpl')."</div>"; |
|
| 266 | 266 | $xoops->tpl()->assign('xlanguage_switch_code', $xlanguage_switch_code); |
| 267 | 267 | return true; |
| 268 | 268 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | function xoops_module_install_xlanguage(XoopsModule $module) |
| 28 | 28 | { |
| 29 | 29 | $xoops = Xoops::getInstance(); |
| 30 | - xlanguage_mkdirs($xoops->path(\XoopsBaseConfig::get('var-path')) . '/configs/xlanguage'); |
|
| 30 | + xlanguage_mkdirs($xoops->path(\XoopsBaseConfig::get('var-path')).'/configs/xlanguage'); |
|
| 31 | 31 | |
| 32 | 32 | return true; |
| 33 | 33 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | foreach ($paths as $path) { |
| 62 | 62 | if (!empty($path)) { |
| 63 | - $dest = $dest . '/' . $path; |
|
| 63 | + $dest = $dest.'/'.$path; |
|
| 64 | 64 | if (!is_dir($dest)) { |
| 65 | 65 | if (!mkdir($dest, 0755)) { |
| 66 | 66 | return false; |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | // Simple copy for a file |
| 93 | - if (is_file($folder_in . '/' . $source_file)) { |
|
| 94 | - return copy($folder_in . '/' . $source_file, $folder_out . '/' . basename($source_file)); |
|
| 93 | + if (is_file($folder_in.'/'.$source_file)) { |
|
| 94 | + return copy($folder_in.'/'.$source_file, $folder_out.'/'.basename($source_file)); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | return false; |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * @version $Id$ |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -return array ( |
|
| 20 | +return array( |
|
| 21 | 21 | 'charset' => array( |
| 22 | 22 | //'big5' => 'big5', |
| 23 | 23 | //'euc-kr' => 'euc-kr', |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | $xlanguage = array(); |
| 23 | 23 | |
| 24 | -if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path') . '/modules/xlanguage/include/vars.php')) { |
|
| 24 | +if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path').'/modules/xlanguage/include/vars.php')) { |
|
| 25 | 25 | include_once $hnd_file; |
| 26 | 26 | } |
| 27 | -if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path') . '/modules/xlanguage/include/functions.php')) { |
|
| 27 | +if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path').'/modules/xlanguage/include/functions.php')) { |
|
| 28 | 28 | include_once $hnd_file; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | if (!empty(${$HV})) { |
| 73 | 73 | ${$HV} = xlanguage_convert_encoding(${$HV}, $out_charset, $in_charset); |
| 74 | 74 | } |
| 75 | - $GLOBALS['HTTP' . $HV . '_VARS'] = ${$HV}; |
|
| 75 | + $GLOBALS['HTTP'.$HV.'_VARS'] = ${$HV}; |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | ob_start('xlanguage_encoding'); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $QUERY_STRING_array = array_filter(explode('&', $xoops->getEnv('QUERY_STRING'))); |
| 41 | 41 | $QUERY_STRING_new = array(); |
| 42 | 42 | foreach ($QUERY_STRING_array as $QUERY) { |
| 43 | - if (substr($QUERY, 0, (strlen($lang_tag) + 1)) != $lang_tag . '=') { |
|
| 43 | + if (substr($QUERY, 0, (strlen($lang_tag) + 1)) != $lang_tag.'=') { |
|
| 44 | 44 | $vals = explode('=', $QUERY); |
| 45 | 45 | foreach (array_keys($vals) as $key) { |
| 46 | 46 | if (preg_match('/^a-z0-9$/i', $vals[$key])) { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $block['delimitor'] = $options[1]; |
| 56 | 56 | $block['number'] = $options[2]; |
| 57 | 57 | |
| 58 | - if ($options[0]==='jquery') { |
|
| 58 | + if ($options[0] === 'jquery') { |
|
| 59 | 59 | $xoops = \Xoops::getInstance(); |
| 60 | 60 | $xoops->theme()->addBaseScriptAssets('@jqueryui'); |
| 61 | 61 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $query_string = implode('&', array_map('htmlspecialchars', $QUERY_STRING_new)); |
| 70 | 70 | $query_string .= empty($query_string) ? '' : '&'; |
| 71 | 71 | } |
| 72 | - $block['url'] = $xoops->getEnv('PHP_SELF') . '?' . $query_string . $lang_tag . '='; |
|
| 72 | + $block['url'] = $xoops->getEnv('PHP_SELF').'?'.$query_string.$lang_tag.'='; |
|
| 73 | 73 | $block['languages'] = $helper->getHandlerLanguage()->cached_config; |
| 74 | 74 | |
| 75 | 75 | return $block; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | $block_form = new Xoops\Form\BlockForm(); |
| 86 | 86 | |
| 87 | - $tmp = new Xoops\Form\Select(_MB_XLANGUAGE_DISPLAY_METHOD . ' : ', 'options[0]', $options[0]); |
|
| 87 | + $tmp = new Xoops\Form\Select(_MB_XLANGUAGE_DISPLAY_METHOD.' : ', 'options[0]', $options[0]); |
|
| 88 | 88 | $tmp->addOption('images', _MB_XLANGUAGE_DISPLAY_FLAGLIST); |
| 89 | 89 | $tmp->addOption('text', _MB_XLANGUAGE_DISPLAY_TEXTLIST); |
| 90 | 90 | $tmp->addOption('select', _MB_XLANGUAGE_DISPLAY_SELECT); |
@@ -92,8 +92,8 @@ discard block |
||
| 92 | 92 | $tmp->addOption('bootstrap', _MB_XLANGUAGE_DISPLAY_BOOTSTRAP); |
| 93 | 93 | $block_form->addElement($tmp); |
| 94 | 94 | |
| 95 | - $block_form->addElement(new Xoops\Form\Text(_MB_XLANGUAGE_IMAGE_SEPARATOR . ' (' . _MB_XLANGUAGE_OPTIONAL . ') : ', 'options[1]', 5, 5, $options[1])); |
|
| 96 | - $block_form->addElement(new Xoops\Form\Text(_MB_XLANGUAGE_IMAGE_PERROW . ' (' . _MB_XLANGUAGE_OPTIONAL . ') : ', 'options[2]', 2, 2, $options[2])); |
|
| 95 | + $block_form->addElement(new Xoops\Form\Text(_MB_XLANGUAGE_IMAGE_SEPARATOR.' ('._MB_XLANGUAGE_OPTIONAL.') : ', 'options[1]', 5, 5, $options[1])); |
|
| 96 | + $block_form->addElement(new Xoops\Form\Text(_MB_XLANGUAGE_IMAGE_PERROW.' ('._MB_XLANGUAGE_OPTIONAL.') : ', 'options[2]', 2, 2, $options[2])); |
|
| 97 | 97 | |
| 98 | 98 | return $block_form->render(); |
| 99 | 99 | } |