Completed
Pull Request — master (#586)
by Richard
14:46
created
htdocs/modules/xlanguage/blocks/xlanguage_blocks.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
htdocs/modules/xlanguage/class/xlanguage.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * @version         $Id$
25 25
  */
26 26
 
27
-include_once \XoopsBaseConfig::get('root-path') . '/modules/xlanguage/include/vars.php';
27
+include_once \XoopsBaseConfig::get('root-path').'/modules/xlanguage/include/vars.php';
28 28
 
29 29
 /**
30 30
  * Class XlanguageLanguage
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function getValues($keys = null, $format = 's', $maxDepth = 1)
56 56
     {
57 57
         $ret = parent::getValues();
58
-        $ret['xlanguage_image'] = \XoopsBaseConfig::get('url') . '/media/xoops/images/flags/' . \Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme') . '/' . $this->getVar('xlanguage_image');
58
+        $ret['xlanguage_image'] = \XoopsBaseConfig::get('url').'/media/xoops/images/flags/'.\Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme').'/'.$this->getVar('xlanguage_image');
59 59
         return $ret;
60 60
     }
61 61
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public function loadConfig()
103 103
     {
104 104
         $xoops = Xoops::getInstance();
105
-        $this->configPath = \XoopsBaseConfig::get('var-path') . '/configs/';
105
+        $this->configPath = \XoopsBaseConfig::get('var-path').'/configs/';
106 106
         $this->configFile = $xoops->registry()->get('XLANGUAGE_CONFIG_FILE');
107 107
         $this->configFileExt = '.php';
108 108
         return $this->cached_config = $this->loadFileConfig();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function readConfig()
127 127
     {
128
-        $path_file = $this->configPath . $this->configFile . $this->configFileExt;
128
+        $path_file = $this->configPath.$this->configFile.$this->configFileExt;
129 129
         XoopsLoad::load('XoopsFile');
130 130
         $file = XoopsFile::getHandler('file', $path_file);
131 131
         return eval(@$file->read());
@@ -152,10 +152,10 @@  discard block
 block discarded – undo
152 152
     public function writeConfig($data)
153 153
     {
154 154
         if ($this->createPath($this->configPath)) {
155
-            $path_file = $this->configPath . $this->configFile . $this->configFileExt;
155
+            $path_file = $this->configPath.$this->configFile.$this->configFileExt;
156 156
             XoopsLoad::load('XoopsFile');
157 157
             $file = XoopsFile::getHandler('file', $path_file);
158
-            return $file->write('return ' . var_export($data, true) . ';');
158
+            return $file->write('return '.var_export($data, true).';');
159 159
         }
160 160
     }
161 161
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         foreach ($paths as $path) {
178 178
             if (!empty($path)) {
179
-                $dest = $dest . '/' . $path;
179
+                $dest = $dest.'/'.$path;
180 180
                 if (!is_dir($dest)) {
181 181
                     if (!mkdir($dest, 0755)) {
182 182
                         return false;
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
         }
206 206
 
207 207
         // Simple copy for a file
208
-        if (is_file($folder_in . '/' . $source_file)) {
209
-            return copy($folder_in . '/' . $source_file, $folder_out . '/' . basename($source_file));
208
+        if (is_file($folder_in.'/'.$source_file)) {
209
+            return copy($folder_in.'/'.$source_file, $folder_out.'/'.basename($source_file));
210 210
         }
211 211
         return false;
212 212
     }
Please login to merge, or discard this patch.
htdocs/modules/xlanguage/class/helper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
      */
28 28
     public function init()
29 29
     {
30
-        if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path') . '/modules/xlanguage/include/vars.php')) {
30
+        if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path').'/modules/xlanguage/include/vars.php')) {
31 31
             include_once $hnd_file;
32 32
         }
33 33
 
34
-        if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path') . '/modules/xlanguage/include/functions.php')) {
34
+        if (XoopsLoad::fileExists($hnd_file = \XoopsBaseConfig::get('root-path').'/modules/xlanguage/include/functions.php')) {
35 35
             include_once $hnd_file;
36 36
         }
37 37
         $this->setDirname('xlanguage');
Please login to merge, or discard this patch.
htdocs/modules/xlanguage/class/form/language.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@
 block discarded – undo
58 58
 
59 59
         // language image
60 60
         $image_option_tray = new Xoops\Form\ElementTray(_AM_XLANGUAGE_IMAGE, '');
61
-        $flagPath = 'media/xoops/images/flags/' . \Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme') . '/';
61
+        $flagPath = 'media/xoops/images/flags/'.\Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme').'/';
62 62
         $image_select = new Xoops\Form\Select('', 'xlanguage_image', $obj->getVar('xlanguage_image'));
63 63
         \Xoops\Core\Lists\ImageFile::setOptionsArray($image_select, $xoops->path($flagPath));
64
-        $image_select->setExtra("onchange='showImgSelected(\"image\", \"xlanguage_image\", \"/media/xoops/images/flags/" . \Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme') . "/\", \"\", \"" . \XoopsBaseConfig::get('url') . "\")'");
64
+        $image_select->setExtra("onchange='showImgSelected(\"image\", \"xlanguage_image\", \"/media/xoops/images/flags/".\Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme')."/\", \"\", \"".\XoopsBaseConfig::get('url')."\")'");
65 65
         $image_tray = new Xoops\Form\ElementTray('', ' ');
66 66
         $image_tray->addElement($image_select);
67
-        $image_tray->addElement(new Xoops\Form\Label('', "<div style='padding: 8px;'><img style='width:24px; height:24px; ' src='" . \XoopsBaseConfig::get('url') . "/media/xoops/images/flags/" . \Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme') . "/" . $obj->getVar("xlanguage_image") . "' name='image' id='image' alt='' /></div>"));
67
+        $image_tray->addElement(new Xoops\Form\Label('', "<div style='padding: 8px;'><img style='width:24px; height:24px; ' src='".\XoopsBaseConfig::get('url')."/media/xoops/images/flags/".\Xoops\Module\Helper::getHelper('xlanguage')->getConfig('theme')."/".$obj->getVar("xlanguage_image")."' name='image' id='image' alt='' /></div>"));
68 68
         $image_option_tray->addElement($image_tray);
69 69
         $this->addElement($image_option_tray);
70 70
 
Please login to merge, or discard this patch.
htdocs/modules/codex/request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @author    trabis <[email protected]>
18 18
  */
19 19
 
20
-include dirname(dirname(__DIR__)) . '/mainfile.php';
20
+include dirname(dirname(__DIR__)).'/mainfile.php';
21 21
 
22 22
 $xoops = Xoops::getInstance();
23 23
 // Warning: code depending on Xoops\Core\HttpRequest may need to change
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 $code = new Xoops\Form\Text('String', 'string', 2, 25, '', 'string...');
53 53
 $code->setDescription('Description text');
54 54
 $code->setPattern('^.{3,}$', 'You need at least 3 characters');
55
-$code->setDatalist(array('list 1','list 2','list 3'));
55
+$code->setDatalist(array('list 1', 'list 2', 'list 3'));
56 56
 $form->addElement($code, true);
57 57
 
58 58
 $select = new Xoops\Form\Select('Select', 'id', '', 1, false);
Please login to merge, or discard this patch.
htdocs/modules/codex/cache.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @author    trabis <[email protected]>
18 18
  */
19 19
 
20
-include dirname(dirname(__DIR__)) . '/mainfile.php';
20
+include dirname(dirname(__DIR__)).'/mainfile.php';
21 21
 
22 22
 $xoops = Xoops::getInstance();
23 23
 $xoops->header();
@@ -59,27 +59,27 @@  discard block
 block discarded – undo
59 59
 echo '<h4>Manual read() and write()</h4>';
60 60
 // We can do things manually
61 61
 $key = 'module/codex/firstkey';
62
-echo $key . ' ';
62
+echo $key.' ';
63 63
 if (!$readData = $cache->read($key)) {
64 64
     echo 'Had to rebuild: ';
65 65
     $content = 'This is my content';
66 66
     $cache->write($key, $content);
67 67
     $readData = $content;
68 68
 }
69
-echo $readData . '<br />';
69
+echo $readData.'<br />';
70 70
 
71 71
 echo '<h4>Streamlined with cacheRead()</h4>';
72 72
 // We can let the cache handle lots of the details. We just provide a function
73 73
 // that builds the content to be cached. The function can be any callback/closure.
74 74
 $key = 'module/codex/secondkey';
75
-echo $key . ' ' . $cache->cacheRead($key, 'getSomeContent') . '<br />';
75
+echo $key.' '.$cache->cacheRead($key, 'getSomeContent').'<br />';
76 76
 
77 77
 echo '<h3>Simplify even more with Xmf</h3>';
78 78
 // Xmf provide cache simplified cache functions that automatically follow the
79 79
 // naming standard for module specific cache keys.
80 80
 $xmfCache = new \Xmf\Module\Helper\Cache();
81 81
 $key = 'xmfdemo';
82
-echo $key . ' ' . $xmfCache->cacheRead($key, 'getSomeContent') . '<br />';
82
+echo $key.' '.$xmfCache->cacheRead($key, 'getSomeContent').'<br />';
83 83
 
84 84
 echo '<h3>Alternate Caches</h3>';
85 85
 // Xoops cache() method can take a name parameter, to choose a cache configuration.
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 // The default cache definition is named 'default' and it will be used if no
88 88
 // name is specified to cache() or if no cache is defined for the specified name.
89 89
 $key = 'module/codex/alternate';
90
-echo $key . ' ' . $xoops->cache('alternate')->cacheRead($key, 'getSomeContent') . '<br />';
90
+echo $key.' '.$xoops->cache('alternate')->cacheRead($key, 'getSomeContent').'<br />';
91 91
 
92 92
 echo '<br /><a href="?">Refresh</a> - <a href="?delete=1">Delete caches</a>';
93 93
 
Please login to merge, or discard this patch.
htdocs/modules/codex/pdf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  * @author    trabis <[email protected]>
19 19
  */
20 20
 
21
-include dirname(dirname(__DIR__)) . '/mainfile.php';
21
+include dirname(dirname(__DIR__)).'/mainfile.php';
22 22
 
23 23
 $xoops = Xoops::getInstance();
24 24
 
Please login to merge, or discard this patch.
htdocs/modules/codex/assets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
  * @author    Richard Griffith <[email protected]>
16 16
  */
17 17
 
18
-require dirname(dirname(__DIR__)) . '/mainfile.php';
18
+require dirname(dirname(__DIR__)).'/mainfile.php';
19 19
 
20 20
 $xoops = Xoops::getInstance();
21 21
 $xoops->header();
Please login to merge, or discard this patch.
htdocs/modules/codex/email.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @author    Laurent JEN - aka DuGris
23 23
  */
24 24
 
25
-include dirname(dirname(__DIR__)) . '/mainfile.php';
25
+include dirname(dirname(__DIR__)).'/mainfile.php';
26 26
 
27 27
 $xoops = Xoops::getInstance();
28 28
 $xoops->header();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                 echo $errors;
56 56
             }
57 57
         } catch (\InvalidArgumentException $e) {
58
-            echo 'Message was not sent. ' . $e->getMessage();
58
+            echo 'Message was not sent. '.$e->getMessage();
59 59
         }
60 60
     } else {
61 61
         $form = new ThemeForm('Email Service Example', 'example', '', 'post', true, 'horizontal');
Please login to merge, or discard this patch.