@@ -48,7 +48,7 @@ |
||
48 | 48 | 'xml' => array('XML', sprintf(PHP_EXTENSION, XML_PARSING)), |
49 | 49 | 'zlib' => array('Zlib', sprintf(PHP_EXTENSION, ZLIB_COMPRESSION)), |
50 | 50 | 'gd' => array( |
51 | - (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD ' . $gdlib['GD Version'] : '', |
|
51 | + (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD '.$gdlib['GD Version'] : '', |
|
52 | 52 | sprintf(PHP_EXTENSION, IMAGE_FUNCTIONS)), |
53 | 53 | 'exif' => array('Exif', sprintf(PHP_EXTENSION, IMAGE_METAS)), |
54 | 54 | 'curl' => array('Curl', sprintf(PHP_EXTENSION, CURL_HTTP)), |
@@ -188,16 +188,16 @@ |
||
188 | 188 | case 'site_cache': |
189 | 189 | $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); |
190 | 190 | $ele->addOptionArray(array( |
191 | - '0' => _NOCACHE, |
|
192 | - '30' => sprintf(_SECONDS, 30), |
|
193 | - '60' => _MINUTE, |
|
194 | - '300' => sprintf(_MINUTES, 5), |
|
195 | - '1800' => sprintf(_MINUTES, 30), |
|
196 | - '3600' => _HOUR, |
|
197 | - '18000' => sprintf(_HOURS, 5), |
|
198 | - '86400' => _DAY, |
|
199 | - '259200' => sprintf(_DAYS, 3), |
|
200 | - '604800' => _WEEK)); |
|
191 | + '0' => _NOCACHE, |
|
192 | + '30' => sprintf(_SECONDS, 30), |
|
193 | + '60' => _MINUTE, |
|
194 | + '300' => sprintf(_MINUTES, 5), |
|
195 | + '1800' => sprintf(_MINUTES, 30), |
|
196 | + '3600' => _HOUR, |
|
197 | + '18000' => sprintf(_HOURS, 5), |
|
198 | + '86400' => _DAY, |
|
199 | + '259200' => sprintf(_DAYS, 3), |
|
200 | + '604800' => _WEEK)); |
|
201 | 201 | break; |
202 | 202 | |
203 | 203 | case 'password': |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | die('XOOPS Custom Installation die'); |
19 | 19 | } |
20 | 20 | |
21 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
22 | -include_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
21 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
22 | +include_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
23 | 23 | |
24 | 24 | define('PREF_1', _MD_AM_GENERAL); |
25 | 25 | define('PREF_2', _MD_AM_USERSETTINGS); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | for ($i = 0; $i < $confcount; ++$i) { |
52 | 52 | $conf_catid = $config[$i]->getVar('conf_catid'); |
53 | 53 | if (!isset($ret[$conf_catid])) { |
54 | - $form_title = constant('PREF_' . $conf_catid); |
|
54 | + $form_title = constant('PREF_'.$conf_catid); |
|
55 | 55 | $ret[$conf_catid] = new XoopsThemeForm($form_title, 'configs', 'index.php', 'post'); |
56 | 56 | } |
57 | 57 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | case 'theme': |
98 | 98 | case 'theme_multi': |
99 | 99 | $ele = ($config[$i]->getVar('conf_formtype') !== 'theme_multi') ? new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) : new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true); |
100 | - require_once XOOPS_ROOT_PATH . '/class/xoopslists.php'; |
|
100 | + require_once XOOPS_ROOT_PATH.'/class/xoopslists.php'; |
|
101 | 101 | $dirlist = XoopsLists::getThemesList(); |
102 | 102 | if (!empty($dirlist)) { |
103 | 103 | asort($dirlist); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $ele = new XoopsFormElementTray($title, '<br>'); |
176 | 176 | foreach (array_keys($modules) as $mid) { |
177 | 177 | $c_val = isset($currrent_val[$mid]) ? (int)$currrent_val[$mid] : null; |
178 | - $selform = new XoopsFormSelect($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name') . "[$mid]", $c_val); |
|
178 | + $selform = new XoopsFormSelect($modules[$mid]->getVar('name'), $config[$i]->getVar('conf_name')."[$mid]", $c_val); |
|
179 | 179 | $selform->addOptionArray($cache_options); |
180 | 180 | $ele->addElement($selform); |
181 | 181 | unset($selform); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | xoops_load('XoopsFormRendererBootstrap3'); |
247 | 247 | XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap3()); |
248 | 248 | |
249 | - $title = (!defined($config->getVar('conf_desc')) || constant($config->getVar('conf_desc')) === '') ? constant($config->getVar('conf_title')) : constant($config->getVar('conf_title')) . '<br><br><span>' . constant($config->getVar('conf_desc')) . '</span>'; |
|
249 | + $title = (!defined($config->getVar('conf_desc')) || constant($config->getVar('conf_desc')) === '') ? constant($config->getVar('conf_title')) : constant($config->getVar('conf_title')).'<br><br><span>'.constant($config->getVar('conf_desc')).'</span>'; |
|
250 | 250 | $form_theme_set = new XoopsFormSelect('', $config->getVar('conf_name'), $config->getConfValueForOutput(), 1, false); |
251 | 251 | $dirlist = XoopsLists::getThemesList(); |
252 | 252 | if (!empty($dirlist)) { |
@@ -278,18 +278,18 @@ discard block |
||
278 | 278 | } else { |
279 | 279 | $label_content .= '<div class="theme_preview" id="'.$theme.'" style="display:none;">'; |
280 | 280 | } |
281 | - if (file_exists(XOOPS_ROOT_PATH . "/themes/$theme/theme.ini")) { |
|
282 | - $theme_ini = parse_ini_file(XOOPS_ROOT_PATH . "/themes/$theme/theme.ini"); |
|
281 | + if (file_exists(XOOPS_ROOT_PATH."/themes/$theme/theme.ini")) { |
|
282 | + $theme_ini = parse_ini_file(XOOPS_ROOT_PATH."/themes/$theme/theme.ini"); |
|
283 | 283 | if ($theme_ini['screenshot'] == '') { |
284 | 284 | $theme_ini['screenshot'] = 'screenshot.png'; |
285 | 285 | $theme_ini['thumbnail'] = 'thumbnail.png'; |
286 | 286 | } |
287 | 287 | } |
288 | 288 | |
289 | - if ($theme_ini['screenshot'] !== '' && file_exists(XOOPS_ROOT_PATH . '/themes/' . $theme . '/' . $theme_ini['screenshot'])) { |
|
290 | - $label_content .= '<img class="img-responsive" src="' . XOOPS_URL . '/themes/' . $theme . '/' . $theme_ini['screenshot'] . '" alt="Screenshot" />'; |
|
291 | - } elseif ($theme_ini['thumbnail'] !== '' && file_exists(XOOPS_ROOT_PATH . '/themes/' . $theme .'/' . $theme_ini['thumbnail'])) { |
|
292 | - $label_content .= '<img class="img-responsive" src="' . XOOPS_URL . '/themes/' . $theme . '/' . $theme_ini['thumbnail'] . '" alt="$theme" />'; |
|
289 | + if ($theme_ini['screenshot'] !== '' && file_exists(XOOPS_ROOT_PATH.'/themes/'.$theme.'/'.$theme_ini['screenshot'])) { |
|
290 | + $label_content .= '<img class="img-responsive" src="'.XOOPS_URL.'/themes/'.$theme.'/'.$theme_ini['screenshot'].'" alt="Screenshot" />'; |
|
291 | + } elseif ($theme_ini['thumbnail'] !== '' && file_exists(XOOPS_ROOT_PATH.'/themes/'.$theme.'/'.$theme_ini['thumbnail'])) { |
|
292 | + $label_content .= '<img class="img-responsive" src="'.XOOPS_URL.'/themes/'.$theme.'/'.$theme_ini['thumbnail'].'" alt="$theme" />'; |
|
293 | 293 | } else { |
294 | 294 | $label_content .= THEME_NO_SCREENSHOT; |
295 | 295 | } |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | |
302 | 302 | $form = new XoopsThemeForm($title, 'themes', 'index.php', 'post'); |
303 | 303 | $form->addElement($form_theme_set); |
304 | - $form->addElement(new XoopsFormLabel('', "<div id='screenshot'>" . $label_content . '</div>')); |
|
304 | + $form->addElement(new XoopsFormLabel('', "<div id='screenshot'>".$label_content.'</div>')); |
|
305 | 305 | |
306 | 306 | $form->addElement(new XoopsFormHidden('conf_ids[]', $config->getVar('conf_id'))); |
307 | 307 |
@@ -198,9 +198,9 @@ discard block |
||
198 | 198 | $dbm->insert('config', " VALUES (32, 0, 1, 'com_mode', '_MD_AM_COMMODE', 'flat', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); |
199 | 199 | $dbm->insert('config', " VALUES (33, 0, 1, 'com_order', '_MD_AM_COMORDER', '0', '_MD_AM_COMORDERDSC', 'select', 'int', 36)"); |
200 | 200 | $dbm->insert('config', " VALUES (34, 0, 2, 'bad_unames', '_MD_AM_BADUNAMES', '" . addslashes(serialize(array( |
201 | - 'webmaster', |
|
202 | - '^xoops', |
|
203 | - '^admin'))) . "', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); |
|
201 | + 'webmaster', |
|
202 | + '^xoops', |
|
203 | + '^admin'))) . "', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); |
|
204 | 204 | $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '" . addslashes(serialize(array('xoops.org$'))) . "', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); |
205 | 205 | $dbm->insert('config', " VALUES (36, 0, 2, 'maxuname', '_MD_AM_MAXUNAME', '10', '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)"); |
206 | 206 | $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '" . addslashes(serialize(array('127.0.0.1'))) . "', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); |
@@ -208,8 +208,8 @@ discard block |
||
208 | 208 | $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS © 2001-" . date('Y', time()) . " <a href=\"http://xoops.org\" rel=\"external\" title=\"The XOOPS Project\">The XOOPS Project</a>', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); |
209 | 209 | $dbm->insert('config', " VALUES (40, 0, 4, 'censor_enable', '_MD_AM_DOCENSOR', '0', '_MD_AM_DOCENSORDSC', 'yesno', 'int', 0)"); |
210 | 210 | $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '" . addslashes(serialize(array( |
211 | - 'fuck', |
|
212 | - 'shit'))) . "', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); |
|
211 | + 'fuck', |
|
212 | + 'shit'))) . "', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); |
|
213 | 213 | $dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)"); |
214 | 214 | $dbm->insert('config', " VALUES (43, 0, 3, 'meta_robots', '_MD_AM_METAROBOTS', 'index,follow', '_MD_AM_METAROBOTSDSC', 'textbox', 'text', 2)"); |
215 | 215 | $dbm->insert('config', " VALUES (44, 0, 5, 'enable_search', '_MD_AM_DOSEARCH', '1', '_MD_AM_DOSEARCHDSC', 'yesno', 'int', 0)"); |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | // of missing fields in install file, when add new fields to database) |
34 | 34 | function make_groups(&$dbm) |
35 | 35 | { |
36 | - $groups['XOOPS_GROUP_ADMIN'] = $dbm->insert('groups', " VALUES (1, '" . addslashes(_INSTALL_WEBMASTER) . "', '" . addslashes(_INSTALL_WEBMASTERD) . "', 'Admin')"); |
|
37 | - $groups['XOOPS_GROUP_USERS'] = $dbm->insert('groups', " VALUES (2, '" . addslashes(_INSTALL_REGUSERS) . "', '" . addslashes(_INSTALL_REGUSERSD) . "', 'User')"); |
|
38 | - $groups['XOOPS_GROUP_ANONYMOUS'] = $dbm->insert('groups', " VALUES (3, '" . addslashes(_INSTALL_ANONUSERS) . "', '" . addslashes(_INSTALL_ANONUSERSD) . "', 'Anonymous')"); |
|
36 | + $groups['XOOPS_GROUP_ADMIN'] = $dbm->insert('groups', " VALUES (1, '".addslashes(_INSTALL_WEBMASTER)."', '".addslashes(_INSTALL_WEBMASTERD)."', 'Admin')"); |
|
37 | + $groups['XOOPS_GROUP_USERS'] = $dbm->insert('groups', " VALUES (2, '".addslashes(_INSTALL_REGUSERS)."', '".addslashes(_INSTALL_REGUSERSD)."', 'User')"); |
|
38 | + $groups['XOOPS_GROUP_ANONYMOUS'] = $dbm->insert('groups', " VALUES (3, '".addslashes(_INSTALL_ANONUSERS)."', '".addslashes(_INSTALL_ANONUSERSD)."', 'Anonymous')"); |
|
39 | 39 | if (!$groups['XOOPS_GROUP_ADMIN'] || !$groups['XOOPS_GROUP_USERS'] || !$groups['XOOPS_GROUP_ANONYMOUS']) { |
40 | 40 | return false; |
41 | 41 | } |
@@ -61,42 +61,42 @@ discard block |
||
61 | 61 | $tables = array(); |
62 | 62 | // data for table 'groups_users_link' |
63 | 63 | /* @var $dbm Db_manager */ |
64 | - $dbm->insert('groups_users_link', ' VALUES (0, ' . $groups['XOOPS_GROUP_ADMIN'] . ', 1)'); |
|
65 | - $dbm->insert('groups_users_link', ' VALUES (0, ' . $groups['XOOPS_GROUP_USERS'] . ', 1)'); |
|
64 | + $dbm->insert('groups_users_link', ' VALUES (0, '.$groups['XOOPS_GROUP_ADMIN'].', 1)'); |
|
65 | + $dbm->insert('groups_users_link', ' VALUES (0, '.$groups['XOOPS_GROUP_USERS'].', 1)'); |
|
66 | 66 | // data for table 'group_permission' |
67 | - $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_ADMIN'] . ",1,1,'module_admin')"); |
|
68 | - $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_ADMIN'] . ",1,1, 'module_read')"); |
|
69 | - $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_USERS'] . ",1,1,'module_read')"); |
|
70 | - $dbm->insert('group_permission', ' VALUES (0,' . $groups['XOOPS_GROUP_ANONYMOUS'] . ",1,1,'module_read')"); |
|
67 | + $dbm->insert('group_permission', ' VALUES (0,'.$groups['XOOPS_GROUP_ADMIN'].",1,1,'module_admin')"); |
|
68 | + $dbm->insert('group_permission', ' VALUES (0,'.$groups['XOOPS_GROUP_ADMIN'].",1,1, 'module_read')"); |
|
69 | + $dbm->insert('group_permission', ' VALUES (0,'.$groups['XOOPS_GROUP_USERS'].",1,1,'module_read')"); |
|
70 | + $dbm->insert('group_permission', ' VALUES (0,'.$groups['XOOPS_GROUP_ANONYMOUS'].",1,1,'module_read')"); |
|
71 | 71 | |
72 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",1,1,'system_admin')"); |
|
73 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",2,1,'system_admin')"); |
|
74 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",3,1,'system_admin')"); |
|
75 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",4,1,'system_admin')"); |
|
76 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",5,1,'system_admin')"); |
|
77 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",6,1,'system_admin')"); |
|
78 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",7,1,'system_admin')"); |
|
79 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",8,1,'system_admin')"); |
|
80 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",9,1,'system_admin')"); |
|
81 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",10,1,'system_admin')"); |
|
82 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",11,1,'system_admin')"); |
|
83 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",12,1,'system_admin')"); |
|
84 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",13,1,'system_admin')"); |
|
85 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",14,1,'system_admin')"); |
|
86 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",15,1,'system_admin')"); |
|
87 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",16,1,'system_admin')"); |
|
88 | - $dbm->insert('group_permission', ' VALUES(0,' . $groups['XOOPS_GROUP_ADMIN'] . ",17,1,'system_admin')"); |
|
72 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",1,1,'system_admin')"); |
|
73 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",2,1,'system_admin')"); |
|
74 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",3,1,'system_admin')"); |
|
75 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",4,1,'system_admin')"); |
|
76 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",5,1,'system_admin')"); |
|
77 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",6,1,'system_admin')"); |
|
78 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",7,1,'system_admin')"); |
|
79 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",8,1,'system_admin')"); |
|
80 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",9,1,'system_admin')"); |
|
81 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",10,1,'system_admin')"); |
|
82 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",11,1,'system_admin')"); |
|
83 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",12,1,'system_admin')"); |
|
84 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",13,1,'system_admin')"); |
|
85 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",14,1,'system_admin')"); |
|
86 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",15,1,'system_admin')"); |
|
87 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",16,1,'system_admin')"); |
|
88 | + $dbm->insert('group_permission', ' VALUES(0,'.$groups['XOOPS_GROUP_ADMIN'].",17,1,'system_admin')"); |
|
89 | 89 | // data for table 'banner' |
90 | - $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoops_flashbanner2.htm', 'http://www.xoops.org/', 1008813250, 1,'')"); |
|
91 | - $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250, 0, '')"); |
|
92 | - $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/banner.htm', 'http://www.xoops.org/', 1008813250, 1, '')"); |
|
93 | - $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '" . XOOPS_URL . "/images/banners/xoopsifyIt.gif', 'http://www.xoops.org/', 1008813250, 1, '')"); |
|
90 | + $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_flashbanner2.htm', 'http://www.xoops.org/', 1008813250, 1,'')"); |
|
91 | + $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://www.xoops.org/', 1008813250, 0, '')"); |
|
92 | + $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.htm', 'http://www.xoops.org/', 1008813250, 1, '')"); |
|
93 | + $dbm->insert('banner', " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlbanner, htmlcode) VALUES (0, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoopsifyIt.gif', 'http://www.xoops.org/', 1008813250, 1, '')"); |
|
94 | 94 | // default theme |
95 | 95 | $time = time(); |
96 | - $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', " . $time . ')'); |
|
96 | + $dbm->insert('tplset', " VALUES (1, 'default', 'XOOPS Default Template Set', '', ".$time.')'); |
|
97 | 97 | // system modules |
98 | - if (file_exists('../modules/system/language/' . $language . '/modinfo.php')) { |
|
99 | - include '../modules/system/language/' . $language . '/modinfo.php'; |
|
98 | + if (file_exists('../modules/system/language/'.$language.'/modinfo.php')) { |
|
99 | + include '../modules/system/language/'.$language.'/modinfo.php'; |
|
100 | 100 | } else { |
101 | 101 | include '../modules/system/language/english/modinfo.php'; |
102 | 102 | $language = 'english'; |
@@ -106,46 +106,46 @@ discard block |
||
106 | 106 | include_once '../modules/system/xoops_version.php'; |
107 | 107 | $time = time(); |
108 | 108 | // RMV-NOTIFY (updated for extra column in table) |
109 | - $dbm->insert('modules', " VALUES (1, '" . _MI_SYSTEM_NAME . "', " . ($modversion['version'] * 100) . ', ' . $time . ", 0, 1, 'system', 0, 1, 0, 0, 0, 0)"); |
|
109 | + $dbm->insert('modules', " VALUES (1, '"._MI_SYSTEM_NAME."', ".($modversion['version'] * 100).', '.$time.", 0, 1, 'system', 0, 1, 0, 0, 0, 0)"); |
|
110 | 110 | |
111 | 111 | foreach ($modversion['templates'] as $tplfile) { |
112 | 112 | // Main templates |
113 | - if ($fp = fopen('../modules/system/templates/' . $tplfile['file'], 'r')) { |
|
114 | - $newtplid = $dbm->insert('tplfile', " VALUES (0, 1, 'system', 'default', '" . addslashes($tplfile['file']) . "', '" . addslashes($tplfile['description']) . "', " . $time . ', ' . $time . ", 'module')"); |
|
113 | + if ($fp = fopen('../modules/system/templates/'.$tplfile['file'], 'r')) { |
|
114 | + $newtplid = $dbm->insert('tplfile', " VALUES (0, 1, 'system', 'default', '".addslashes($tplfile['file'])."', '".addslashes($tplfile['description'])."', ".$time.', '.$time.", 'module')"); |
|
115 | 115 | // $newtplid = $xoopsDB->getInsertId(); |
116 | - $tplsource = fread($fp, filesize('../modules/system/templates/' . $tplfile['file'])); |
|
116 | + $tplsource = fread($fp, filesize('../modules/system/templates/'.$tplfile['file'])); |
|
117 | 117 | fclose($fp); |
118 | - $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES (' . $newtplid . ", '" . addslashes($tplsource) . "')"); |
|
118 | + $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES ('.$newtplid.", '".addslashes($tplsource)."')"); |
|
119 | 119 | } |
120 | 120 | // Admin templates |
121 | - if ($fp = fopen('../modules/system/templates/admin/' . $tplfile['file'], 'r')) { |
|
122 | - $newtplid = $dbm->insert('tplfile', " VALUES (0, 1, 'system', 'default', '" . addslashes($tplfile['file']) . "', '" . addslashes($tplfile['description']) . "', " . $time . ', ' . $time . ", 'admin')"); |
|
121 | + if ($fp = fopen('../modules/system/templates/admin/'.$tplfile['file'], 'r')) { |
|
122 | + $newtplid = $dbm->insert('tplfile', " VALUES (0, 1, 'system', 'default', '".addslashes($tplfile['file'])."', '".addslashes($tplfile['description'])."', ".$time.', '.$time.", 'admin')"); |
|
123 | 123 | // $newtplid = $xoopsDB->getInsertId(); |
124 | - $tplsource = fread($fp, filesize('../modules/system/templates/admin/' . $tplfile['file'])); |
|
124 | + $tplsource = fread($fp, filesize('../modules/system/templates/admin/'.$tplfile['file'])); |
|
125 | 125 | fclose($fp); |
126 | - $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES (' . $newtplid . ", '" . addslashes($tplsource) . "')"); |
|
126 | + $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES ('.$newtplid.", '".addslashes($tplsource)."')"); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
130 | 130 | foreach ($modversion['blocks'] as $func_num => $newblock) { |
131 | - if ($fp = fopen('../modules/system/templates/blocks/' . $newblock['template'], 'r')) { |
|
131 | + if ($fp = fopen('../modules/system/templates/blocks/'.$newblock['template'], 'r')) { |
|
132 | 132 | $visible = 0; |
133 | 133 | if (in_array($newblock['template'], array('system_block_user.tpl', 'system_block_login.tpl', 'system_block_mainmenu.tpl'))) { |
134 | 134 | $visible = 1; |
135 | 135 | } |
136 | 136 | $options = !isset($newblock['options']) ? '' : trim($newblock['options']); |
137 | 137 | $edit_func = !isset($newblock['edit_func']) ? '' : trim($newblock['edit_func']); |
138 | - $newbid = $dbm->insert('newblocks', ' VALUES (0, 1, ' . $func_num . ", '" . addslashes($options) . "', '" . addslashes($newblock['name']) . "', '" . addslashes($newblock['name']) . "', '', 0, 0, " . $visible . ", 'S', 'H', 1, 'system', '" . addslashes($newblock['file']) . "', '" . addslashes($newblock['show_func']) . "', '" . addslashes($edit_func) . "', '" . addslashes($newblock['template']) . "', 0, " . $time . ')'); |
|
138 | + $newbid = $dbm->insert('newblocks', ' VALUES (0, 1, '.$func_num.", '".addslashes($options)."', '".addslashes($newblock['name'])."', '".addslashes($newblock['name'])."', '', 0, 0, ".$visible.", 'S', 'H', 1, 'system', '".addslashes($newblock['file'])."', '".addslashes($newblock['show_func'])."', '".addslashes($edit_func)."', '".addslashes($newblock['template'])."', 0, ".$time.')'); |
|
139 | 139 | // $newbid = $xoopsDB->getInsertId(); |
140 | - $newtplid = $dbm->insert('tplfile', ' VALUES (0, ' . $newbid . ", 'system', 'default', '" . addslashes($newblock['template']) . "', '" . addslashes($newblock['description']) . "', " . $time . ', ' . $time . ", 'block')"); |
|
140 | + $newtplid = $dbm->insert('tplfile', ' VALUES (0, '.$newbid.", 'system', 'default', '".addslashes($newblock['template'])."', '".addslashes($newblock['description'])."', ".$time.', '.$time.", 'block')"); |
|
141 | 141 | // $newtplid = $xoopsDB->getInsertId(); |
142 | - $tplsource = fread($fp, filesize('../modules/system/templates/blocks/' . $newblock['template'])); |
|
142 | + $tplsource = fread($fp, filesize('../modules/system/templates/blocks/'.$newblock['template'])); |
|
143 | 143 | fclose($fp); |
144 | - $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES (' . $newtplid . ", '" . addslashes($tplsource) . "')"); |
|
145 | - $dbm->insert('group_permission', ' VALUES (0, ' . $groups['XOOPS_GROUP_ADMIN'] . ', ' . $newbid . ", 1, 'block_read')"); |
|
144 | + $dbm->insert('tplsource', ' (tpl_id, tpl_source) VALUES ('.$newtplid.", '".addslashes($tplsource)."')"); |
|
145 | + $dbm->insert('group_permission', ' VALUES (0, '.$groups['XOOPS_GROUP_ADMIN'].', '.$newbid.", 1, 'block_read')"); |
|
146 | 146 | // $dbm->insert("group_permission", " VALUES (0, ".$groups['XOOPS_GROUP_ADMIN'].", ".$newbid.", 'xoops_blockadmiin')"); |
147 | - $dbm->insert('group_permission', ' VALUES (0, ' . $groups['XOOPS_GROUP_USERS'] . ', ' . $newbid . ", 1, 'block_read')"); |
|
148 | - $dbm->insert('group_permission', ' VALUES (0, ' . $groups['XOOPS_GROUP_ANONYMOUS'] . ', ' . $newbid . ", 1, 'block_read')"); |
|
147 | + $dbm->insert('group_permission', ' VALUES (0, '.$groups['XOOPS_GROUP_USERS'].', '.$newbid.", 1, 'block_read')"); |
|
148 | + $dbm->insert('group_permission', ' VALUES (0, '.$groups['XOOPS_GROUP_ANONYMOUS'].', '.$newbid.", 1, 'block_read')"); |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | // data for table 'users' |
@@ -153,63 +153,63 @@ discard block |
||
153 | 153 | $regdate = time(); |
154 | 154 | // $dbadminname= addslashes($adminname); |
155 | 155 | // RMV-NOTIFY (updated for extra columns in user table) |
156 | - $dbm->insert('users', " VALUES (1,'','" . addslashes($adminname) . "','" . addslashes($adminmail) . "','" . XOOPS_URL . "/','avatars/blank.gif','" . $regdate . "','','','',1,'','','','','" . $temp . "',0,0,7,5,'default','0.0'," . time() . ",'flat',0,1,0,'','','',0)"); |
|
156 | + $dbm->insert('users', " VALUES (1,'','".addslashes($adminname)."','".addslashes($adminmail)."','".XOOPS_URL."/','avatars/blank.gif','".$regdate."','','','',1,'','','','','".$temp."',0,0,7,5,'default','0.0',".time().",'flat',0,1,0,'','','',0)"); |
|
157 | 157 | // data for table 'block_module_link' |
158 | - $sql = 'SELECT bid, side FROM ' . $dbm->prefix('newblocks'); |
|
158 | + $sql = 'SELECT bid, side FROM '.$dbm->prefix('newblocks'); |
|
159 | 159 | $result = $dbm->query($sql); |
160 | 160 | |
161 | 161 | while (false !== ($myrow = $dbm->fetchArray($result))) { |
162 | 162 | if ($myrow['side'] == 0) { |
163 | - $dbm->insert('block_module_link', ' VALUES (' . $myrow['bid'] . ', 0)'); |
|
163 | + $dbm->insert('block_module_link', ' VALUES ('.$myrow['bid'].', 0)'); |
|
164 | 164 | } else { |
165 | - $dbm->insert('block_module_link', ' VALUES (' . $myrow['bid'] . ', -1)'); |
|
165 | + $dbm->insert('block_module_link', ' VALUES ('.$myrow['bid'].', -1)'); |
|
166 | 166 | } |
167 | 167 | } |
168 | 168 | // data for table 'config' |
169 | 169 | $dbm->insert('config', " VALUES (1, 0, 1, 'sitename', '_MD_AM_SITENAME', 'XOOPS Site', '_MD_AM_SITENAMEDSC', 'textbox', 'text', 0)"); |
170 | 170 | $dbm->insert('config', " VALUES (2, 0, 1, 'slogan', '_MD_AM_SLOGAN', 'Just Use it!', '_MD_AM_SLOGANDSC', 'textbox', 'text', 2)"); |
171 | - $dbm->insert('config', " VALUES (3, 0, 1, 'language', '_MD_AM_LANGUAGE', '" . addslashes($language) . "', '_MD_AM_LANGUAGEDSC', 'language', 'other', 4)"); |
|
171 | + $dbm->insert('config', " VALUES (3, 0, 1, 'language', '_MD_AM_LANGUAGE', '".addslashes($language)."', '_MD_AM_LANGUAGEDSC', 'language', 'other', 4)"); |
|
172 | 172 | $dbm->insert('config', " VALUES (4, 0, 1, 'startpage', '_MD_AM_STARTPAGE', '--', '_MD_AM_STARTPAGEDSC', 'startpage', 'other', 6)"); |
173 | 173 | $dbm->insert('config', " VALUES (5, 0, 1, 'server_TZ', '_MD_AM_SERVERTZ', '0', '_MD_AM_SERVERTZDSC', 'timezone', 'float', 8)"); |
174 | 174 | $dbm->insert('config', " VALUES (6, 0, 1, 'default_TZ', '_MD_AM_DEFAULTTZ', '0', '_MD_AM_DEFAULTTZDSC', 'timezone', 'float', 10)"); |
175 | - $dbm->insert('config', " VALUES (7, 0, 1, 'theme_set', '_MD_AM_DTHEME', '" . $defaultTheme ."', '_MD_AM_DTHEMEDSC', 'theme', 'other', 12)"); |
|
176 | - $dbm->insert('config', " VALUES (8, 0, 1, 'anonymous', '_MD_AM_ANONNAME', '" . addslashes(_INSTALL_ANON) . "', '_MD_AM_ANONNAMEDSC', 'textbox', 'text', 15)"); |
|
175 | + $dbm->insert('config', " VALUES (7, 0, 1, 'theme_set', '_MD_AM_DTHEME', '".$defaultTheme."', '_MD_AM_DTHEMEDSC', 'theme', 'other', 12)"); |
|
176 | + $dbm->insert('config', " VALUES (8, 0, 1, 'anonymous', '_MD_AM_ANONNAME', '".addslashes(_INSTALL_ANON)."', '_MD_AM_ANONNAMEDSC', 'textbox', 'text', 15)"); |
|
177 | 177 | $dbm->insert('config', " VALUES (9, 0, 1, 'gzip_compression', '_MD_AM_USEGZIP', '0', '_MD_AM_USEGZIPDSC', 'yesno', 'int', 16)"); |
178 | - $dbm->insert('config', " VALUES (10, 0, 1, 'usercookie', '_MD_AM_USERCOOKIE', 'xoops_user_" . dechex(time()) . "', '_MD_AM_USERCOOKIEDSC', 'textbox', 'text', 18)"); |
|
178 | + $dbm->insert('config', " VALUES (10, 0, 1, 'usercookie', '_MD_AM_USERCOOKIE', 'xoops_user_".dechex(time())."', '_MD_AM_USERCOOKIEDSC', 'textbox', 'text', 18)"); |
|
179 | 179 | $dbm->insert('config', " VALUES (11, 0, 1, 'session_expire', '_MD_AM_SESSEXPIRE', '15', '_MD_AM_SESSEXPIREDSC', 'textbox', 'int', 22)"); |
180 | 180 | $dbm->insert('config', " VALUES (12, 0, 1, 'banners', '_MD_AM_BANNERS', '1', '_MD_AM_BANNERSDSC', 'yesno', 'int', 26)"); |
181 | 181 | $dbm->insert('config', " VALUES (13, 0, 1, 'debug_mode', '_MD_AM_DEBUGMODE', '0', '_MD_AM_DEBUGMODEDSC', 'select', 'int', 24)"); |
182 | 182 | $dbm->insert('config', " VALUES (14, 0, 1, 'my_ip', '_MD_AM_MYIP', '127.0.0.1', '_MD_AM_MYIPDSC', 'textbox', 'text', 29)"); |
183 | 183 | $dbm->insert('config', " VALUES (15, 0, 1, 'use_ssl', '_MD_AM_USESSL', '0', '_MD_AM_USESSLDSC', 'yesno', 'int', 30)"); |
184 | - $dbm->insert('config', " VALUES (16, 0, 1, 'session_name', '_MD_AM_SESSNAME', 'xoops_session_" . dechex(time()) . "', '_MD_AM_SESSNAMEDSC', 'textbox', 'text', 20)"); |
|
184 | + $dbm->insert('config', " VALUES (16, 0, 1, 'session_name', '_MD_AM_SESSNAME', 'xoops_session_".dechex(time())."', '_MD_AM_SESSNAMEDSC', 'textbox', 'text', 20)"); |
|
185 | 185 | $dbm->insert('config', " VALUES (17, 0, 2, 'minpass', '_MD_AM_MINPASS', '5', '_MD_AM_MINPASSDSC', 'textbox', 'int', 1)"); |
186 | 186 | $dbm->insert('config', " VALUES (18, 0, 2, 'minuname', '_MD_AM_MINUNAME', '3', '_MD_AM_MINUNAMEDSC', 'textbox', 'int', 2)"); |
187 | 187 | $dbm->insert('config', " VALUES (19, 0, 2, 'new_user_notify', '_MD_AM_NEWUNOTIFY', '1', '_MD_AM_NEWUNOTIFYDSC', 'yesno', 'int', 4)"); |
188 | - $dbm->insert('config', " VALUES (20, 0, 2, 'new_user_notify_group', '_MD_AM_NOTIFYTO', " . $groups['XOOPS_GROUP_ADMIN'] . ", '_MD_AM_NOTIFYTODSC', 'group', 'int', 6)"); |
|
188 | + $dbm->insert('config', " VALUES (20, 0, 2, 'new_user_notify_group', '_MD_AM_NOTIFYTO', ".$groups['XOOPS_GROUP_ADMIN'].", '_MD_AM_NOTIFYTODSC', 'group', 'int', 6)"); |
|
189 | 189 | $dbm->insert('config', " VALUES (21, 0, 2, 'activation_type', '_MD_AM_ACTVTYPE', '0', '_MD_AM_ACTVTYPEDSC', 'select', 'int', 8)"); |
190 | - $dbm->insert('config', " VALUES (22, 0, 2, 'activation_group', '_MD_AM_ACTVGROUP', " . $groups['XOOPS_GROUP_ADMIN'] . ", '_MD_AM_ACTVGROUPDSC', 'group', 'int', 10)"); |
|
190 | + $dbm->insert('config', " VALUES (22, 0, 2, 'activation_group', '_MD_AM_ACTVGROUP', ".$groups['XOOPS_GROUP_ADMIN'].", '_MD_AM_ACTVGROUPDSC', 'group', 'int', 10)"); |
|
191 | 191 | $dbm->insert('config', " VALUES (23, 0, 2, 'uname_test_level', '_MD_AM_UNAMELVL', '0', '_MD_AM_UNAMELVLDSC', 'select', 'int', 12)"); |
192 | 192 | $dbm->insert('config', " VALUES (24, 0, 2, 'avatar_allow_upload', '_MD_AM_AVATARALLOW', '0', '_MD_AM_AVATARALWDSC', 'yesno', 'int', 14)"); |
193 | 193 | $dbm->insert('config', " VALUES (27, 0, 2, 'avatar_width', '_MD_AM_AVATARW', '128', '_MD_AM_AVATARWDSC', 'textbox', 'int', 16)"); |
194 | 194 | $dbm->insert('config', " VALUES (28, 0, 2, 'avatar_height', '_MD_AM_AVATARH', '128', '_MD_AM_AVATARHDSC', 'textbox', 'int', 18)"); |
195 | 195 | $dbm->insert('config', " VALUES (29, 0, 2, 'avatar_maxsize', '_MD_AM_AVATARMAX', '35000', '_MD_AM_AVATARMAXDSC', 'textbox', 'int', 20)"); |
196 | - $dbm->insert('config', " VALUES (30, 0, 1, 'adminmail', '_MD_AM_ADMINML', '" . addslashes($adminmail) . "', '_MD_AM_ADMINMLDSC', 'textbox', 'text', 3)"); |
|
196 | + $dbm->insert('config', " VALUES (30, 0, 1, 'adminmail', '_MD_AM_ADMINML', '".addslashes($adminmail)."', '_MD_AM_ADMINMLDSC', 'textbox', 'text', 3)"); |
|
197 | 197 | $dbm->insert('config', " VALUES (31, 0, 2, 'self_delete', '_MD_AM_SELFDELETE', '0', '_MD_AM_SELFDELETEDSC', 'yesno', 'int', 22)"); |
198 | 198 | $dbm->insert('config', " VALUES (32, 0, 1, 'com_mode', '_MD_AM_COMMODE', 'flat', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); |
199 | 199 | $dbm->insert('config', " VALUES (33, 0, 1, 'com_order', '_MD_AM_COMORDER', '0', '_MD_AM_COMORDERDSC', 'select', 'int', 36)"); |
200 | - $dbm->insert('config', " VALUES (34, 0, 2, 'bad_unames', '_MD_AM_BADUNAMES', '" . addslashes(serialize(array( |
|
200 | + $dbm->insert('config', " VALUES (34, 0, 2, 'bad_unames', '_MD_AM_BADUNAMES', '".addslashes(serialize(array( |
|
201 | 201 | 'webmaster', |
202 | 202 | '^xoops', |
203 | - '^admin'))) . "', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); |
|
204 | - $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '" . addslashes(serialize(array('xoops.org$'))) . "', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); |
|
203 | + '^admin')))."', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); |
|
204 | + $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '".addslashes(serialize(array('xoops.org$')))."', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); |
|
205 | 205 | $dbm->insert('config', " VALUES (36, 0, 2, 'maxuname', '_MD_AM_MAXUNAME', '10', '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)"); |
206 | - $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '" . addslashes(serialize(array('127.0.0.1'))) . "', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); |
|
206 | + $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '".addslashes(serialize(array('127.0.0.1')))."', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); |
|
207 | 207 | $dbm->insert('config', " VALUES (38, 0, 3, 'meta_keywords', '_MD_AM_METAKEY', 'xoops, web application framework, cms, content management system', '_MD_AM_METAKEYDSC', 'textarea', 'text', 0)"); |
208 | - $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS © 2001-" . date('Y', time()) . " <a href=\"http://xoops.org\" rel=\"external\" title=\"The XOOPS Project\">The XOOPS Project</a>', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); |
|
208 | + $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS © 2001-".date('Y', time())." <a href=\"http://xoops.org\" rel=\"external\" title=\"The XOOPS Project\">The XOOPS Project</a>', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); |
|
209 | 209 | $dbm->insert('config', " VALUES (40, 0, 4, 'censor_enable', '_MD_AM_DOCENSOR', '0', '_MD_AM_DOCENSORDSC', 'yesno', 'int', 0)"); |
210 | - $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '" . addslashes(serialize(array( |
|
210 | + $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '".addslashes(serialize(array( |
|
211 | 211 | 'fuck', |
212 | - 'shit'))) . "', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); |
|
212 | + 'shit')))."', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); |
|
213 | 213 | $dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)"); |
214 | 214 | $dbm->insert('config', " VALUES (43, 0, 3, 'meta_robots', '_MD_AM_METAROBOTS', 'index,follow', '_MD_AM_METAROBOTSDSC', 'textbox', 'text', 2)"); |
215 | 215 | $dbm->insert('config', " VALUES (44, 0, 5, 'enable_search', '_MD_AM_DOSEARCH', '1', '_MD_AM_DOSEARCHDSC', 'yesno', 'int', 0)"); |
@@ -218,17 +218,17 @@ discard block |
||
218 | 218 | $dbm->insert('config', " VALUES (47, 0, 1, 'enable_badips', '_MD_AM_DOBADIPS', '0', '_MD_AM_DOBADIPSDSC', 'yesno', 'int', 40)"); |
219 | 219 | $dbm->insert('config', " VALUES (48, 0, 3, 'meta_rating', '_MD_AM_METARATING', 'general', '_MD_AM_METARATINGDSC', 'select', 'text', 4)"); |
220 | 220 | $dbm->insert('config', " VALUES (49, 0, 3, 'meta_author', '_MD_AM_METAAUTHOR', 'XOOPS', '_MD_AM_METAAUTHORDSC', 'textbox', 'text', 6)"); |
221 | - $dbm->insert('config', " VALUES (50, 0, 3, 'meta_copyright', '_MD_AM_METACOPYR', 'Copyright © 2001-" . date('Y', time()) . "', '_MD_AM_METACOPYRDSC', 'textbox', 'text', 8)"); |
|
221 | + $dbm->insert('config', " VALUES (50, 0, 3, 'meta_copyright', '_MD_AM_METACOPYR', 'Copyright © 2001-".date('Y', time())."', '_MD_AM_METACOPYRDSC', 'textbox', 'text', 8)"); |
|
222 | 222 | $dbm->insert('config', " VALUES (51, 0, 3, 'meta_description', '_MD_AM_METADESC', 'XOOPS is a dynamic Object Oriented based open source portal script written in PHP.', '_MD_AM_METADESCDSC', 'textarea', 'text', 1)"); |
223 | 223 | $dbm->insert('config', " VALUES (52, 0, 2, 'allow_chgmail', '_MD_AM_ALLWCHGMAIL', '0', '_MD_AM_ALLWCHGMAILDSC', 'yesno', 'int', 3)"); |
224 | 224 | $dbm->insert('config', " VALUES (53, 0, 1, 'use_mysession', '_MD_AM_USEMYSESS', '1', '_MD_AM_USEMYSESSDSC', 'yesno', 'int', 19)"); |
225 | 225 | $dbm->insert('config', " VALUES (54, 0, 2, 'reg_dispdsclmr', '_MD_AM_DSPDSCLMR', 1, '_MD_AM_DSPDSCLMRDSC', 'yesno', 'int', 30)"); |
226 | - $dbm->insert('config', " VALUES (55, 0, 2, 'reg_disclaimer', '_MD_AM_REGDSCLMR', '" . addslashes(_INSTALL_DISCLMR) . "', '_MD_AM_REGDSCLMRDSC', 'textarea', 'text', 32)"); |
|
226 | + $dbm->insert('config', " VALUES (55, 0, 2, 'reg_disclaimer', '_MD_AM_REGDSCLMR', '".addslashes(_INSTALL_DISCLMR)."', '_MD_AM_REGDSCLMRDSC', 'textarea', 'text', 32)"); |
|
227 | 227 | $dbm->insert('config', " VALUES (56, 0, 2, 'allow_register', '_MD_AM_ALLOWREG', 1, '_MD_AM_ALLOWREGDSC', 'yesno', 'int', 0)"); |
228 | 228 | $dbm->insert('config', " VALUES (57, 0, 1, 'theme_fromfile', '_MD_AM_THEMEFILE', '0', '_MD_AM_THEMEFILEDSC', 'yesno', 'int', 13)"); |
229 | 229 | $dbm->insert('config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '0', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)"); |
230 | - $dbm->insert('config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '" . addslashes(serialize(array('1'))) . "', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)"); |
|
231 | - $dbm->insert('config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '" . _INSTALL_L165 . "', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)"); |
|
230 | + $dbm->insert('config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '".addslashes(serialize(array('1')))."', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)"); |
|
231 | + $dbm->insert('config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '"._INSTALL_L165."', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)"); |
|
232 | 232 | $dbm->insert('config', " VALUES (61, 0, 1, 'sslpost_name', '_MD_AM_SSLPOST', 'xoops_ssl', '_MD_AM_SSLPOSTDSC', 'textbox', 'text', 31)"); |
233 | 233 | $dbm->insert('config', " VALUES (62, 0, 1, 'module_cache', '_MD_AM_MODCACHE', '', '_MD_AM_MODCACHEDSC', 'module_cache', 'array', 50)"); |
234 | 234 | $dbm->insert('config', " VALUES (63, 0, 1, 'template_set', '_MD_AM_DTPLSET', 'default', '_MD_AM_DTPLSETDSC', 'tplset', 'other', 14)"); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $dbm->insert('config', " VALUES (69,0,6,'from','_MD_AM_MAILFROM','','_MD_AM_MAILFROMDESC','textbox','text', 1)"); |
242 | 242 | $dbm->insert('config', " VALUES (70,0,6,'fromname','_MD_AM_MAILFROMNAME','','_MD_AM_MAILFROMNAMEDESC','textbox','text',2)"); |
243 | 243 | $dbm->insert('config', " VALUES (71, 0, 1, 'sslloginlink', '_MD_AM_SSLLINK', 'https://', '_MD_AM_SSLLINKDSC', 'textbox', 'text', 33)"); |
244 | - $dbm->insert('config', " VALUES (72, 0, 1, 'theme_set_allowed', '_MD_AM_THEMEOK', '" . serialize(array($defaultTheme)) . "', '_MD_AM_THEMEOKDSC', 'theme_multi', 'array', 13)"); |
|
244 | + $dbm->insert('config', " VALUES (72, 0, 1, 'theme_set_allowed', '_MD_AM_THEMEOK', '".serialize(array($defaultTheme))."', '_MD_AM_THEMEOKDSC', 'theme_multi', 'array', 13)"); |
|
245 | 245 | // RMV-NOTIFY... Need to specify which user is sender of notification PM |
246 | 246 | $dbm->insert('config', " VALUES (73,0,6,'fromuid','_MD_AM_MAILFROMUID','1','_MD_AM_MAILFROMUIDDESC','user','int',3)"); |
247 | 247 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $dbm->insert('config', " VALUES (78,0,7,'ldap_manager_dn','_MD_AM_LDAP_MANAGER_DN','manager_dn','_MD_AM_LDAP_MANAGER_DN_DESC','textbox','text',5)"); |
253 | 253 | $dbm->insert('config', " VALUES (79,0,7,'ldap_manager_pass','_MD_AM_LDAP_MANAGER_PASS','manager_pass','_MD_AM_LDAP_MANAGER_PASS_DESC','password','text',6)"); |
254 | 254 | $dbm->insert('config', " VALUES (80,0,7,'ldap_version','_MD_AM_LDAP_VERSION','3','_MD_AM_LDAP_VERSION_DESC','textbox','text', 7)"); |
255 | - $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','" . serialize(array('admin')) . "','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); |
|
255 | + $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','".serialize(array('admin'))."','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); |
|
256 | 256 | $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_D','yesno','int',9)"); |
257 | 257 | $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); |
258 | 258 | $dbm->insert('config', " VALUES (84,0,7,'ldap_filter_person','_MD_AM_LDAP_FILTER_PERSON','','_MD_AM_LDAP_FILTER_PERSON_DESC','textbox','text',11)"); |
@@ -314,30 +314,30 @@ discard block |
||
314 | 314 | $editors = XoopsLists::getDirListAsArray('../class/xoopseditor'); |
315 | 315 | $conf = 35; |
316 | 316 | foreach ($editors as $dir) { |
317 | - $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 126)"); |
|
317 | + $dbm->insert('configoption', ' VALUES ('.$conf.", '".$dir."', '".$dir."', 126)"); |
|
318 | 318 | ++$conf; |
319 | 319 | } |
320 | 320 | foreach ($editors as $dir) { |
321 | - $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 127)"); |
|
321 | + $dbm->insert('configoption', ' VALUES ('.$conf.", '".$dir."', '".$dir."', 127)"); |
|
322 | 322 | ++$conf; |
323 | 323 | } |
324 | 324 | foreach ($editors as $dir) { |
325 | - $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 128)"); |
|
325 | + $dbm->insert('configoption', ' VALUES ('.$conf.", '".$dir."', '".$dir."', 128)"); |
|
326 | 326 | ++$conf; |
327 | 327 | } |
328 | 328 | $icons = XoopsLists::getDirListAsArray('../modules/system/images/icons'); |
329 | 329 | foreach ($icons as $dir) { |
330 | - $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 98)"); |
|
330 | + $dbm->insert('configoption', ' VALUES ('.$conf.", '".$dir."', '".$dir."', 98)"); |
|
331 | 331 | ++$conf; |
332 | 332 | } |
333 | 333 | $breadcrumb = XoopsLists::getDirListAsArray('../modules/system/images/breadcrumb'); |
334 | 334 | foreach ($breadcrumb as $dir) { |
335 | - $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 99)"); |
|
335 | + $dbm->insert('configoption', ' VALUES ('.$conf.", '".$dir."', '".$dir."', 99)"); |
|
336 | 336 | ++$conf; |
337 | 337 | } |
338 | 338 | $jqueryui = XoopsLists::getDirListAsArray('../modules/system/css/ui'); |
339 | 339 | foreach ($jqueryui as $dir) { |
340 | - $dbm->insert('configoption', ' VALUES (' . $conf . ", '" . $dir . "', '" . $dir . "', 133)"); |
|
340 | + $dbm->insert('configoption', ' VALUES ('.$conf.", '".$dir."', '".$dir."', 133)"); |
|
341 | 341 | ++$conf; |
342 | 342 | } |
343 | 343 |
@@ -15,4 +15,4 @@ |
||
15 | 15 | */ |
16 | 16 | |
17 | 17 | defined('XOOPS_INSTALL') || die('XOOPS Installation wizard die'); |
18 | -require_once XOOPS_ROOT_PATH . '/modules/system/admin/modulesadmin/modulesadmin.php'; |
|
18 | +require_once XOOPS_ROOT_PATH.'/modules/system/admin/modulesadmin/modulesadmin.php'; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $pageHasForm = false; |
32 | 32 | $pageHasHelp = false; |
33 | 33 | |
34 | -$vars =& $_SESSION['settings']; |
|
34 | +$vars = & $_SESSION['settings']; |
|
35 | 35 | |
36 | 36 | include_once '../mainfile.php'; |
37 | 37 | include_once './class/dbmanager.php'; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $wizard->redirectToPage('dbsettings'); |
42 | 42 | exit(); |
43 | 43 | } |
44 | -$res = $dbm->query('SELECT COUNT(*) FROM ' . $dbm->db->prefix('users')); |
|
44 | +$res = $dbm->query('SELECT COUNT(*) FROM '.$dbm->db->prefix('users')); |
|
45 | 45 | if (!$res) { |
46 | 46 | $wizard->redirectToPage('dbsettings'); |
47 | 47 | exit(); |
@@ -57,29 +57,29 @@ discard block |
||
57 | 57 | //$cm = 'dummy'; |
58 | 58 | $wizard->loadLangFile('install2'); |
59 | 59 | |
60 | -$licenseFile = XOOPS_VAR_PATH . '/data/license.php'; |
|
60 | +$licenseFile = XOOPS_VAR_PATH.'/data/license.php'; |
|
61 | 61 | $touched = touch($licenseFile); |
62 | 62 | if ($touched) { |
63 | 63 | $licenseReport = '<div class="alert alert-success"><span class="fa fa-check text-success"></span> ' |
64 | - . writeLicenseKey() . '</div>'; |
|
64 | + . writeLicenseKey().'</div>'; |
|
65 | 65 | } else { |
66 | 66 | $licenseReport = '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> ' |
67 | - . sprintf(LICENSE_NOT_WRITEABLE, $licenseFile) . '</div>'; |
|
67 | + . sprintf(LICENSE_NOT_WRITEABLE, $licenseFile).'</div>'; |
|
68 | 68 | } |
69 | 69 | $error = false; |
70 | 70 | |
71 | 71 | $hashedAdminPass = password_hash($adminpass, PASSWORD_DEFAULT); |
72 | 72 | |
73 | 73 | if ($process) { |
74 | - $result = $dbm->queryFromFile('./sql/' . XOOPS_DB_TYPE . '.data.sql'); |
|
75 | - $result = $dbm->queryFromFile('./language/' . $wizard->language . '/' . XOOPS_DB_TYPE . '.lang.data.sql'); |
|
74 | + $result = $dbm->queryFromFile('./sql/'.XOOPS_DB_TYPE.'.data.sql'); |
|
75 | + $result = $dbm->queryFromFile('./language/'.$wizard->language.'/'.XOOPS_DB_TYPE.'.lang.data.sql'); |
|
76 | 76 | $group = make_groups($dbm); |
77 | 77 | $result = make_data($dbm, $adminname, $hashedAdminPass, $adminmail, $wizard->language, $group); |
78 | 78 | $content = '<div class="alert alert-success"><span class="fa fa-check text-success"></span> ' |
79 | - . DATA_INSERTED . '</div><div class="well">' . $dbm->report() . '</div>'; |
|
79 | + . DATA_INSERTED.'</div><div class="well">'.$dbm->report().'</div>'; |
|
80 | 80 | } else { |
81 | 81 | $content = '<div class="alert alert-info"><span class="fa fa-info-circle text-info"></span> ' |
82 | - . DATA_ALREADY_INSERTED . '</div>'; |
|
82 | + . DATA_ALREADY_INSERTED.'</div>'; |
|
83 | 83 | } |
84 | 84 | $content .= $licenseReport; |
85 | 85 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 'uname' => $adminname, |
91 | 91 | 'sub' => 'xoopsinstall', |
92 | 92 | ); |
93 | - $token = \Xmf\Jwt\TokenFactory::build('install', $claims, 60*60); |
|
93 | + $token = \Xmf\Jwt\TokenFactory::build('install', $claims, 60 * 60); |
|
94 | 94 | |
95 | 95 | setcookie('xo_install_user', $token, 0, null, null, null, true); |
96 | 96 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $pageHasForm = true; |
45 | 45 | $title = LANGUAGE_SELECTION; |
46 | 46 | $label = 'Available Languages'; |
47 | -$content =<<<EOT |
|
47 | +$content = <<<EOT |
|
48 | 48 | <div class="form-group col-md-4"> |
49 | 49 | <label for="lang" class="control-label">{$label}</label> |
50 | 50 | <select name="lang" id="lang" class="form-control"> |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $sel = ($lang == $wizard->language) ? ' selected' : ''; |
56 | 56 | $content .= "<option value=\"{$lang}\"{$sel}>{$lang}</option>\n"; |
57 | 57 | } |
58 | -$content .=<<<EOB |
|
58 | +$content .= <<<EOB |
|
59 | 59 | </select> |
60 | 60 | </div><div class="clearfix"></div> |
61 | 61 | EOB; |
@@ -95,7 +95,7 @@ |
||
95 | 95 | <tbody> |
96 | 96 | <?php |
97 | 97 | foreach ($wizard->configs['extensions'] as $key => $value) { |
98 | - echo '<tr><th>' . $value[2] . '</th><td>' . $value[1] . '</td></tr>'; |
|
98 | + echo '<tr><th>'.$value[2].'</th><td>'.$value[1].'</td></tr>'; |
|
99 | 99 | } |
100 | 100 | ?> |
101 | 101 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $pageHasForm = false; |
33 | 33 | $pageHasHelp = false; |
34 | 34 | |
35 | -$vars =& $_SESSION['settings']; |
|
35 | +$vars = & $_SESSION['settings']; |
|
36 | 36 | |
37 | 37 | if (empty($vars['ROOT_PATH'])) { |
38 | 38 | $wizard->redirectToPage('pathsettings'); |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $writeFiles = array( |
46 | - $vars['ROOT_PATH'] . '/mainfile.php', |
|
47 | - $vars['VAR_PATH'] . '/data/secure.php', |
|
46 | + $vars['ROOT_PATH'].'/mainfile.php', |
|
47 | + $vars['VAR_PATH'].'/data/secure.php', |
|
48 | 48 | ); |
49 | 49 | |
50 | 50 | $writeCheck = checkFileWriteablity($writeFiles); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'GROUP_ANONYMOUS' => 3); |
56 | 56 | $rewrite = array_merge($rewrite, $vars); |
57 | 57 | |
58 | - $result = writeConfigurationFile($rewrite, $vars['VAR_PATH'] . '/data', 'secure.dist.php', 'secure.php'); |
|
58 | + $result = writeConfigurationFile($rewrite, $vars['VAR_PATH'].'/data', 'secure.dist.php', 'secure.php'); |
|
59 | 59 | $GLOBALS['error'] = !($result === true); |
60 | 60 | if ($result === true) { |
61 | 61 | $result = writeConfigurationFile($rewrite, $vars['ROOT_PATH'], 'mainfile.dist.php', 'mainfile.php'); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | if ($k === 'authorized') { |
79 | 79 | continue; |
80 | 80 | } |
81 | - echo "<li><strong>XOOPS_{$k}</strong> " . IS_VALOR . " {$v}</li>"; |
|
81 | + echo "<li><strong>XOOPS_{$k}</strong> ".IS_VALOR." {$v}</li>"; |
|
82 | 82 | } |
83 | 83 | ?> |
84 | 84 | </ul> |
@@ -89,14 +89,14 @@ discard block |
||
89 | 89 | } else { |
90 | 90 | $GLOBALS['error'] = true; |
91 | 91 | $pageHasForm = true; // will redirect to same page |
92 | - $content = '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> ' . $result . '</div>'; |
|
92 | + $content = '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> '.$result.'</div>'; |
|
93 | 93 | } |
94 | 94 | } else { |
95 | 95 | $content = ''; |
96 | 96 | foreach ($writeCheck as $errorMsg) { |
97 | 97 | $GLOBALS['error'] = true; |
98 | 98 | $pageHasForm = true; // will redirect to same page |
99 | - $content .= '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> ' . $errorMsg . '</div>' . "\n"; |
|
99 | + $content .= '<div class="alert alert-danger"><span class="fa fa-ban text-danger"></span> '.$errorMsg.'</div>'."\n"; |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | include './include/install_tpl.php'; |
@@ -114,14 +114,14 @@ discard block |
||
114 | 114 | function writeConfigurationFile($vars, $path, $sourceName, $fileName) |
115 | 115 | { |
116 | 116 | $path .= '/'; |
117 | - if (!@copy($path . $sourceName, $path . $fileName)) { |
|
117 | + if (!@copy($path.$sourceName, $path.$fileName)) { |
|
118 | 118 | return sprintf(ERR_COPY_MAINFILE, $fileName); |
119 | 119 | } else { |
120 | 120 | clearstatcache(); |
121 | - if (!$file = fopen($path . $fileName, 'r')) { |
|
121 | + if (!$file = fopen($path.$fileName, 'r')) { |
|
122 | 122 | return sprintf(ERR_READ_MAINFILE, $fileName); |
123 | 123 | } else { |
124 | - $content = fread($file, filesize($path . $fileName)); |
|
124 | + $content = fread($file, filesize($path.$fileName)); |
|
125 | 125 | fclose($file); |
126 | 126 | |
127 | 127 | foreach ($vars as $key => $val) { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $content = preg_replace("/(define\()([\"'])(XOOPS_{$key})\\2,\s*([\"'])(.*?)\\4\s*\)/", "define('XOOPS_{$key}', '{$val}')", $content); |
133 | 133 | } |
134 | 134 | } |
135 | - $file = fopen($path . $fileName, 'w'); |
|
135 | + $file = fopen($path.$fileName, 'w'); |
|
136 | 136 | if (false === $file) { |
137 | 137 | return sprintf(ERR_WRITE_MAINFILE, $fileName); |
138 | 138 | } |
@@ -197,15 +197,15 @@ discard block |
||
197 | 197 | $subSet['uid'] = $stat['uid']; |
198 | 198 | $subSet['gid'] = $stat['gid']; |
199 | 199 | |
200 | - $subSet['user']['read'] = (bool) ($mode & 0400); |
|
201 | - $subSet['user']['write'] = (bool) ($mode & 0200); |
|
202 | - $subSet['user']['exec'] = (bool) ($mode & 0100); |
|
203 | - $subSet['group']['read'] = (bool) ($mode & 040); |
|
204 | - $subSet['group']['write'] = (bool) ($mode & 020); |
|
205 | - $subSet['group']['exec'] = (bool) ($mode & 010); |
|
206 | - $subSet['other']['read'] = (bool) ($mode & 04); |
|
207 | - $subSet['other']['write'] = (bool) ($mode & 02); |
|
208 | - $subSet['other']['exec'] = (bool) ($mode & 01); |
|
200 | + $subSet['user']['read'] = (bool)($mode & 0400); |
|
201 | + $subSet['user']['write'] = (bool)($mode & 0200); |
|
202 | + $subSet['user']['exec'] = (bool)($mode & 0100); |
|
203 | + $subSet['group']['read'] = (bool)($mode & 040); |
|
204 | + $subSet['group']['write'] = (bool)($mode & 020); |
|
205 | + $subSet['group']['exec'] = (bool)($mode & 010); |
|
206 | + $subSet['other']['read'] = (bool)($mode & 04); |
|
207 | + $subSet['other']['write'] = (bool)($mode & 02); |
|
208 | + $subSet['other']['exec'] = (bool)($mode & 01); |
|
209 | 209 | |
210 | 210 | return $subSet; |
211 | 211 | } |
@@ -242,21 +242,21 @@ discard block |
||
242 | 242 | || (false !== stripos(PHP_OS, 'WIN')) |
243 | 243 | ) |
244 | 244 | ) { |
245 | - $uidStr = (string) $uid; |
|
246 | - $dUidStr = (string) $dirStat['uid']; |
|
247 | - $gidStr = (string) $gid; |
|
248 | - $dGidStr = (string) $dirStat['gid']; |
|
245 | + $uidStr = (string)$uid; |
|
246 | + $dUidStr = (string)$dirStat['uid']; |
|
247 | + $gidStr = (string)$gid; |
|
248 | + $dGidStr = (string)$dirStat['gid']; |
|
249 | 249 | if (function_exists('posix_getpwuid')) { |
250 | 250 | $tempUsr = posix_getpwuid($uid); |
251 | - $uidStr = isset($tempUsr['name']) ? $tempUsr['name'] : (string) $uid; |
|
251 | + $uidStr = isset($tempUsr['name']) ? $tempUsr['name'] : (string)$uid; |
|
252 | 252 | $tempUsr = posix_getpwuid($dirStat['uid']); |
253 | - $dUidStr = isset($tempUsr['name']) ? $tempUsr['name'] : (string) $dirStat['uid']; |
|
253 | + $dUidStr = isset($tempUsr['name']) ? $tempUsr['name'] : (string)$dirStat['uid']; |
|
254 | 254 | } |
255 | 255 | if (function_exists('posix_getgrgid')) { |
256 | 256 | $tempGrp = posix_getgrgid($gid); |
257 | - $gidStr = isset($tempGrp['name']) ? $tempGrp['name'] : (string) $gid; |
|
257 | + $gidStr = isset($tempGrp['name']) ? $tempGrp['name'] : (string)$gid; |
|
258 | 258 | $tempGrp = posix_getgrgid($dirStat['gid']); |
259 | - $dGidStr = isset($tempGrp['name']) ? $tempGrp['name'] : (string) $dirStat['gid']; |
|
259 | + $dGidStr = isset($tempGrp['name']) ? $tempGrp['name'] : (string)$dirStat['gid']; |
|
260 | 260 | } |
261 | 261 | $message[] = sprintf( |
262 | 262 | CHMOD_CHGRP_ERROR, |
@@ -81,13 +81,13 @@ discard block |
||
81 | 81 | <?php |
82 | 82 | if ($ctrl->validPath['root'] && !empty($ctrl->permErrors['root'])) { |
83 | 83 | echo '<div id="rootperms" class="x2-note">'; |
84 | - echo CHECKING_PERMISSIONS . '<br><p>' . ERR_NEED_WRITE_ACCESS . '</p>'; |
|
84 | + echo CHECKING_PERMISSIONS.'<br><p>'.ERR_NEED_WRITE_ACCESS.'</p>'; |
|
85 | 85 | echo '<ul class="diags">'; |
86 | 86 | foreach ($ctrl->permErrors['root'] as $path => $result) { |
87 | 87 | if ($result) { |
88 | - echo '<li class="success">' . sprintf(IS_WRITABLE, $path) . '</li>'; |
|
88 | + echo '<li class="success">'.sprintf(IS_WRITABLE, $path).'</li>'; |
|
89 | 89 | } else { |
90 | - echo '<li class="failure">' . sprintf(IS_NOT_WRITABLE, $path) . '</li>'; |
|
90 | + echo '<li class="failure">'.sprintf(IS_NOT_WRITABLE, $path).'</li>'; |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | echo '</ul></div>'; |
@@ -105,13 +105,13 @@ discard block |
||
105 | 105 | <?php |
106 | 106 | if ($ctrl->validPath['data'] && !empty($ctrl->permErrors['data'])) { |
107 | 107 | echo '<div id="dataperms" class="x2-note">'; |
108 | - echo CHECKING_PERMISSIONS . '<br><p>' . ERR_NEED_WRITE_ACCESS . '</p>'; |
|
108 | + echo CHECKING_PERMISSIONS.'<br><p>'.ERR_NEED_WRITE_ACCESS.'</p>'; |
|
109 | 109 | echo '<ul class="diags">'; |
110 | 110 | foreach ($ctrl->permErrors['data'] as $path => $result) { |
111 | 111 | if ($result) { |
112 | - echo '<li class="success">' . sprintf(IS_WRITABLE, $path) . '</li>'; |
|
112 | + echo '<li class="success">'.sprintf(IS_WRITABLE, $path).'</li>'; |
|
113 | 113 | } else { |
114 | - echo '<li class="failure">' . sprintf(IS_NOT_WRITABLE, $path) . '</li>'; |
|
114 | + echo '<li class="failure">'.sprintf(IS_NOT_WRITABLE, $path).'</li>'; |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | echo '</ul></div>'; |