@@ -13,23 +13,23 @@ |
||
| 13 | 13 | |
| 14 | 14 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 15 | 15 | |
| 16 | -include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'); |
|
| 16 | +include_once(XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'); |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Include other classes used by the SmartObject |
| 20 | 20 | */ |
| 21 | -include_once(SMARTOBJECT_ROOT_PATH . 'class/smartobjecthandler.php'); |
|
| 22 | -include_once(SMARTOBJECT_ROOT_PATH . 'class/smartobject.php'); |
|
| 23 | -include_once(SMARTOBJECT_ROOT_PATH . 'class/smartobjectsregistry.php'); |
|
| 21 | +include_once(SMARTOBJECT_ROOT_PATH.'class/smartobjecthandler.php'); |
|
| 22 | +include_once(SMARTOBJECT_ROOT_PATH.'class/smartobject.php'); |
|
| 23 | +include_once(SMARTOBJECT_ROOT_PATH.'class/smartobjectsregistry.php'); |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Including SmartHook feature |
| 27 | 27 | */ |
| 28 | 28 | |
| 29 | -include_once(SMARTOBJECT_ROOT_PATH . 'class/smarthookhandler.php'); |
|
| 29 | +include_once(SMARTOBJECT_ROOT_PATH.'class/smarthookhandler.php'); |
|
| 30 | 30 | $smarthookHandler = SmartHookHandler::getInstance(); |
| 31 | 31 | |
| 32 | 32 | if (!class_exists('smartmetagen')) { |
| 33 | - include_once(SMARTOBJECT_ROOT_PATH . 'class/smartmetagen.php'); |
|
| 33 | + include_once(SMARTOBJECT_ROOT_PATH.'class/smartmetagen.php'); |
|
| 34 | 34 | } |
| 35 | 35 | //$smartobjectConfig = smart_getModuleConfig('smartobject'); |
@@ -148,16 +148,16 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | $this->_itemname = $itemname; |
| 150 | 150 | $this->_moduleName = $modulename; |
| 151 | - $this->table = $db->prefix($modulename . '_' . $itemname); |
|
| 151 | + $this->table = $db->prefix($modulename.'_'.$itemname); |
|
| 152 | 152 | $this->keyName = $keyname; |
| 153 | - $this->className = ucfirst($modulename) . ucfirst($itemname); |
|
| 153 | + $this->className = ucfirst($modulename).ucfirst($itemname); |
|
| 154 | 154 | $this->identifierName = $idenfierName; |
| 155 | 155 | $this->summaryName = $summaryName; |
| 156 | - $this->_page = $itemname . '.php'; |
|
| 157 | - $this->_modulePath = XOOPS_ROOT_PATH . '/modules/' . $this->_moduleName . '/'; |
|
| 158 | - $this->_moduleUrl = XOOPS_URL . '/modules/' . $this->_moduleName . '/'; |
|
| 159 | - $this->_uploadPath = XOOPS_UPLOAD_PATH . '/' . $this->_moduleName . '/'; |
|
| 160 | - $this->_uploadUrl = XOOPS_UPLOAD_URL . '/' . $this->_moduleName . '/'; |
|
| 156 | + $this->_page = $itemname.'.php'; |
|
| 157 | + $this->_modulePath = XOOPS_ROOT_PATH.'/modules/'.$this->_moduleName.'/'; |
|
| 158 | + $this->_moduleUrl = XOOPS_URL.'/modules/'.$this->_moduleName.'/'; |
|
| 159 | + $this->_uploadPath = XOOPS_UPLOAD_PATH.'/'.$this->_moduleName.'/'; |
|
| 160 | + $this->_uploadUrl = XOOPS_UPLOAD_URL.'/'.$this->_moduleName.'/'; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | */ |
| 181 | 181 | public function addPermission($perm_name, $caption, $description = false) |
| 182 | 182 | { |
| 183 | - include_once(SMARTOBJECT_ROOT_PATH . 'class/smartobjectpermission.php'); |
|
| 183 | + include_once(SMARTOBJECT_ROOT_PATH.'class/smartobjectpermission.php'); |
|
| 184 | 184 | |
| 185 | 185 | $this->permissionsArray[] = array( |
| 186 | 186 | 'perm_name' => $perm_name, |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $smartPermissionsHandler = new SmartobjectPermissionHandler($this); |
| 200 | 200 | $grantedItems = $smartPermissionsHandler->getGrantedItems($perm_name); |
| 201 | 201 | if (count($grantedItems) > 0) { |
| 202 | - $criteria->add(new Criteria($this->keyName, '(' . implode(', ', $grantedItems) . ')', 'IN')); |
|
| 202 | + $criteria->add(new Criteria($this->keyName, '('.implode(', ', $grantedItems).')', 'IN')); |
|
| 203 | 203 | |
| 204 | 204 | return true; |
| 205 | 205 | } else { |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $obj = new $this->className($this); |
| 236 | 236 | $obj->setImageDir($this->getImageUrl(), $this->getImagePath()); |
| 237 | 237 | if (!$obj->handler) { |
| 238 | - $obj->handler =& $this; |
|
| 238 | + $obj->handler = & $this; |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | if ($isNew === true) { |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | */ |
| 251 | 251 | public function getImageUrl() |
| 252 | 252 | { |
| 253 | - return $this->_uploadUrl . $this->_itemname . '/'; |
|
| 253 | + return $this->_uploadUrl.$this->_itemname.'/'; |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | /** |
@@ -258,12 +258,12 @@ discard block |
||
| 258 | 258 | */ |
| 259 | 259 | public function getImagePath() |
| 260 | 260 | { |
| 261 | - $dir = $this->_uploadPath . $this->_itemname; |
|
| 261 | + $dir = $this->_uploadPath.$this->_itemname; |
|
| 262 | 262 | if (!file_exists($dir)) { |
| 263 | 263 | smart_admin_mkdir($dir); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | - return $dir . '/'; |
|
| 266 | + return $dir.'/'; |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | /** |
@@ -351,13 +351,13 @@ discard block |
||
| 351 | 351 | if ($this->generalSQL) { |
| 352 | 352 | $sql = $this->generalSQL; |
| 353 | 353 | } elseif (!$sql) { |
| 354 | - $sql = 'SELECT * FROM ' . $this->table . ' AS ' . $this->_itemname; |
|
| 354 | + $sql = 'SELECT * FROM '.$this->table.' AS '.$this->_itemname; |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 358 | - $sql .= ' ' . $criteria->renderWhere(); |
|
| 358 | + $sql .= ' '.$criteria->renderWhere(); |
|
| 359 | 359 | if ($criteria->getSort() !== '') { |
| 360 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
| 360 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
| 361 | 361 | } |
| 362 | 362 | $limit = $criteria->getLimit(); |
| 363 | 363 | $start = $criteria->getStart(); |
@@ -386,12 +386,12 @@ discard block |
||
| 386 | 386 | $ret = array(); |
| 387 | 387 | |
| 388 | 388 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 389 | - $sql .= ' ' . $criteria->renderWhere(); |
|
| 389 | + $sql .= ' '.$criteria->renderWhere(); |
|
| 390 | 390 | if ($criteria->groupby) { |
| 391 | 391 | $sql .= $criteria->getGroupby(); |
| 392 | 392 | } |
| 393 | 393 | if ($criteria->getSort() !== '') { |
| 394 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
| 394 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
| 395 | 395 | } |
| 396 | 396 | } |
| 397 | 397 | if ($debug) { |
@@ -464,18 +464,18 @@ discard block |
||
| 464 | 464 | $obj->assignVars($myrow); |
| 465 | 465 | if (!$id_as_key) { |
| 466 | 466 | if ($as_object) { |
| 467 | - $ret[] =& $obj; |
|
| 467 | + $ret[] = & $obj; |
|
| 468 | 468 | } else { |
| 469 | 469 | $ret[] = $obj->toArray(); |
| 470 | 470 | } |
| 471 | 471 | } else { |
| 472 | 472 | if ($as_object) { |
| 473 | - $value =& $obj; |
|
| 473 | + $value = & $obj; |
|
| 474 | 474 | } else { |
| 475 | 475 | $value = $obj->toArray(); |
| 476 | 476 | } |
| 477 | 477 | if ($id_as_key === 'parentid') { |
| 478 | - $ret[$obj->getVar('parentid', 'e')][$obj->getVar($this->keyName)] =& $value; |
|
| 478 | + $ret[$obj->getVar('parentid', 'e')][$obj->getVar($this->keyName)] = & $value; |
|
| 479 | 479 | } else { |
| 480 | 480 | $ret[$obj->getVar($this->keyName)] = $value; |
| 481 | 481 | } |
@@ -518,15 +518,15 @@ discard block |
||
| 518 | 518 | $criteria->setSort($this->getIdentifierName()); |
| 519 | 519 | } |
| 520 | 520 | |
| 521 | - $sql = 'SELECT ' . (is_array($this->keyName) ? implode(', ', $this->keyName) : $this->keyName); |
|
| 521 | + $sql = 'SELECT '.(is_array($this->keyName) ? implode(', ', $this->keyName) : $this->keyName); |
|
| 522 | 522 | if (!empty($this->identifierName)) { |
| 523 | - $sql .= ', ' . $this->getIdentifierName(); |
|
| 523 | + $sql .= ', '.$this->getIdentifierName(); |
|
| 524 | 524 | } |
| 525 | - $sql .= ' FROM ' . $this->table . ' AS ' . $this->_itemname; |
|
| 525 | + $sql .= ' FROM '.$this->table.' AS '.$this->_itemname; |
|
| 526 | 526 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 527 | - $sql .= ' ' . $criteria->renderWhere(); |
|
| 527 | + $sql .= ' '.$criteria->renderWhere(); |
|
| 528 | 528 | if ($criteria->getSort() !== '') { |
| 529 | - $sql .= ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder(); |
|
| 529 | + $sql .= ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder(); |
|
| 530 | 530 | } |
| 531 | 531 | $limit = $criteria->getLimit(); |
| 532 | 532 | $start = $criteria->getStart(); |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 564 | 564 | if ($criteria->groupby !== '') { |
| 565 | 565 | $groupby = true; |
| 566 | - $field = $criteria->groupby . ', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
| 566 | + $field = $criteria->groupby.', '; //Not entirely secure unless you KNOW that no criteria's groupby clause is going to be mis-used |
|
| 567 | 567 | } |
| 568 | 568 | } |
| 569 | 569 | /** |
@@ -574,10 +574,10 @@ discard block |
||
| 574 | 574 | $sql = $this->generalSQL; |
| 575 | 575 | $sql = str_replace('SELECT *', 'SELECT COUNT(*)', $sql); |
| 576 | 576 | } else { |
| 577 | - $sql = 'SELECT ' . $field . 'COUNT(*) FROM ' . $this->table . ' AS ' . $this->_itemname; |
|
| 577 | + $sql = 'SELECT '.$field.'COUNT(*) FROM '.$this->table.' AS '.$this->_itemname; |
|
| 578 | 578 | } |
| 579 | 579 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 580 | - $sql .= ' ' . $criteria->renderWhere(); |
|
| 580 | + $sql .= ' '.$criteria->renderWhere(); |
|
| 581 | 581 | if ($criteria->groupby !== '') { |
| 582 | 582 | $sql .= $criteria->getGroupby(); |
| 583 | 583 | } |
@@ -620,13 +620,13 @@ discard block |
||
| 620 | 620 | if (is_array($this->keyName)) { |
| 621 | 621 | $clause = array(); |
| 622 | 622 | for ($i = 0, $iMax = count($this->keyName); $i < $iMax; ++$i) { |
| 623 | - $clause[] = $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]); |
|
| 623 | + $clause[] = $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]); |
|
| 624 | 624 | } |
| 625 | 625 | $whereclause = implode(' AND ', $clause); |
| 626 | 626 | } else { |
| 627 | - $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
| 627 | + $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName); |
|
| 628 | 628 | } |
| 629 | - $sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $whereclause; |
|
| 629 | + $sql = 'DELETE FROM '.$this->table.' WHERE '.$whereclause; |
|
| 630 | 630 | if (false !== $force) { |
| 631 | 631 | $result = $this->db->queryF($sql); |
| 632 | 632 | } else { |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 |
| 688 | 688 | */ |
| 689 | 689 | if (!is_a($obj, $this->className)) { |
| 690 | - $obj->setError(get_class($obj) . ' Differs from ' . $this->className); |
|
| 690 | + $obj->setError(get_class($obj).' Differs from '.$this->className); |
|
| 691 | 691 | |
| 692 | 692 | return false; |
| 693 | 693 | } |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | $fieldsToStoreInDB = array(); |
| 749 | 749 | foreach ($obj->cleanVars as $k => $v) { |
| 750 | 750 | if ($obj->vars[$k]['data_type'] == XOBJ_DTYPE_INT) { |
| 751 | - $cleanvars[$k] = (int)$v; |
|
| 751 | + $cleanvars[$k] = (int) $v; |
|
| 752 | 752 | } elseif (is_array($v)) { |
| 753 | 753 | $cleanvars[$k] = $this->db->quoteString(implode(',', $v)); |
| 754 | 754 | } else { |
@@ -761,13 +761,13 @@ discard block |
||
| 761 | 761 | if ($obj->isNew()) { |
| 762 | 762 | if (!is_array($this->keyName)) { |
| 763 | 763 | if ($cleanvars[$this->keyName] < 1) { |
| 764 | - $cleanvars[$this->keyName] = $this->db->genId($this->table . '_' . $this->keyName . '_seq'); |
|
| 764 | + $cleanvars[$this->keyName] = $this->db->genId($this->table.'_'.$this->keyName.'_seq'); |
|
| 765 | 765 | } |
| 766 | 766 | } |
| 767 | 767 | |
| 768 | - $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', array_keys($fieldsToStoreInDB)) . ') VALUES (' . implode(',', array_values($fieldsToStoreInDB)) . ')'; |
|
| 768 | + $sql = 'INSERT INTO '.$this->table.' ('.implode(',', array_keys($fieldsToStoreInDB)).') VALUES ('.implode(',', array_values($fieldsToStoreInDB)).')'; |
|
| 769 | 769 | } else { |
| 770 | - $sql = 'UPDATE ' . $this->table . ' SET'; |
|
| 770 | + $sql = 'UPDATE '.$this->table.' SET'; |
|
| 771 | 771 | foreach ($fieldsToStoreInDB as $key => $value) { |
| 772 | 772 | if ((!is_array($this->keyName) && $key == $this->keyName) || (is_array($this->keyName) && in_array($key, $this->keyName))) { |
| 773 | 773 | continue; |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | if (isset($notfirst)) { |
| 776 | 776 | $sql .= ','; |
| 777 | 777 | } |
| 778 | - $sql .= ' ' . $key . ' = ' . $value; |
|
| 778 | + $sql .= ' '.$key.' = '.$value; |
|
| 779 | 779 | $notfirst = true; |
| 780 | 780 | } |
| 781 | 781 | if (is_array($this->keyName)) { |
@@ -784,12 +784,12 @@ discard block |
||
| 784 | 784 | if ($i > 0) { |
| 785 | 785 | $whereclause .= ' AND '; |
| 786 | 786 | } |
| 787 | - $whereclause .= $this->keyName[$i] . ' = ' . $obj->getVar($this->keyName[$i]); |
|
| 787 | + $whereclause .= $this->keyName[$i].' = '.$obj->getVar($this->keyName[$i]); |
|
| 788 | 788 | } |
| 789 | 789 | } else { |
| 790 | - $whereclause = $this->keyName . ' = ' . $obj->getVar($this->keyName); |
|
| 790 | + $whereclause = $this->keyName.' = '.$obj->getVar($this->keyName); |
|
| 791 | 791 | } |
| 792 | - $sql .= ' WHERE ' . $whereclause; |
|
| 792 | + $sql .= ' WHERE '.$whereclause; |
|
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | if ($debug) { |
@@ -862,7 +862,7 @@ discard block |
||
| 862 | 862 | */ |
| 863 | 863 | public function updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = null, $force = false) |
| 864 | 864 | { |
| 865 | - $set_clause = $fieldname . ' = '; |
|
| 865 | + $set_clause = $fieldname.' = '; |
|
| 866 | 866 | if (is_numeric($fieldvalue)) { |
| 867 | 867 | $set_clause .= $fieldvalue; |
| 868 | 868 | } elseif (is_array($fieldvalue)) { |
@@ -870,9 +870,9 @@ discard block |
||
| 870 | 870 | } else { |
| 871 | 871 | $set_clause .= $this->db->quoteString($fieldvalue); |
| 872 | 872 | } |
| 873 | - $sql = 'UPDATE ' . $this->table . ' SET ' . $set_clause; |
|
| 873 | + $sql = 'UPDATE '.$this->table.' SET '.$set_clause; |
|
| 874 | 874 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 875 | - $sql .= ' ' . $criteria->renderWhere(); |
|
| 875 | + $sql .= ' '.$criteria->renderWhere(); |
|
| 876 | 876 | } |
| 877 | 877 | if (false != $force) { |
| 878 | 878 | $result = $this->db->queryF($sql); |
@@ -896,8 +896,8 @@ discard block |
||
| 896 | 896 | public function deleteAll(CriteriaElement $criteria = null) |
| 897 | 897 | { |
| 898 | 898 | if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { |
| 899 | - $sql = 'DELETE FROM ' . $this->table; |
|
| 900 | - $sql .= ' ' . $criteria->renderWhere(); |
|
| 899 | + $sql = 'DELETE FROM '.$this->table; |
|
| 900 | + $sql .= ' '.$criteria->renderWhere(); |
|
| 901 | 901 | if (!$this->db->query($sql)) { |
| 902 | 902 | return false; |
| 903 | 903 | } |
@@ -930,7 +930,7 @@ discard block |
||
| 930 | 930 | */ |
| 931 | 931 | public function getModuleItemString() |
| 932 | 932 | { |
| 933 | - $ret = $this->_moduleName . '_' . $this->_itemname; |
|
| 933 | + $ret = $this->_moduleName.'_'.$this->_itemname; |
|
| 934 | 934 | |
| 935 | 935 | return $ret; |
| 936 | 936 | } |
@@ -942,7 +942,7 @@ discard block |
||
| 942 | 942 | { |
| 943 | 943 | if (isset($object->vars['counter'])) { |
| 944 | 944 | $new_counter = $object->getVar('counter') + 1; |
| 945 | - $sql = 'UPDATE ' . $this->table . ' SET counter=' . $new_counter . ' WHERE ' . $this->keyName . '=' . $object->id(); |
|
| 945 | + $sql = 'UPDATE '.$this->table.' SET counter='.$new_counter.' WHERE '.$this->keyName.'='.$object->id(); |
|
| 946 | 946 | $this->query($sql, null, true); |
| 947 | 947 | } |
| 948 | 948 | } |
@@ -986,7 +986,7 @@ discard block |
||
| 986 | 986 | public function getIdentifierName($withprefix = true) |
| 987 | 987 | { |
| 988 | 988 | if ($withprefix) { |
| 989 | - return $this->_itemname . '.' . $this->identifierName; |
|
| 989 | + return $this->_itemname.'.'.$this->identifierName; |
|
| 990 | 990 | } else { |
| 991 | 991 | return $this->identifierName; |
| 992 | 992 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 31 | 31 | |
| 32 | -include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/projax/projax.php'; |
|
| 32 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/include/projax/projax.php'; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Class SmartJax |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public function initiateFromUserside() |
| 40 | 40 | { |
| 41 | 41 | global $xoTheme; |
| 42 | - $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/prototype.js'); |
|
| 43 | - $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/scriptaculous.js'); |
|
| 42 | + $xoTheme->addScript(SMARTOBJECT_URL.'include/projax/js/prototype.js'); |
|
| 43 | + $xoTheme->addScript(SMARTOBJECT_URL.'include/projax/js/scriptaculous.js'); |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * @subpackage SmartObjectTable |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -include_once(SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php'); |
|
| 12 | +include_once(SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php'); |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * SmartObjectTreeTable class |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $space .= ' '; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - $aColumn['value'] = $space . $value; |
|
| 98 | + $aColumn['value'] = $space.$value; |
|
| 99 | 99 | $aColumn['class'] = $class; |
| 100 | 100 | $aColumn['width'] = $column->getWidth(); |
| 101 | 101 | $aColumn['align'] = $column->getAlign(); |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectcontroller.php'; |
|
| 122 | + include_once SMARTOBJECT_ROOT_PATH.'class/smartobjectcontroller.php'; |
|
| 123 | 123 | $controller = new SmartObjectController($this->_objectHandler); |
| 124 | 124 | |
| 125 | 125 | if (in_array('edit', $this->_actions)) { |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // -------------------------------------------------------------------------// |
| 29 | 29 | |
| 30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 31 | -include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
| 31 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Class SmartobjectLink |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | return $ret; |
| 119 | 119 | } else { |
| 120 | - $ret = '<a href="' . $ret . '" alt="' . $this->getVar('link', 'e') . '" title="' . $this->getVar('link', 'e') . '">' . _AM_SOBJECT_SENT_LINKS_GOTO . '</a>'; |
|
| 120 | + $ret = '<a href="'.$ret.'" alt="'.$this->getVar('link', 'e').'" title="'.$this->getVar('link', 'e').'">'._AM_SOBJECT_SENT_LINKS_GOTO.'</a>'; |
|
| 121 | 121 | |
| 122 | 122 | return $ret; |
| 123 | 123 | } |
@@ -128,16 +128,16 @@ discard block |
||
| 128 | 128 | */ |
| 129 | 129 | public function getViewItemLink() |
| 130 | 130 | { |
| 131 | - $ret = '<a href="' . |
|
| 132 | - SMARTOBJECT_URL . |
|
| 133 | - 'admin/link.php?op=view&linkid=' . |
|
| 134 | - $this->getVar('linkid') . |
|
| 135 | - '"><img src="' . |
|
| 136 | - SMARTOBJECT_IMAGES_ACTIONS_URL . |
|
| 137 | - 'mail_find.png" alt="' . |
|
| 138 | - _AM_SOBJECT_SENT_LINK_VIEW . |
|
| 139 | - '" title="' . |
|
| 140 | - _AM_SOBJECT_SENT_LINK_VIEW . |
|
| 131 | + $ret = '<a href="'. |
|
| 132 | + SMARTOBJECT_URL. |
|
| 133 | + 'admin/link.php?op=view&linkid='. |
|
| 134 | + $this->getVar('linkid'). |
|
| 135 | + '"><img src="'. |
|
| 136 | + SMARTOBJECT_IMAGES_ACTIONS_URL. |
|
| 137 | + 'mail_find.png" alt="'. |
|
| 138 | + _AM_SOBJECT_SENT_LINK_VIEW. |
|
| 139 | + '" title="'. |
|
| 140 | + _AM_SOBJECT_SENT_LINK_VIEW. |
|
| 141 | 141 | '" /></a>'; |
| 142 | 142 | |
| 143 | 143 | return $ret; |
@@ -153,10 +153,10 @@ discard block |
||
| 153 | 153 | if ($this->getVar('from_uid')) { |
| 154 | 154 | $user = smart_getLinkedUnameFromId($this->getVar('from_uid')); |
| 155 | 155 | if ($user == $GLOBALS['xoopsConfig']['anonymous']) { |
| 156 | - $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>'; |
|
| 156 | + $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>'; |
|
| 157 | 157 | } |
| 158 | 158 | } else { |
| 159 | - $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>'; |
|
| 159 | + $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>'; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | return $user; |
@@ -185,10 +185,10 @@ discard block |
||
| 185 | 185 | if ($this->getVar('to_uid')) { |
| 186 | 186 | $user = smart_getLinkedUnameFromId($this->getVar('to_uid')); |
| 187 | 187 | if ($user == $GLOBALS['xoopsConfig']['anonymous']) { |
| 188 | - $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>'; |
|
| 188 | + $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>'; |
|
| 189 | 189 | } |
| 190 | 190 | } else { |
| 191 | - $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>'; |
|
| 191 | + $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>'; |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | return $user; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 31 | 31 | |
| 32 | -include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
| 32 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | 35 | * Class SmartobjectCustomtag |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function getXoopsCode() |
| 124 | 124 | { |
| 125 | - $ret = '[customtag]' . $this->getVar('tag', 'n') . '[/customtag]'; |
|
| 125 | + $ret = '[customtag]'.$this->getVar('tag', 'n').'[/customtag]'; |
|
| 126 | 126 | |
| 127 | 127 | return $ret; |
| 128 | 128 | } |
@@ -132,16 +132,16 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function getCloneLink() |
| 134 | 134 | { |
| 135 | - $ret = '<a href="' . |
|
| 136 | - SMARTOBJECT_URL . |
|
| 137 | - 'admin/customtag.php?op=clone&customtagid=' . |
|
| 138 | - $this->id() . |
|
| 139 | - '"><img src="' . |
|
| 140 | - SMARTOBJECT_IMAGES_ACTIONS_URL . |
|
| 141 | - 'editcopy.png" style="vertical-align: middle;" alt="' . |
|
| 142 | - _CO_SOBJECT_CUSTOMTAG_CLONE . |
|
| 143 | - '" title="' . |
|
| 144 | - _CO_SOBJECT_CUSTOMTAG_CLONE . |
|
| 135 | + $ret = '<a href="'. |
|
| 136 | + SMARTOBJECT_URL. |
|
| 137 | + 'admin/customtag.php?op=clone&customtagid='. |
|
| 138 | + $this->id(). |
|
| 139 | + '"><img src="'. |
|
| 140 | + SMARTOBJECT_IMAGES_ACTIONS_URL. |
|
| 141 | + 'editcopy.png" style="vertical-align: middle;" alt="'. |
|
| 142 | + _CO_SOBJECT_CUSTOMTAG_CLONE. |
|
| 143 | + '" title="'. |
|
| 144 | + _CO_SOBJECT_CUSTOMTAG_CLONE. |
|
| 145 | 145 | '" /></a>'; |
| 146 | 146 | |
| 147 | 147 | return $ret; |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $granted_ids = $smartobjectPermissionsHandler->getGrantedItems('view'); |
| 279 | 279 | |
| 280 | 280 | if ($granted_ids && count($granted_ids) > 0) { |
| 281 | - $criteria->add(new Criteria('customtagid', '(' . implode(', ', $granted_ids) . ')', 'IN')); |
|
| 281 | + $criteria->add(new Criteria('customtagid', '('.implode(', ', $granted_ids).')', 'IN')); |
|
| 282 | 282 | $customtagsObj = $this->getObjects($criteria, true); |
| 283 | 283 | foreach ($customtagsObj as $customtagObj) { |
| 284 | 284 | $ret[$customtagObj->getVar('name')] = $customtagObj; |
@@ -49,11 +49,11 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | global $xoopsModule, $xoopsConfig; |
| 51 | 51 | |
| 52 | - $fileName = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/modinfo.php'; |
|
| 52 | + $fileName = XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/'.$xoopsConfig['language'].'/modinfo.php'; |
|
| 53 | 53 | if (file_exists($fileName)) { |
| 54 | 54 | include_once $fileName; |
| 55 | 55 | } else { |
| 56 | - include_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/language/english/modinfo.php'; |
|
| 56 | + include_once XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/language/english/modinfo.php'; |
|
| 57 | 57 | } |
| 58 | 58 | $this->_aboutTitle = $aboutTitle; |
| 59 | 59 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | //smart_adminMenu(-1, $this->_aboutTitle . " " . $versioninfo->getInfo('name')); |
| 106 | 106 | |
| 107 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 107 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 108 | 108 | |
| 109 | 109 | // --- |
| 110 | 110 | // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated. |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $this->_tpl = new XoopsTpl(); |
| 113 | 113 | // --- |
| 114 | 114 | |
| 115 | - $this->_tpl->assign('module_url', XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/'); |
|
| 115 | + $this->_tpl->assign('module_url', XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/'); |
|
| 116 | 116 | $this->_tpl->assign('module_image', $versioninfo->getInfo('image')); |
| 117 | 117 | $this->_tpl->assign('module_name', $versioninfo->getInfo('name')); |
| 118 | 118 | $this->_tpl->assign('module_version', $versioninfo->getInfo('version')); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | // Left headings... |
| 122 | 122 | if ($versioninfo->getInfo('author_realname') !== '') { |
| 123 | - $author_name = $versioninfo->getInfo('author') . ' (' . $versioninfo->getInfo('author_realname') . ')'; |
|
| 123 | + $author_name = $versioninfo->getInfo('author').' ('.$versioninfo->getInfo('author_realname').')'; |
|
| 124 | 124 | } else { |
| 125 | 125 | $author_name = $versioninfo->getInfo('author'); |
| 126 | 126 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | // For changelog thanks to 3Dev |
| 167 | 167 | global $xoopsModule; |
| 168 | - $filename = XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/changelog.txt'; |
|
| 168 | + $filename = XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/changelog.txt'; |
|
| 169 | 169 | if (is_file($filename)) { |
| 170 | 170 | $filesize = filesize($filename); |
| 171 | 171 | $handle = fopen($filename, 'r'); |
@@ -18,15 +18,15 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 20 | 20 | if (!defined('SMARTOBJECT_ROOT_PATH')) { |
| 21 | - include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'); |
|
| 21 | + include_once(XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'); |
|
| 22 | 22 | } |
| 23 | 23 | /** |
| 24 | 24 | * Include the language constants for the SmartObjectDBUpdater |
| 25 | 25 | */ |
| 26 | 26 | global $xoopsConfig; |
| 27 | -$common_file = SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/smartdbupdater.php'; |
|
| 27 | +$common_file = SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/smartdbupdater.php'; |
|
| 28 | 28 | if (!file_exists($common_file)) { |
| 29 | - $common_file = SMARTOBJECT_ROOT_PATH . 'language/english/smartdbupdater.php'; |
|
| 29 | + $common_file = SMARTOBJECT_ROOT_PATH.'language/english/smartdbupdater.php'; |
|
| 30 | 30 | } |
| 31 | 31 | include($common_file); |
| 32 | 32 | |
@@ -123,17 +123,17 @@ discard block |
||
| 123 | 123 | public function getExistingFieldsArray() |
| 124 | 124 | { |
| 125 | 125 | global $xoopsDB; |
| 126 | - $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $this->name()); |
|
| 126 | + $result = $xoopsDB->query('SHOW COLUMNS FROM '.$this->name()); |
|
| 127 | 127 | while ($existing_field = $xoopsDB->fetchArray($result)) { |
| 128 | 128 | $fields[$existing_field['Field']] = $existing_field['Type']; |
| 129 | 129 | if ($existing_field['Null'] !== 'YES') { |
| 130 | 130 | $fields[$existing_field['Field']] .= ' NOT NULL'; |
| 131 | 131 | } |
| 132 | 132 | if ($existing_field['Extra']) { |
| 133 | - $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra']; |
|
| 133 | + $fields[$existing_field['Field']] .= ' '.$existing_field['Extra']; |
|
| 134 | 134 | } |
| 135 | 135 | if (!($existing_field['Default'] === null) && ($existing_field['Default'] || $existing_field['Default'] === '' || $existing_field['Default'] == 0)) { |
| 136 | - $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'"; |
|
| 136 | + $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'"; |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
@@ -219,9 +219,9 @@ discard block |
||
| 219 | 219 | $query = sprintf('INSERT INTO %s VALUES (%s)', $this->name(), $data); |
| 220 | 220 | $ret = $xoopsDB->query($query); |
| 221 | 221 | if (!$ret) { |
| 222 | - echo ' ' . sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()) . '<br>'; |
|
| 222 | + echo ' '.sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()).'<br>'; |
|
| 223 | 223 | } else { |
| 224 | - echo ' ' . sprintf(_SDU_MSG_ADD_DATA, $this->name()) . '<br>'; |
|
| 224 | + echo ' '.sprintf(_SDU_MSG_ADD_DATA, $this->name()).'<br>'; |
|
| 225 | 225 | } |
| 226 | 226 | } |
| 227 | 227 | |
@@ -373,13 +373,13 @@ discard block |
||
| 373 | 373 | { |
| 374 | 374 | global $xoopsDB; |
| 375 | 375 | $query = $this->getStructure(); |
| 376 | - $query = 'CREATE TABLE `' . $this->name() . '` (' . $query . ") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'"; |
|
| 376 | + $query = 'CREATE TABLE `'.$this->name().'` ('.$query.") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'"; |
|
| 377 | 377 | //xoops_debug($query); |
| 378 | 378 | $ret = $xoopsDB->query($query); |
| 379 | 379 | if (!$ret) { |
| 380 | - echo ' ' . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>'; |
|
| 380 | + echo ' '.sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>'; |
|
| 381 | 381 | } else { |
| 382 | - echo ' ' . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . '<br>'; |
|
| 382 | + echo ' '.sprintf(_SDU_MSG_CREATE_TABLE, $this->name()).'<br>'; |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | return $ret; |
@@ -397,11 +397,11 @@ discard block |
||
| 397 | 397 | $query = sprintf('DROP TABLE %s', $this->name()); |
| 398 | 398 | $ret = $xoopsDB->query($query); |
| 399 | 399 | if (!$ret) { |
| 400 | - echo ' ' . sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>'; |
|
| 400 | + echo ' '.sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>'; |
|
| 401 | 401 | |
| 402 | 402 | return false; |
| 403 | 403 | } else { |
| 404 | - echo ' ' . sprintf(_SDU_MSG_DROP_TABLE, $this->name()) . '<br>'; |
|
| 404 | + echo ' '.sprintf(_SDU_MSG_DROP_TABLE, $this->name()).'<br>'; |
|
| 405 | 405 | |
| 406 | 406 | return true; |
| 407 | 407 | } |
@@ -427,9 +427,9 @@ discard block |
||
| 427 | 427 | $ret = $ret && $xoopsDB->query($query); |
| 428 | 428 | if ($alteredField['showerror']) { |
| 429 | 429 | if (!$ret) { |
| 430 | - echo ' ' . sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()) . ' (' . $xoopsDB->error() . ')<br>'; |
|
| 430 | + echo ' '.sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()).' ('.$xoopsDB->error().')<br>'; |
|
| 431 | 431 | } else { |
| 432 | - echo ' ' . sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()) . '<br>'; |
|
| 432 | + echo ' '.sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()).'<br>'; |
|
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | } |
@@ -452,9 +452,9 @@ discard block |
||
| 452 | 452 | //echo $query; |
| 453 | 453 | $ret = $ret && $xoopsDB->query($query); |
| 454 | 454 | if (!$ret) { |
| 455 | - echo ' ' . sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()) . '<br>'; |
|
| 455 | + echo ' '.sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()).'<br>'; |
|
| 456 | 456 | } else { |
| 457 | - echo ' ' . sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()) . '<br>'; |
|
| 457 | + echo ' '.sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()).'<br>'; |
|
| 458 | 458 | } |
| 459 | 459 | } |
| 460 | 460 | |
@@ -475,9 +475,9 @@ discard block |
||
| 475 | 475 | $query = sprintf('UPDATE %s SET %s = %s', $this->name(), $updatedField['name'], $updatedField['value']); |
| 476 | 476 | $ret = $ret && $xoopsDB->query($query); |
| 477 | 477 | if (!$ret) { |
| 478 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>'; |
|
| 478 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>'; |
|
| 479 | 479 | } else { |
| 480 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
|
| 480 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>'; |
|
| 481 | 481 | } |
| 482 | 482 | } |
| 483 | 483 | |
@@ -498,9 +498,9 @@ discard block |
||
| 498 | 498 | //echo $query."<br>"; |
| 499 | 499 | $ret = $ret && $xoopsDB->query($query); |
| 500 | 500 | if (!$ret) { |
| 501 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>'; |
|
| 501 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>'; |
|
| 502 | 502 | } else { |
| 503 | - echo ' ' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>'; |
|
| 503 | + echo ' '.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>'; |
|
| 504 | 504 | } |
| 505 | 505 | } |
| 506 | 506 | |
@@ -521,9 +521,9 @@ discard block |
||
| 521 | 521 | $query = sprintf('ALTER TABLE %s DROP %s', $this->name(), $droppedField); |
| 522 | 522 | $ret = $ret && $xoopsDB->query($query); |
| 523 | 523 | if (!$ret) { |
| 524 | - echo ' ' . sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()) . ' (' . $xoopsDB->error() . ')<br>'; |
|
| 524 | + echo ' '.sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()).' ('.$xoopsDB->error().')<br>'; |
|
| 525 | 525 | } else { |
| 526 | - echo ' ' . sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()) . '<br>'; |
|
| 526 | + echo ' '.sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()).'<br>'; |
|
| 527 | 527 | } |
| 528 | 528 | } |
| 529 | 529 | |
@@ -610,11 +610,11 @@ discard block |
||
| 610 | 610 | $query = sprintf('ALTER TABLE %s RENAME %s', $from, $to); |
| 611 | 611 | $ret = $xoopsDB->query($query); |
| 612 | 612 | if (!$ret) { |
| 613 | - echo ' ' . sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from) . '<br>'; |
|
| 613 | + echo ' '.sprintf(_SDU_MSG_RENAME_TABLE_ERR, $from).'<br>'; |
|
| 614 | 614 | |
| 615 | 615 | return false; |
| 616 | 616 | } else { |
| 617 | - echo ' ' . sprintf(_SDU_MSG_RENAME_TABLE, $from, $to) . '<br>'; |
|
| 617 | + echo ' '.sprintf(_SDU_MSG_RENAME_TABLE, $from, $to).'<br>'; |
|
| 618 | 618 | |
| 619 | 619 | return true; |
| 620 | 620 | } |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | return false; |
| 735 | 735 | } |
| 736 | 736 | |
| 737 | - $table = new SmartDbTable($module . '_' . $item); |
|
| 737 | + $table = new SmartDbTable($module.'_'.$item); |
|
| 738 | 738 | $object = $moduleHandler->create(); |
| 739 | 739 | $objectVars = $object->getVars(); |
| 740 | 740 | |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | "; |
| 756 | 756 | } |
| 757 | 757 | } |
| 758 | - $structure .= 'PRIMARY KEY (`' . $moduleHandler->keyName . '`) |
|
| 758 | + $structure .= 'PRIMARY KEY (`'.$moduleHandler->keyName.'`) |
|
| 759 | 759 | '; |
| 760 | 760 | $table->setStructure($structure); |
| 761 | 761 | if (!$this->updateTable($table)) { |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | |
| 816 | 816 | ob_start(); |
| 817 | 817 | |
| 818 | - $table = new SmartDbTable($dirname . '_meta'); |
|
| 818 | + $table = new SmartDbTable($dirname.'_meta'); |
|
| 819 | 819 | if (!$table->exists()) { |
| 820 | 820 | $table->setStructure(" |
| 821 | 821 | `metakey` varchar(50) NOT NULL default '', |
@@ -833,20 +833,20 @@ discard block |
||
| 833 | 833 | if (!$dbVersion) { |
| 834 | 834 | $dbVersion = 0; |
| 835 | 835 | } |
| 836 | - $newDbVersion = constant(strtoupper($dirname . '_db_version')) ?: 0; |
|
| 837 | - echo 'Database version: ' . $dbVersion . '<br>'; |
|
| 838 | - echo 'New database version: ' . $newDbVersion . '<br>'; |
|
| 836 | + $newDbVersion = constant(strtoupper($dirname.'_db_version')) ?: 0; |
|
| 837 | + echo 'Database version: '.$dbVersion.'<br>'; |
|
| 838 | + echo 'New database version: '.$newDbVersion.'<br>'; |
|
| 839 | 839 | |
| 840 | 840 | if ($newDbVersion > $dbVersion) { |
| 841 | 841 | for ($i = $dbVersion + 1; $i <= $newDbVersion; ++$i) { |
| 842 | - $upgrade_function = $dirname . '_db_upgrade_' . $i; |
|
| 842 | + $upgrade_function = $dirname.'_db_upgrade_'.$i; |
|
| 843 | 843 | if (function_exists($upgrade_function)) { |
| 844 | 844 | $upgrade_function(); |
| 845 | 845 | } |
| 846 | 846 | } |
| 847 | 847 | } |
| 848 | 848 | |
| 849 | - echo '<code>' . _SDU_UPDATE_UPDATING_DATABASE . '<br>'; |
|
| 849 | + echo '<code>'._SDU_UPDATE_UPDATING_DATABASE.'<br>'; |
|
| 850 | 850 | |
| 851 | 851 | // if there is a function to execute for this DB version, let's do it |
| 852 | 852 | //$function_ |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | * @todo make the output XHTML compliant |
| 43 | 43 | */ |
| 44 | 44 | |
| 45 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 45 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 46 | 46 | |
| 47 | 47 | $this->_tpl = new XoopsTpl(); |
| 48 | 48 | |