@@ -63,15 +63,15 @@ |
||
63 | 63 | \define('_AM_WGSITENOTICE_OC', 'Online Versions'); |
64 | 64 | \define('_AM_WGSITENOTICE_OC_DISCLAIMER', 'Disclaimer'); |
65 | 65 | \define('_AM_WGSITENOTICE_OC_DISCLAIMER_DESCR', |
66 | - 'There is no warranty for the downloaded legal notices or of parts of them. The text of the legal versions are only a suggestion.<br/>Please check before you use them, whether this suggestions comply with the legal regulations and fulfil the relevant legal requirements, instructions and guidelines.<br/>You use them at your own risk.'); |
|
66 | + 'There is no warranty for the downloaded legal notices or of parts of them. The text of the legal versions are only a suggestion.<br/>Please check before you use them, whether this suggestions comply with the legal regulations and fulfil the relevant legal requirements, instructions and guidelines.<br/>You use them at your own risk.'); |
|
67 | 67 | \define('_AM_WGSITENOTICE_OC_FORM', 'Check for available online versions'); |
68 | 68 | \define('_AM_WGSITENOTICE_OC_SERVER', 'Standard server for online check'); |
69 | 69 | \define('_AM_WGSITENOTICE_OC_START', 'Start check for available online versions'); |
70 | 70 | \define('_AM_WGSITENOTICE_OC_RESULT', 'On the named server available versions of legal notices'); |
71 | 71 | \define('_AM_WGSITENOTICE_OC_ERR_FORBIDDEN', |
72 | - 'Sorry, but the named server does not allow download of his versions of legal notices'); |
|
72 | + 'Sorry, but the named server does not allow download of his versions of legal notices'); |
|
73 | 73 | \define('_AM_WGSITENOTICE_OC_ERR_NO_VERSIONS', |
74 | - 'Sorry, but on the named server are no versions of legal notices for download available'); |
|
74 | + 'Sorry, but on the named server are no versions of legal notices for download available'); |
|
75 | 75 | \define('_AM_WGSITENOTICE_OC_ERR_INVALID_PARAM', 'Sorry, request failed caused by an invalid parameter'); |
76 | 76 | \define('_AM_WGSITENOTICE_OC_ERR_CONNECT', "Sorry, request to named server '%s' failed.<br/>Please check standard server in module settings"); |
77 | 77 | \define('_AM_WGSITENOTICE_OC_ERR_READ_XML', 'Sorry, an error occured when reading/parsing the xml-code'); |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | 'help' => 'page=help', |
39 | 39 | 'license_url' => 'www.gnu.org/licenses/gpl-2.0.html/', |
40 | 40 | 'release_info' => '', |
41 | - 'release_file' => \XOOPS_URL."/modules/{$dirname}/docs/release_info file", |
|
41 | + 'release_file' => \XOOPS_URL . "/modules/{$dirname}/docs/release_info file", |
|
42 | 42 | 'release_date' => '2021/04/01', |
43 | 43 | 'manual' => 'link to manual file', |
44 | - 'manual_file' => \XOOPS_URL."/modules/{$dirname}/docs/install.txt", |
|
44 | + 'manual_file' => \XOOPS_URL . "/modules/{$dirname}/docs/install.txt", |
|
45 | 45 | 'min_php' => '7.4', |
46 | 46 | 'min_xoops' => '2.5.11 Beta1', |
47 | 47 | 'min_admin' => '1.1', |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | 'default' => 1, |
184 | 184 | ]; |
185 | 185 | |
186 | -$currdirname = isset($GLOBALS['xoopsModule'])&& \is_object($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('dirname') : 'system'; |
|
186 | +$currdirname = isset($GLOBALS['xoopsModule']) && \is_object($GLOBALS['xoopsModule']) ? $GLOBALS['xoopsModule']->getVar('dirname') : 'system'; |
|
187 | 187 | if ($dirname == $currdirname) { |
188 | - $subcount = 1 ; |
|
189 | - $pathname = \XOOPS_ROOT_PATH. '/modules/'.$dirname; |
|
188 | + $subcount = 1; |
|
189 | + $pathname = \XOOPS_ROOT_PATH . '/modules/' . $dirname; |
|
190 | 190 | include_once $pathname . '/include/common.php'; |
191 | 191 | // Get instance of module |
192 | 192 | $helper = Helper::getInstance(); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | foreach (\array_keys($versions_arr) as $i) |
204 | 204 | { |
205 | 205 | $modversion['sub'][$subcount]['name'] = $versions_arr[$i]->getVar('version_name'); |
206 | - $modversion['sub'][$subcount++]['url'] = 'index.php?version_id=' . $versions_arr[$i]->getVar('version_id') ; |
|
206 | + $modversion['sub'][$subcount++]['url'] = 'index.php?version_id=' . $versions_arr[$i]->getVar('version_id'); |
|
207 | 207 | } |
208 | 208 | } |
209 | 209 | } |
@@ -197,14 +197,14 @@ |
||
197 | 197 | $donationform = [ |
198 | 198 | 0 => '<form name="donation" id="donation" action="https://xoops.org/modules/xdonations/" method="post" onsubmit="return xoopsFormValidate_donation();">', |
199 | 199 | 1 => '<table class="outer" cellspacing="1" width="100%"><tbody><tr><th colspan="2">' |
200 | - . \_AM_MODULEBUILDER_ABOUT_MAKE_DONATION |
|
201 | - . '</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">' |
|
202 | - . \_AM_MODULEBUILDER_DONATION_AMOUNT |
|
203 | - . '</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 EUR</option><option value="10">10.00 EUR</option><option value="20">20.00 EUR</option><option value="40">40.00 EUR</option><option value="60">60.00 EUR</option><option value="80">80.00 EUR</option><option value="90">90.00 EUR</option><option value="100">100.00 EUR</option><option value="200">200.00 EUR</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="' |
|
204 | - . \_SUBMIT |
|
205 | - . '" title="' |
|
206 | - . \_SUBMIT |
|
207 | - . '" type="submit"></td></tr></tbody></table>', |
|
200 | + . \_AM_MODULEBUILDER_ABOUT_MAKE_DONATION |
|
201 | + . '</th></tr><tr align="left" valign="top"><td class="head"><div class="xoops-form-element-caption-required"><span class="caption-text">' |
|
202 | + . \_AM_MODULEBUILDER_DONATION_AMOUNT |
|
203 | + . '</span><span class="caption-marker">*</span></div></td><td class="even"><select size="1" name="item[A][amount]" id="item[A][amount]" title="Donation Amount"><option value="5">5.00 EUR</option><option value="10">10.00 EUR</option><option value="20">20.00 EUR</option><option value="40">40.00 EUR</option><option value="60">60.00 EUR</option><option value="80">80.00 EUR</option><option value="90">90.00 EUR</option><option value="100">100.00 EUR</option><option value="200">200.00 EUR</option></select></td></tr><tr align="left" valign="top"><td class="head"></td><td class="even"><input class="formButton" name="submit" id="submit" value="' |
|
204 | + . \_SUBMIT |
|
205 | + . '" title="' |
|
206 | + . \_SUBMIT |
|
207 | + . '" type="submit"></td></tr></tbody></table>', |
|
208 | 208 | 2 => '<input name="op" id="op" value="createinvoice" type="hidden"><input name="plugin" id="plugin" value="donations" type="hidden"><input name="donation" id="donation" value="1" type="hidden"><input name="drawfor" id="drawfor" value="Chronolabs Co-Operative" type="hidden"><input name="drawto" id="drawto" value="%s" type="hidden"><input name="drawto_email" id="drawto_email" value="%s" type="hidden"><input name="key" id="key" value="%s" type="hidden"><input name="currency" id="currency" value="EUR" type="hidden"><input name="weight_unit" id="weight_unit" value="kgs" type="hidden"><input name="item[A][cat]" id="item[A][cat]" value="XDN%s" type="hidden"><input name="item[A][name]" id="item[A][name]" value="Donation for %s" type="hidden"><input name="item[A][quantity]" id="item[A][quantity]" value="1" type="hidden"><input name="item[A][shipping]" id="item[A][shipping]" value="0" type="hidden"><input name="item[A][handling]" id="item[A][handling]" value="0" type="hidden"><input name="item[A][weight]" id="item[A][weight]" value="0" type="hidden"><input name="item[A][tax]" id="item[A][tax]" value="0" type="hidden"><input name="return" id="return" value="https://xoops.org/modules/xdonations/success.php" type="hidden"><input name="cancel" id="cancel" value="https://xoops.org/modules/xdonations/success.php" type="hidden"></form>', |
209 | 209 | 'D' => '', |
210 | 210 | 3 => '', |
@@ -217,7 +217,7 @@ |
||
217 | 217 | //--></script> |
218 | 218 | <!-- End Form Validation JavaScript //-->', |
219 | 219 | ]; |
220 | - $paypalform = [ |
|
220 | + $paypalform = [ |
|
221 | 221 | 0 => '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">', |
222 | 222 | 1 => '<input name="cmd" value="_s-xclick" type="hidden">', |
223 | 223 | 2 => '<input name="hosted_button_id" value="%s" type="hidden">', |
@@ -45,7 +45,9 @@ |
||
45 | 45 | $version_crit = new \CriteriaCompo(); |
46 | 46 | $version_crit->setSort('version_id ASC, version_name'); |
47 | 47 | $version_crit->setOrder('ASC'); |
48 | - if ($version_id > 0) $version_crit->add(new \Criteria('version_id', $version_id)); |
|
48 | + if ($version_id > 0) { |
|
49 | + $version_crit->add(new \Criteria('version_id', $version_id)); |
|
50 | + } |
|
49 | 51 | $version_crit->add(new \Criteria('version_online', '1')); |
50 | 52 | $versions_rows = $versionsHandler->getCount($version_crit); |
51 | 53 | echo '<versions_rows>' . $versions_rows . "</versions_rows>\n"; |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | echo "<versions>\n"; |
58 | 58 | foreach (\array_keys($versions_arr) as $i) { |
59 | 59 | echo "\t<version>\n"; |
60 | - echo "\t<version_id>".$versions_arr[$i]->getVar('version_id')."</version_id>\n"; |
|
61 | - echo "\t<version_name>".$versions_arr[$i]->getVar('version_name')."</version_name>\n"; |
|
62 | - echo "\t<version_lang>".$versions_arr[$i]->getVar('version_lang')."</version_lang>\n"; |
|
63 | - echo "\t<version_descr>".$versions_arr[$i]->getVar('version_descr')."</version_descr>\n"; |
|
64 | - echo "\t<version_author>".$versions_arr[$i]->getVar('version_author')."</version_author>\n"; |
|
65 | - echo "\t<version_date>".$versions_arr[$i]->getVar('version_date')."</version_date>\n"; |
|
60 | + echo "\t<version_id>" . $versions_arr[$i]->getVar('version_id') . "</version_id>\n"; |
|
61 | + echo "\t<version_name>" . $versions_arr[$i]->getVar('version_name') . "</version_name>\n"; |
|
62 | + echo "\t<version_lang>" . $versions_arr[$i]->getVar('version_lang') . "</version_lang>\n"; |
|
63 | + echo "\t<version_descr>" . $versions_arr[$i]->getVar('version_descr') . "</version_descr>\n"; |
|
64 | + echo "\t<version_author>" . $versions_arr[$i]->getVar('version_author') . "</version_author>\n"; |
|
65 | + echo "\t<version_date>" . $versions_arr[$i]->getVar('version_date') . "</version_date>\n"; |
|
66 | 66 | |
67 | 67 | if ($version_id > 0) { |
68 | 68 | echo "\t\t<contents>\n"; |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | if ($contents_rows > 0) { |
77 | 77 | foreach (\array_keys($contents_arr) as $j) { |
78 | 78 | echo "\t\t\t<content>\n"; |
79 | - echo "\t\t\t\t<cont_id>".$contents_arr[$j]->getVar('cont_id')."</cont_id>\n"; |
|
80 | - echo "\t\t\t\t<cont_version_id>".$contents_arr[$j]->getVar('cont_version_id')."</cont_version_id>\n"; |
|
79 | + echo "\t\t\t\t<cont_id>" . $contents_arr[$j]->getVar('cont_id') . "</cont_id>\n"; |
|
80 | + echo "\t\t\t\t<cont_version_id>" . $contents_arr[$j]->getVar('cont_version_id') . "</cont_version_id>\n"; |
|
81 | 81 | $xml = $contents_arr[$j]->getVar('cont_header'); |
82 | - echo "\t\t\t\t<cont_header>".text2xml($xml)."</cont_header>\n"; |
|
82 | + echo "\t\t\t\t<cont_header>" . text2xml($xml) . "</cont_header>\n"; |
|
83 | 83 | $xml = $contents_arr[$j]->getVar('cont_text', 'n'); |
84 | - echo "\t\t\t\t<cont_text>".text2xml($xml)."</cont_text>\n"; |
|
85 | - echo "\t\t\t\t<cont_weight>".$contents_arr[$j]->getVar('cont_weight')."</cont_weight>\n"; |
|
86 | - echo "\t\t\t\t<cont_date>".$contents_arr[$j]->getVar('cont_date')."</cont_date>\n"; |
|
84 | + echo "\t\t\t\t<cont_text>" . text2xml($xml) . "</cont_text>\n"; |
|
85 | + echo "\t\t\t\t<cont_weight>" . $contents_arr[$j]->getVar('cont_weight') . "</cont_weight>\n"; |
|
86 | + echo "\t\t\t\t<cont_date>" . $contents_arr[$j]->getVar('cont_date') . "</cont_date>\n"; |
|
87 | 87 | echo "\t\t\t</content>\n"; |
88 | 88 | } |
89 | 89 | } |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | } |
99 | 99 | echo "</document>\n"; |
100 | 100 | |
101 | -function text2xml ($xml) { |
|
101 | +function text2xml($xml) { |
|
102 | 102 | // replace html tags e.g. in case of links in the text |
103 | 103 | $search = ['<', '>', '"']; |
104 | - $replace = ['<', '>', '"']; |
|
104 | + $replace = ['<', '>', '"']; |
|
105 | 105 | |
106 | 106 | return \str_replace($search, $replace, (string)$xml); |
107 | 107 | } |
@@ -4,12 +4,12 @@ |
||
4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
5 | 5 | */ |
6 | 6 | spl_autoload_register( |
7 | - static function ($class) { |
|
7 | + static function($class) { |
|
8 | 8 | // project-specific namespace prefix |
9 | 9 | $prefix = 'XoopsModules\\' . \ucfirst(\basename(\dirname(__DIR__))); |
10 | 10 | |
11 | 11 | // base directory for the namespace prefix |
12 | - $baseDir = \dirname(__DIR__) . '/class/'; |
|
12 | + $baseDir = \dirname(__DIR__) . '/class/'; |
|
13 | 13 | |
14 | 14 | // does the class use the namespace prefix? |
15 | 15 | $len = \mb_strlen($prefix); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | use XoopsModules\Wgsitenotice\Helper; |
23 | 23 | |
24 | -include_once \XOOPS_ROOT_PATH.'/modules/wgsitenotice/include/common.php'; |
|
24 | +include_once \XOOPS_ROOT_PATH . '/modules/wgsitenotice/include/common.php'; |
|
25 | 25 | |
26 | 26 | // Function show block |
27 | 27 | function b_wgsitenotice_versions_show($options) |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | { |
68 | 68 | |
69 | 69 | $form = \_MB_WGSITENOTICE_DISPLAY; |
70 | - $form .= "<input name='options[0]' size='5' maxlength='255' value='".$options[0]."' type='text' /> <br />"; |
|
71 | - $form .= \_MB_WGSITENOTICE_TITLELENGTH." : <input name='options[1]' size='5' maxlength='255' value='".$options[1]."' type='text' /><br /><br />"; |
|
70 | + $form .= "<input name='options[0]' size='5' maxlength='255' value='" . $options[0] . "' type='text' /> <br />"; |
|
71 | + $form .= \_MB_WGSITENOTICE_TITLELENGTH . " : <input name='options[1]' size='5' maxlength='255' value='" . $options[1] . "' type='text' /><br /><br />"; |
|
72 | 72 | \array_shift($options); |
73 | 73 | \array_shift($options); |
74 | 74 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $cont['weight'] = $contents_arr[$i]->getVar('cont_weight'); |
72 | 72 | // Get Var cont_date |
73 | 73 | $cont['date'] = \formatTimestamp($contents_arr[$i]->getVar('cont_date')); |
74 | - if ($version_id_prev == $cont['version_id']) { |
|
74 | + if ($version_id_prev == $cont['version_id']) { |
|
75 | 75 | $cont['new_version'] = 0; |
76 | 76 | $cont['nb_conts_version'] = $nb_conts_version; |
77 | 77 | } else { |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | break; |
107 | 107 | case 'save': |
108 | 108 | if ( !$GLOBALS['xoopsSecurity']->check() ) { |
109 | - \redirect_header('contents.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
109 | + \redirect_header('contents.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
110 | 110 | } |
111 | 111 | if (isset($cont_id)) { |
112 | - $contentsObj = $contentsHandler->get($cont_id); |
|
112 | + $contentsObj = $contentsHandler->get($cont_id); |
|
113 | 113 | } else { |
114 | - $contentsObj = $contentsHandler->create(); |
|
114 | + $contentsObj = $contentsHandler->create(); |
|
115 | 115 | } |
116 | 116 | // Set Vars |
117 | 117 | // Set Var cont_version_id |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $contentsObj->setVar('cont_date', \time()); |
129 | 129 | // Insert Data |
130 | 130 | if ($contentsHandler->insert($contentsObj)) { |
131 | - \redirect_header('contents.php?op=list', 2, \_AM_WGSITENOTICE_FORMOK); |
|
131 | + \redirect_header('contents.php?op=list', 2, \_AM_WGSITENOTICE_FORMOK); |
|
132 | 132 | } |
133 | 133 | // Get Form |
134 | 134 | $GLOBALS['xoopsTpl']->assign('error', $contentsObj->getHtmlErrors()); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $GLOBALS['xoopsTpl']->append('contents_list', $cont); |
89 | 89 | unset($cont); |
90 | 90 | } |
91 | - if ( $contents_rows > $limit ) { |
|
91 | + if ($contents_rows > $limit) { |
|
92 | 92 | include_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
93 | 93 | $pagenav = new \XoopsPageNav($contents_rows, $limit, $start, 'start', 'op=list&limit=' . $limit); |
94 | 94 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav()); |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
109 | 109 | break; |
110 | 110 | case 'save': |
111 | - if ( !$GLOBALS['xoopsSecurity']->check() ) { |
|
111 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
112 | 112 | \redirect_header('contents.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
113 | 113 | } |
114 | 114 | if (isset($cont_id)) { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $contentsObj->setVar('cont_header', Request::getString('cont_header')); |
124 | 124 | // Set Var cont_text |
125 | 125 | //fix for avoid hiding empty paragraphs in some browsers (instead of: $contentsObj->setVar('cont_weight', $_POST['cont_weight']); |
126 | - $cont_text = Request::getString('cont_text', '', 'default', 2); |
|
126 | + $cont_text = Request::getString('cont_text', '', 'default', 2); |
|
127 | 127 | $contentsObj->setVar('cont_text', \preg_replace('/<p><\/p>/', '<p> </p>', $cont_text)); |
128 | 128 | // Set Var cont_weight |
129 | 129 | $contentsObj->setVar('cont_weight', Request::getInt('cont_weight')); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | case 'delete': |
153 | 153 | $contentsObj = $contentsHandler->get($cont_id); |
154 | 154 | if (\isset($_REQUEST['ok']) && 1 == (int)$_REQUEST['ok']) { |
155 | - if ( !$GLOBALS['xoopsSecurity']->check() ) { |
|
155 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
156 | 156 | \redirect_header('contents.php', 3, \implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
157 | 157 | } |
158 | 158 | if ($contentsHandler->delete($contentsObj)) { |
@@ -167,9 +167,9 @@ discard block |
||
167 | 167 | |
168 | 168 | case 'order': |
169 | 169 | $corder = Request::getArray('corder'); |
170 | - for ($i = 0, $iMax = \count($corder); $i < $iMax; $i++){ |
|
170 | + for ($i = 0, $iMax = \count($corder); $i < $iMax; $i++) { |
|
171 | 171 | $contentsObj = $contentsHandler->get($corder[$i]); |
172 | - $contentsObj->setVar('cont_weight',$i+1); |
|
172 | + $contentsObj->setVar('cont_weight', $i + 1); |
|
173 | 173 | $contentsHandler->insert($contentsObj); |
174 | 174 | } |
175 | 175 | break; |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | break; |
98 | 98 | case 'save': |
99 | 99 | if ( !$GLOBALS['xoopsSecurity']->check() ) { |
100 | - \redirect_header('versions.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
100 | + \redirect_header('versions.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
101 | 101 | } |
102 | 102 | if (isset($version_id)) { |
103 | - $versionsObj = $versionsHandler->get($version_id); |
|
103 | + $versionsObj = $versionsHandler->get($version_id); |
|
104 | 104 | } else { |
105 | - $versionsObj = $versionsHandler->create(); |
|
105 | + $versionsObj = $versionsHandler->create(); |
|
106 | 106 | } |
107 | 107 | // Set Vars |
108 | 108 | // Set Var version_name |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $versionsObj->setVar('version_current', $version_current); |
140 | 140 | // Insert Data |
141 | 141 | if ($versionsHandler->insert($versionsObj)) { |
142 | - \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
142 | + \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | break; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $versionsObj->setVar('version_online', $version_online); |
153 | 153 | // Insert Data |
154 | 154 | if ($versionsHandler->insert($versionsObj)) { |
155 | - \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
155 | + \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | break; |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | $version_id = Request::getInt('version_id'); |
29 | 29 | $start = Request::getInt('start'); |
30 | 30 | |
31 | -$img_yes = "<img src='../".$modPathIcon16."/on.png' >"; |
|
32 | -$img_no = "<img src='../".$modPathIcon16."/off.png' >"; |
|
31 | +$img_yes = "<img src='../" . $modPathIcon16 . "/on.png' >"; |
|
32 | +$img_no = "<img src='../" . $modPathIcon16 . "/off.png' >"; |
|
33 | 33 | // Switch options |
34 | 34 | switch ($op) |
35 | 35 | { |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $GLOBALS['xoopsTpl']->append('versions_list', $version); |
77 | 77 | unset($version); |
78 | 78 | } |
79 | - if ( $versions_rows > $limit ) { |
|
79 | + if ($versions_rows > $limit) { |
|
80 | 80 | include_once \XOOPS_ROOT_PATH . '/class/pagenav.php'; |
81 | 81 | $pagenav = new \XoopsPageNav($versions_rows, $limit, $start, 'start', 'op=list&limit=' . $limit); |
82 | 82 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav()); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
100 | 100 | break; |
101 | 101 | case 'save': |
102 | - if ( !$GLOBALS['xoopsSecurity']->check() ) { |
|
102 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
103 | 103 | \redirect_header('versions.php', 3, \implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
104 | 104 | } |
105 | 105 | if (isset($version_id)) { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $versionsObj->setVar('version_current', $version_current); |
143 | 143 | // Insert Data |
144 | 144 | if ($versionsHandler->insert($versionsObj)) { |
145 | - \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
145 | + \redirect_header('versions.php?op=list&start=' . $start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | break; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $versionsObj->setVar('version_online', $version_online); |
156 | 156 | // Insert Data |
157 | 157 | if ($versionsHandler->insert($versionsObj)) { |
158 | - \redirect_header('versions.php?op=list&start='.$start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
158 | + \redirect_header('versions.php?op=list&start=' . $start, 2, \_AM_WGSITENOTICE_FORMOK); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 | break; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | case 'delete': |
174 | 174 | $versionsObj = $versionsHandler->get($version_id); |
175 | 175 | if (isset($_REQUEST['ok']) && 1 == (int)$_REQUEST['ok']) { |
176 | - if ( !$GLOBALS['xoopsSecurity']->check() ) { |
|
176 | + if (!$GLOBALS['xoopsSecurity']->check()) { |
|
177 | 177 | \redirect_header('versions.php', 3, \implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
178 | 178 | } |
179 | 179 | |
@@ -195,9 +195,9 @@ discard block |
||
195 | 195 | |
196 | 196 | case 'order': |
197 | 197 | $vorder = Request::getArray('vorder'); |
198 | - for ($i = 0, $iMax = \count($vorder); $i < $iMax; $i++){ |
|
198 | + for ($i = 0, $iMax = \count($vorder); $i < $iMax; $i++) { |
|
199 | 199 | $versionsObj = $versionsHandler->get($vorder[$i]); |
200 | - $versionsObj->setVar('version_weight',$i+1); |
|
200 | + $versionsObj->setVar('version_weight', $i + 1); |
|
201 | 201 | $versionsHandler->insert($versionsObj); |
202 | 202 | } |
203 | 203 | break; |
@@ -27,8 +27,8 @@ |
||
27 | 27 | // InfoBox Statistics |
28 | 28 | $adminMenu->addInfoBox(\_AM_WGSITENOTICE_STATISTICS); |
29 | 29 | // Info elements |
30 | -$adminMenu->addInfoBoxLine(\_AM_WGSITENOTICE_STATISTICS, '<label>'.\_AM_WGSITENOTICE_THEREARE_VERSIONS.'</label>', $count_versions); |
|
31 | -$adminMenu->addInfoBoxLine(\_AM_WGSITENOTICE_STATISTICS, '<label>'.\_AM_WGSITENOTICE_THEREARE_CONTENTS.'</label>', $count_contents); |
|
30 | +$adminMenu->addInfoBoxLine(\_AM_WGSITENOTICE_STATISTICS, '<label>' . \_AM_WGSITENOTICE_THEREARE_VERSIONS . '</label>', $count_versions); |
|
31 | +$adminMenu->addInfoBoxLine(\_AM_WGSITENOTICE_STATISTICS, '<label>' . \_AM_WGSITENOTICE_THEREARE_CONTENTS . '</label>', $count_contents); |
|
32 | 32 | // Render Index |
33 | 33 | echo $adminMenu->addNavigation('index.php'); |
34 | 34 | echo $adminMenu->renderIndex(); |