@@ -45,19 +45,19 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function render() |
| 47 | 47 | { |
| 48 | - $form = "<input type='text' name='" . |
|
| 49 | - $this->config['name'] . |
|
| 50 | - "' id='" . |
|
| 51 | - $this->config['name'] . |
|
| 52 | - "' size='" . |
|
| 53 | - $this->config['num_chars'] . |
|
| 54 | - "' maxlength='" . |
|
| 55 | - $this->config['num_chars'] . |
|
| 56 | - "' value='' /> " . |
|
| 48 | + $form = "<input type='text' name='". |
|
| 49 | + $this->config['name']. |
|
| 50 | + "' id='". |
|
| 51 | + $this->config['name']. |
|
| 52 | + "' size='". |
|
| 53 | + $this->config['num_chars']. |
|
| 54 | + "' maxlength='". |
|
| 55 | + $this->config['num_chars']. |
|
| 56 | + "' value='' /> ". |
|
| 57 | 57 | $this->loadImage(); |
| 58 | 58 | $rule = htmlspecialchars(XOOPS_CAPTCHA_REFRESH, ENT_QUOTES); |
| 59 | 59 | if ($this->config['maxattempt']) { |
| 60 | - $rule .= ' | ' . sprintf(constant('XOOPS_CAPTCHA_MAXATTEMPTS'), $this->config['maxattempt']); |
|
| 60 | + $rule .= ' | '.sprintf(constant('XOOPS_CAPTCHA_MAXATTEMPTS'), $this->config['maxattempt']); |
|
| 61 | 61 | } |
| 62 | 62 | $form .= " <small>{$rule}</small>"; |
| 63 | 63 | |
@@ -70,17 +70,17 @@ discard block |
||
| 70 | 70 | public function loadImage() |
| 71 | 71 | { |
| 72 | 72 | $rule = $this->config['casesensitive'] ? constant('XOOPS_CAPTCHA_RULE_CASESENSITIVE') : constant('XOOPS_CAPTCHA_RULE_CASEINSENSITIVE'); |
| 73 | - $ret = "<img id='captcha' src='" . |
|
| 74 | - XOOPS_URL . |
|
| 75 | - '/' . |
|
| 76 | - $this->config['imageurl'] . |
|
| 77 | - "' onclick=\"this.src='" . |
|
| 78 | - XOOPS_URL . |
|
| 79 | - '/' . |
|
| 80 | - $this->config['imageurl'] . |
|
| 81 | - "?refresh='+Math.random()" . |
|
| 82 | - "\" align='absmiddle' style='cursor: pointer;' alt='" . |
|
| 83 | - htmlspecialchars($rule, ENT_QUOTES) . |
|
| 73 | + $ret = "<img id='captcha' src='". |
|
| 74 | + XOOPS_URL. |
|
| 75 | + '/'. |
|
| 76 | + $this->config['imageurl']. |
|
| 77 | + "' onclick=\"this.src='". |
|
| 78 | + XOOPS_URL. |
|
| 79 | + '/'. |
|
| 80 | + $this->config['imageurl']. |
|
| 81 | + "?refresh='+Math.random()". |
|
| 82 | + "\" align='absmiddle' style='cursor: pointer;' alt='". |
|
| 83 | + htmlspecialchars($rule, ENT_QUOTES). |
|
| 84 | 84 | "' />"; |
| 85 | 85 | |
| 86 | 86 | return $ret; |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | function xoops_debug_dumbQuery($msg = '') |
| 16 | 16 | { |
| 17 | 17 | global $xoopsDB; |
| 18 | - $xoopsDB->query('SELECT * ' . $msg . ' FROM dudewhereismycar2'); |
|
| 18 | + $xoopsDB->query('SELECT * '.$msg.' FROM dudewhereismycar2'); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | function xoops_debug_initiateQueryCount() |
@@ -8,8 +8,8 @@ discard block |
||
| 8 | 8 | */ |
| 9 | 9 | function smartobject_addto_show($options) |
| 10 | 10 | { |
| 11 | - include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'); |
|
| 12 | - include_once(SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php'); |
|
| 11 | + include_once(XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'); |
|
| 12 | + include_once(SMARTOBJECT_ROOT_PATH.'class/smartaddto.php'); |
|
| 13 | 13 | $smartaddto = new SmartAddTo($options[0]); |
| 14 | 14 | $block = $smartaddto->renderForBlock(); |
| 15 | 15 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function smartobject_addto_edit($options) |
| 24 | 24 | { |
| 25 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 25 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 26 | 26 | |
| 27 | 27 | $form = ''; |
| 28 | 28 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1); |
| 32 | 32 | $layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2); |
| 33 | 33 | $layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3); |
| 34 | - $form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br>'; |
|
| 34 | + $form .= $layout_select->getCaption().' '.$layout_select->render().'<br>'; |
|
| 35 | 35 | |
| 36 | 36 | return $form; |
| 37 | 37 | } |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | define('_CO_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2', 'Vertical with icons'); |
| 179 | 179 | define('_CO_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3', 'Vertical no icon'); |
| 180 | 180 | define('_CO_SOBJECT_CURRENT_FILE', 'Current file: '); |
| 181 | -define('_CO_SOBJECT_URL_FILE_DSC', "Alternatively, you can use an URL. If you select a file via 'Browse' button, URL will be ignored. You can use the tag {XOOPS_URL} to print " . XOOPS_URL); |
|
| 181 | +define('_CO_SOBJECT_URL_FILE_DSC', "Alternatively, you can use an URL. If you select a file via 'Browse' button, URL will be ignored. You can use the tag {XOOPS_URL} to print ".XOOPS_URL); |
|
| 182 | 182 | define('_CO_SOBJECT_URL_FILE', 'URL: '); |
| 183 | 183 | define('_CO_SOBJECT_UPLOAD', 'Select a file to upload: '); |
| 184 | 184 | |
@@ -7,17 +7,17 @@ discard block |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include_once __DIR__ . '/header.php'; |
|
| 11 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartloader.php'; |
|
| 12 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectlink.php'; |
|
| 13 | -require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 10 | +include_once __DIR__.'/header.php'; |
|
| 11 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartloader.php'; |
|
| 12 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectlink.php'; |
|
| 13 | +require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 14 | 14 | |
| 15 | 15 | $xoopsTpl = new XoopsTpl(); |
| 16 | 16 | $myts = MyTextSanitizer::getInstance(); |
| 17 | 17 | $xoopsConfig['sitename'] = $myts->displayTarea($xoopsConfig['sitename']); |
| 18 | 18 | |
| 19 | 19 | xoops_header(false); |
| 20 | -echo smart_get_css_link(SMARTOBJECT_URL . 'assets/css/module.css'); |
|
| 20 | +echo smart_get_css_link(SMARTOBJECT_URL.'assets/css/module.css'); |
|
| 21 | 21 | echo '</head><body>'; |
| 22 | 22 | |
| 23 | 23 | $smartobjectLinkHandler = xoops_getModuleHandler('link', 'smartobject'); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | switch ($op) { |
| 29 | 29 | case 'sendlink': |
| 30 | 30 | |
| 31 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 31 | + include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 32 | 32 | $controller = new SmartObjectController($smartobjectLinkHandler); |
| 33 | 33 | |
| 34 | 34 | $linkObj = $controller->storeSmartObject(); |
@@ -38,15 +38,15 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - $xoopsMailer =& getMailer(); |
|
| 41 | + $xoopsMailer = & getMailer(); |
|
| 42 | 42 | $xoopsMailer->useMail(); |
| 43 | - $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template'); |
|
| 43 | + $xoopsMailer->setTemplateDir('language/'.$xoopsConfig['language'].'/mail_template'); |
|
| 44 | 44 | |
| 45 | 45 | $xoopsMailer->setTemplate('sendlink.tpl'); |
| 46 | 46 | $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']); |
| 47 | 47 | $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name')); |
| 48 | 48 | $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name')); |
| 49 | - $xoopsMailer->assign('SITEURL', XOOPS_URL . '/'); |
|
| 49 | + $xoopsMailer->assign('SITEURL', XOOPS_URL.'/'); |
|
| 50 | 50 | $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']); |
| 51 | 51 | $xoopsMailer->assign('MESSAGE', $_POST['body']); |
| 52 | 52 | $xoopsMailer->setToEmails($linkObj->getVar('to_email')); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename']))); |
| 56 | 56 | |
| 57 | 57 | if (!$xoopsMailer->send(true)) { |
| 58 | - $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br>' . $xoopsMailer->getErrors(true)); |
|
| 58 | + $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']).'<br>'.$xoopsMailer->getErrors(true)); |
|
| 59 | 59 | } else { |
| 60 | 60 | $xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS); |
| 61 | 61 | } |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -include_once __DIR__ . '/admin_header.php'; |
|
| 39 | -include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
| 40 | -include_once SMARTOBJECT_ROOT_PATH . 'class/currency.php'; |
|
| 38 | +include_once __DIR__.'/admin_header.php'; |
|
| 39 | +include_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
| 40 | +include_once SMARTOBJECT_ROOT_PATH.'class/currency.php'; |
|
| 41 | 41 | $smartobjectCurrencyHandler = xoops_getModuleHandler('currency'); |
| 42 | 42 | |
| 43 | 43 | $op = ''; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | switch ($op) { |
| 53 | 53 | case 'mod': |
| 54 | - $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0; |
|
| 54 | + $currencyid = isset($_GET['currencyid']) ? (int) $_GET['currencyid'] : 0; |
|
| 55 | 55 | |
| 56 | 56 | smart_xoops_cp_header(); |
| 57 | 57 | |
@@ -66,9 +66,9 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | if (isset($_POST['default_currency'])) { |
| 68 | 68 | $newDefaultCurrency = $_POST['default_currency']; |
| 69 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0'; |
|
| 69 | + $sql = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=0'; |
|
| 70 | 70 | $smartobjectCurrencyHandler->query($sql); |
| 71 | - $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency; |
|
| 71 | + $sql = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=1 WHERE currencyid='.$newDefaultCurrency; |
|
| 72 | 72 | $smartobjectCurrencyHandler->query($sql); |
| 73 | 73 | } |
| 74 | 74 | |
@@ -86,14 +86,14 @@ discard block |
||
| 86 | 86 | break; |
| 87 | 87 | |
| 88 | 88 | case 'addcurrency': |
| 89 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 89 | + include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 90 | 90 | $controller = new SmartObjectController($smartobjectCurrencyHandler); |
| 91 | - $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php'); |
|
| 91 | + $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL.'admin/currency.php'); |
|
| 92 | 92 | |
| 93 | 93 | break; |
| 94 | 94 | |
| 95 | 95 | case 'del': |
| 96 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 96 | + include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 97 | 97 | $controller = new SmartObjectController($smartobjectCurrencyHandler); |
| 98 | 98 | $controller->handleObjectDeletion(); |
| 99 | 99 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC); |
| 109 | 109 | |
| 110 | - include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
| 110 | + include_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
| 111 | 111 | $objectTable = new SmartObjectTable($smartobjectCurrencyHandler); |
| 112 | 112 | $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink')); |
| 113 | 113 | $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150)); |
@@ -129,4 +129,4 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | //smart_modFooter(); |
| 131 | 131 | //xoops_cp_footer(); |
| 132 | -include_once __DIR__ . '/admin_footer.php'; |
|
| 132 | +include_once __DIR__.'/admin_footer.php'; |
|
@@ -17,13 +17,13 @@ |
||
| 17 | 17 | * @author XOOPS Development Team |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -echo "<div class='adminfooter'>\n" . |
|
| 21 | - " <div style='text-align: center;'>\n" . |
|
| 22 | - " <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . |
|
| 23 | - " </div>\n" . |
|
| 24 | - ' ' . |
|
| 25 | - _AM_MODULEADMIN_ADMIN_FOOTER . |
|
| 26 | - "\n" . |
|
| 20 | +echo "<div class='adminfooter'>\n". |
|
| 21 | + " <div style='text-align: center;'>\n". |
|
| 22 | + " <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n". |
|
| 23 | + " </div>\n". |
|
| 24 | + ' '. |
|
| 25 | + _AM_MODULEADMIN_ADMIN_FOOTER. |
|
| 26 | + "\n". |
|
| 27 | 27 | '</div>'; |
| 28 | 28 | |
| 29 | 29 | xoops_cp_footer(); |
@@ -40,11 +40,11 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | -include_once __DIR__ . '/admin_header.php'; |
|
| 43 | +include_once __DIR__.'/admin_header.php'; |
|
| 44 | 44 | smart_loadLanguageFile('smartobject', 'customtag'); |
| 45 | 45 | |
| 46 | -include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
| 47 | -include_once SMARTOBJECT_ROOT_PATH . 'class/customtag.php'; |
|
| 46 | +include_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
| 47 | +include_once SMARTOBJECT_ROOT_PATH.'class/customtag.php'; |
|
| 48 | 48 | $smartobjectCustomtagHandler = xoops_getModuleHandler('customtag'); |
| 49 | 49 | |
| 50 | 50 | $indexAdmin = new ModuleAdmin(); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | switch ($op) { |
| 62 | 62 | case 'mod': |
| 63 | 63 | |
| 64 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
| 64 | + $customtagid = isset($_GET['customtagid']) ? (int) $_GET['customtagid'] : 0; |
|
| 65 | 65 | |
| 66 | 66 | smart_xoops_cp_header(); |
| 67 | 67 | echo $indexAdmin->addNavigation(basename(__FILE__)); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | case 'clone': |
| 73 | 73 | |
| 74 | - $customtagid = isset($_GET['customtagid']) ? (int)$_GET['customtagid'] : 0; |
|
| 74 | + $customtagid = isset($_GET['customtagid']) ? (int) $_GET['customtagid'] : 0; |
|
| 75 | 75 | |
| 76 | 76 | smart_xoops_cp_header(); |
| 77 | 77 | echo $indexAdmin->addNavigation(basename(__FILE__)); |
@@ -80,14 +80,14 @@ discard block |
||
| 80 | 80 | break; |
| 81 | 81 | |
| 82 | 82 | case 'addcustomtag': |
| 83 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 83 | + include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 84 | 84 | $controller = new SmartObjectController($smartobjectCustomtagHandler); |
| 85 | 85 | $controller->storeFromDefaultForm(_AM_SOBJECT_CUSTOMTAGS_CREATED, _AM_SOBJECT_CUSTOMTAGS_MODIFIED); |
| 86 | 86 | break; |
| 87 | 87 | |
| 88 | 88 | case 'del': |
| 89 | 89 | |
| 90 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 90 | + include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php'; |
|
| 91 | 91 | $controller = new SmartObjectController($smartobjectCustomtagHandler); |
| 92 | 92 | $controller->handleObjectDeletion(); |
| 93 | 93 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | smart_collapsableBar('createdcustomtags', _AM_SOBJECT_CUSTOMTAGS, _AM_SOBJECT_CUSTOMTAGS_DSC); |
| 106 | 106 | |
| 107 | - include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'; |
|
| 107 | + include_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'; |
|
| 108 | 108 | $objectTable = new SmartObjectTable($smartobjectCustomtagHandler); |
| 109 | 109 | $objectTable->addColumn(new SmartObjectColumn('name', 'left', 150, 'getCustomtagName')); |
| 110 | 110 | $objectTable->addColumn(new SmartObjectColumn('description', 'left')); |
@@ -153,4 +153,4 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | //smart_modFooter(); |
| 155 | 155 | //xoops_cp_footer(); |
| 156 | -include_once __DIR__ . '/admin_footer.php'; |
|
| 156 | +include_once __DIR__.'/admin_footer.php'; |
|
@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | * Licence: GNU |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -include_once __DIR__ . '/admin_header.php'; |
|
| 11 | -include_once(SMARTCONTENT_ROOT_PATH . 'class/dbupdater.php'); |
|
| 10 | +include_once __DIR__.'/admin_header.php'; |
|
| 11 | +include_once(SMARTCONTENT_ROOT_PATH.'class/dbupdater.php'); |
|
| 12 | 12 | |
| 13 | 13 | smartcontent_xoops_cp_header(); |
| 14 | 14 | |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $ret = array(); |
| 208 | 208 | global $xoopsDB; |
| 209 | 209 | $catHandler = xoops_getModuleHandler('category', 'wfdownloads'); |
| 210 | - $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $catHandler->table); |
|
| 210 | + $result = $xoopsDB->query('SHOW COLUMNS FROM '.$catHandler->table); |
|
| 211 | 211 | while ($existing_field = $xoopsDB->fetchArray($result)) { |
| 212 | 212 | $fields[$existing_field['field']] = $existing_field['type']; |
| 213 | 213 | } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type); |
| 267 | 267 | //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br>"; |
| 268 | 268 | } elseif ($existing_fields[$field] != $type) { |
| 269 | - $table->addAlteredField($field, $field . ' ' . $type); |
|
| 269 | + $table->addAlteredField($field, $field.' '.$type); |
|
| 270 | 270 | // check $fields[$field]['type'] for things like "int(10) unsigned" |
| 271 | 271 | //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type); |
| 272 | 272 | //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br>"; |
@@ -287,17 +287,17 @@ discard block |
||
| 287 | 287 | function get_table_info($table, $default_fields) |
| 288 | 288 | { |
| 289 | 289 | global $xoopsDB; |
| 290 | - $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $table); |
|
| 290 | + $result = $xoopsDB->query('SHOW COLUMNS FROM '.$table); |
|
| 291 | 291 | while ($existing_field = $xoopsDB->fetchArray($result)) { |
| 292 | 292 | $fields[$existing_field['Field']] = $existing_field['Type']; |
| 293 | 293 | if ($existing_field['Null'] !== 'YES') { |
| 294 | 294 | $fields[$existing_field['Field']] .= ' NOT NULL'; |
| 295 | 295 | } |
| 296 | 296 | if ($existing_field['Extra']) { |
| 297 | - $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra']; |
|
| 297 | + $fields[$existing_field['Field']] .= ' '.$existing_field['Extra']; |
|
| 298 | 298 | } |
| 299 | 299 | if ($default_fields[$existing_field['Field']]['Default']) { |
| 300 | - $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'"; |
|
| 300 | + $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'"; |
|
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | if (in_array($field, array_keys($renamed_fields))) { |
| 320 | 320 | $new_field_name = $renamed_fields[$field]; |
| 321 | 321 | $new_field_type = $new_fields[$new_field_name]['Type']; |
| 322 | - $table->addAltered($field, $new_field_name . ' ' . $new_field_type); |
|
| 322 | + $table->addAltered($field, $new_field_name.' '.$new_field_type); |
|
| 323 | 323 | //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type); |
| 324 | 324 | //echo $field." Renamed to ".$new_field_name."<br>"; |
| 325 | 325 | $fields[$new_field_name] = $new_field_type; |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | //return $fields; |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | -$op = isset($_REQUEST['op']) ? (int)$_REQUEST['op'] : 0; |
|
| 331 | +$op = isset($_REQUEST['op']) ? (int) $_REQUEST['op'] : 0; |
|
| 332 | 332 | switch ($op) { |
| 333 | 333 | case 1: |
| 334 | 334 | // Make sure that nohtml is properly changed to dohtml |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | |
| 348 | 348 | default: |
| 349 | 349 | //ask what to do |
| 350 | - include XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 350 | + include XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 351 | 351 | $form = new XoopsThemeForm('Upgrade WF-Downloads', 'form', $_SERVER['REQUEST_URI']); |
| 352 | 352 | |
| 353 | 353 | //Is MyDownloads installed? |
@@ -371,4 +371,4 @@ discard block |
||
| 371 | 371 | } |
| 372 | 372 | //wfdownloads_modFooter(); |
| 373 | 373 | //xoops_cp_footer(); |
| 374 | -include_once __DIR__ . '/admin_footer.php'; |
|
| 374 | +include_once __DIR__.'/admin_footer.php'; |
|