@@ -27,11 +27,11 @@ |
||
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'); |
@@ -58,13 +58,13 @@ |
||
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 |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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); |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -18,7 +18,7 @@ |
||
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 |
@@ -15,7 +15,7 @@ |
||
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(); |
@@ -22,7 +22,7 @@ discard block |
||
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 |
||
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'); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $code = new Xoops\Form\Text('Code', 'code', 10, 25, '', 'Code...'); |
27 | 27 | $code->setDescription('Description code'); |
28 | 28 | $code->setPattern('^.{3,}$', 'You need at least 3 characters'); |
29 | -$code->setDatalist(array('list 1','list 2','list 3')); |
|
29 | +$code->setDatalist(array('list 1', 'list 2', 'list 3')); |
|
30 | 30 | $form->addElement($code, true); |
31 | 31 | |
32 | 32 | $password = new Xoops\Form\Password('Password', 'password', null, null, '', 'off', 'Enter Password'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $checkbox->setDescription('Description Checkbox'); |
73 | 73 | $form->addElement($checkbox, true); |
74 | 74 | |
75 | -$label= new Xoops\Form\Label('Label', 'label', 'label'); |
|
75 | +$label = new Xoops\Form\Label('Label', 'label', 'label'); |
|
76 | 76 | $label->setDescription('Description Label'); |
77 | 77 | $form->addElement($label, true); |
78 | 78 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author trabis <[email protected]> |
16 | 16 | */ |
17 | 17 | |
18 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
18 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
19 | 19 | |
20 | 20 | $xoops = Xoops::getInstance(); |
21 | 21 | $xoops->header(); |
@@ -26,5 +26,5 @@ discard block |
||
26 | 26 | See how Codex module hooks into the system module just by using this codex/class/plugin/system.php |
27 | 27 | "; |
28 | 28 | |
29 | -\Xoops\Utils::dumpFile(__DIR__ . '/class/plugin/system.php'); |
|
29 | +\Xoops\Utils::dumpFile(__DIR__.'/class/plugin/system.php'); |
|
30 | 30 | $xoops->footer(); |