@@ -15,7 +15,7 @@ |
||
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(); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @link http://xoops.org |
20 | 20 | */ |
21 | 21 | |
22 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
22 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
23 | 23 | |
24 | 24 | $xoops = Xoops::getInstance(); |
25 | 25 | $xoops->header(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // we can add any HTML attributes to the img tag |
52 | 52 | $attributes = ['class' => 'img-thumbnail', 'title' => Territory::getName($country)]; |
53 | 53 | $img = $xoops->service('countryflag')->getImgTag($country, $attributes)->getValue(); |
54 | -echo $img . '<br /><br />'; |
|
54 | +echo $img.'<br /><br />'; |
|
55 | 55 | |
56 | 56 | if (!$xoops->service('countryflag')->isAvailable()) { |
57 | 57 | echo 'Please install a countryflag provider to view this demonstration.'; |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | use Xmf\Module\Helper\Permission; |
24 | 24 | use Xmf\Module\Helper\Session; |
25 | 25 | |
26 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
26 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
27 | 27 | |
28 | 28 | $xoops = Xoops::getInstance(); |
29 | 29 | $xoops->header(); |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | if ($sessionHelper) { |
35 | 35 | $var = $sessionHelper->get('fred'); |
36 | 36 | if ($var) { |
37 | - echo sprintf('Clearing session variable value of "%s"', $var) . '<br />'; |
|
37 | + echo sprintf('Clearing session variable value of "%s"', $var).'<br />'; |
|
38 | 38 | $sessionHelper->destroy(); |
39 | 39 | } else { |
40 | 40 | $var = date('Y-m-d H:i:s'); |
41 | - echo sprintf('Session variable not set. Setting as: %s', $var) . '<br />'; |
|
41 | + echo sprintf('Session variable not set. Setting as: %s', $var).'<br />'; |
|
42 | 42 | $sessionHelper->set('fred', $var); |
43 | 43 | } |
44 | 44 | } |
@@ -47,15 +47,15 @@ discard block |
||
47 | 47 | $permissionHelper = new Permission(); |
48 | 48 | if ($permissionHelper) { |
49 | 49 | // this is the name and item we are going to work with |
50 | - $permissionName='fred'; |
|
51 | - $permissionItemId=1; |
|
50 | + $permissionName = 'fred'; |
|
51 | + $permissionItemId = 1; |
|
52 | 52 | |
53 | 53 | // if this is a post operation get the input and save it |
54 | - if ('POST'===Request::getMethod()) { |
|
54 | + if ('POST' === Request::getMethod()) { |
|
55 | 55 | echo $xoops->alert('success', 'Permission updated'); |
56 | 56 | // save the data |
57 | - $name=$permissionHelper->defaultFieldName($permissionName, $permissionItemId); |
|
58 | - $groups=Request::getVar($name, array(), 'POST'); |
|
57 | + $name = $permissionHelper->defaultFieldName($permissionName, $permissionItemId); |
|
58 | + $groups = Request::getVar($name, array(), 'POST'); |
|
59 | 59 | $permissionHelper->savePermissionForItem($permissionName, $permissionItemId, $groups); |
60 | 60 | } |
61 | 61 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | if ($permissionHelper->checkPermission($permissionName, $permissionItemId)) { |
83 | 83 | echo "<p>You have the <strong>'$permissionName'</strong> permission for the 'codex' module.</p>"; |
84 | 84 | } else { |
85 | - echo "<p>You <em>DO NOT</em> have the <strong>'$permissionName'</strong> " . |
|
85 | + echo "<p>You <em>DO NOT</em> have the <strong>'$permissionName'</strong> ". |
|
86 | 86 | "permission for the 'codex' module.</p>"; |
87 | 87 | } |
88 | 88 | } |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | echo '<h2>Metagen</h2>'; |
91 | 91 | |
92 | 92 | //define a title and article to work with |
93 | -$keywords=''; |
|
94 | -$title="xmf - the XOOPS Module Framework"; |
|
95 | -$article =<<<EOT |
|
93 | +$keywords = ''; |
|
94 | +$title = "xmf - the XOOPS Module Framework"; |
|
95 | +$article = <<<EOT |
|
96 | 96 | xmf - XOOPS Module Framework |
97 | 97 | |
98 | 98 | XMF is Copyright © 2011-2018 The XOOPS Project |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | echo '<h4>Extracted Description</h4>'; |
123 | 123 | // get the intro of the article to use as the description |
124 | 124 | $description = Metagen::generateDescription($article, 50); |
125 | -echo '<p>' . $description . '</p>'; |
|
125 | +echo '<p>'.$description.'</p>'; |
|
126 | 126 | |
127 | 127 | echo '<h4>SEO Slug</h4>'; |
128 | 128 | // turn title into a slug |
129 | -echo '<p>' . Metagen::generateSeoTitle($title) . '</p>'; |
|
129 | +echo '<p>'.Metagen::generateSeoTitle($title).'</p>'; |
|
130 | 130 | |
131 | 131 | // highlight keywords in article |
132 | 132 | echo '<h4>Article with Top 25 Keywords Highlighted</h4>'; |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @author Mage Grégory (AKA Mage) |
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(); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @link http://xoops.org |
17 | 17 | */ |
18 | 18 | |
19 | -include dirname(dirname(__DIR__)) . '/mainfile.php'; |
|
19 | +include dirname(dirname(__DIR__)).'/mainfile.php'; |
|
20 | 20 | |
21 | 21 | $xoops = Xoops::getInstance(); |
22 | 22 | $xoops->header(); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @author Laurent JEN (aka DuGris) |
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(); |
@@ -31,5 +31,5 @@ discard block |
||
31 | 31 | </ul> |
32 | 32 | "; |
33 | 33 | |
34 | -\Xoops\Utils::dumpFile(__DIR__ . '/class/plugin/system.php'); |
|
34 | +\Xoops\Utils::dumpFile(__DIR__.'/class/plugin/system.php'); |
|
35 | 35 | $xoops->footer(); |
@@ -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 | $configs = $config_handler->getConfigsByUser($xoops->user->getVar('uid'), $xoops->module->getVar('mid')); |
27 | 27 | \Xoops\Utils::dumpVar($configs); |
28 | 28 | $url = $xoops->url('modules/userconfigs'); |
29 | - echo '<a href="' . $url . '">Change your settings</a>'; |
|
29 | + echo '<a href="'.$url.'">Change your settings</a>'; |
|
30 | 30 | } else { |
31 | 31 | echo 'Please login and install userconfigs module'; |
32 | 32 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function waiting() |
48 | 48 | { |
49 | 49 | $xoops = Xoops::getInstance(); |
50 | - $ret['count'] = count(\Xoops\Core\Lists\File::getList($xoops->path('modules/codex/')))-2; |
|
50 | + $ret['count'] = count(\Xoops\Core\Lists\File::getList($xoops->path('modules/codex/'))) - 2; |
|
51 | 51 | $ret['name'] = $xoops->getHandlerModule()->getByDirname('codex')->getVar('name'); |
52 | 52 | $ret['link'] = $xoops->url('modules/codex/'); |
53 | 53 | return array(); |
@@ -69,16 +69,16 @@ discard block |
||
69 | 69 | public function backend($limit) |
70 | 70 | { |
71 | 71 | $xoops = Xoops::getInstance(); |
72 | - $i=0; |
|
73 | - $ret=array(); |
|
72 | + $i = 0; |
|
73 | + $ret = array(); |
|
74 | 74 | |
75 | 75 | $files = \Xoops\Core\Lists\File::getList($xoops->path('modules/codex/')); |
76 | 76 | foreach ($files as $file) { |
77 | 77 | if (!in_array($file, array('xoops_version.php', 'index.php'))) { |
78 | 78 | $ret[$i]['title'] = ucfirst(str_replace('.php', '', $file)); |
79 | - $ret[$i]['link'] = $xoops->url('modules/codex/' . $file); |
|
80 | - $ret[$i]['content'] = 'Codex module : ' . ucfirst(str_replace('.php', '', $file)); |
|
81 | - $ret[$i]['date'] = filemtime($xoops->path('modules/codex/' . $file)); |
|
79 | + $ret[$i]['link'] = $xoops->url('modules/codex/'.$file); |
|
80 | + $ret[$i]['content'] = 'Codex module : '.ucfirst(str_replace('.php', '', $file)); |
|
81 | + $ret[$i]['date'] = filemtime($xoops->path('modules/codex/'.$file)); |
|
82 | 82 | ++$i; |
83 | 83 | } |
84 | 84 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function search($queries, $andor, $limit, $start, $uid) |
21 | 21 | { |
22 | 22 | $xoops = Xoops::getInstance(); |
23 | - $queries = implode(' ', (array) $queries); |
|
23 | + $queries = implode(' ', (array)$queries); |
|
24 | 24 | |
25 | 25 | $files = \Xoops\Core\Lists\File::getList($xoops->path('modules/codex/')); |
26 | 26 | $res = array(); |