@@ -30,9 +30,9 @@ discard block |
||
| 30 | 30 | // ------------------------------------------------------------------------- // |
| 31 | 31 | |
| 32 | 32 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 33 | -require_once XOOPS_ROOT_PATH . '/kernel/user.php'; |
|
| 34 | -require_once XOOPS_ROOT_PATH . '/kernel/group.php'; |
|
| 35 | -require_once XOOPS_ROOT_PATH . '/kernel/member.php'; |
|
| 33 | +require_once XOOPS_ROOT_PATH.'/kernel/user.php'; |
|
| 34 | +require_once XOOPS_ROOT_PATH.'/kernel/group.php'; |
|
| 35 | +require_once XOOPS_ROOT_PATH.'/kernel/member.php'; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * XOOPS member handler class. |
@@ -151,14 +151,14 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | if ($notifyUser) { |
| 153 | 153 | // send some notifications |
| 154 | - $xoopsMailer =& getMailer(); |
|
| 154 | + $xoopsMailer = & getMailer(); |
|
| 155 | 155 | $xoopsMailer->useMail(); |
| 156 | - $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/mail_template'); |
|
| 156 | + $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/mail_template'); |
|
| 157 | 157 | $xoopsMailer->setTemplate('smartobject_notify_user_added_by_admin.tpl'); |
| 158 | 158 | $xoopsMailer->assign('XOOPS_USER_PASSWORD', $password); |
| 159 | 159 | $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']); |
| 160 | 160 | $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']); |
| 161 | - $xoopsMailer->assign('SITEURL', XOOPS_URL . '/'); |
|
| 161 | + $xoopsMailer->assign('SITEURL', XOOPS_URL.'/'); |
|
| 162 | 162 | $xoopsMailer->assign('NAME', $userObj->getVar('name')); |
| 163 | 163 | $xoopsMailer->assign('UNAME', $userObj->getVar('uname')); |
| 164 | 164 | $xoopsMailer->setToUsers($userObj); |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | if (strlen($name) > 0) { |
| 205 | 205 | $name = explode(' ', trim($name)); |
| 206 | 206 | if (count($name) > 1) { |
| 207 | - $basename = strtolower(substr($name[0], 0, 1) . $name[count($name) - 1]); |
|
| 207 | + $basename = strtolower(substr($name[0], 0, 1).$name[count($name) - 1]); |
|
| 208 | 208 | } else { |
| 209 | 209 | $basename = strtolower($name[0]); |
| 210 | 210 | } |
@@ -221,9 +221,9 @@ discard block |
||
| 221 | 221 | while ($i < $count) { |
| 222 | 222 | $num = $this->genRandNumber(); |
| 223 | 223 | if ($onbasename < 0 && $hasbasename) { |
| 224 | - $names[] = xoops_substr($basename, 0, 58, '') . $num; |
|
| 224 | + $names[] = xoops_substr($basename, 0, 58, '').$num; |
|
| 225 | 225 | } else { |
| 226 | - $names[] = xoops_substr($emailname, 0, 58, '') . $num; |
|
| 226 | + $names[] = xoops_substr($emailname, 0, 58, '').$num; |
|
| 227 | 227 | } |
| 228 | 228 | $i = count($names); |
| 229 | 229 | $onbasename = ~$onbasename; |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | { |
| 266 | 266 | static $randCalled = false; |
| 267 | 267 | if (!$randCalled) { |
| 268 | - mt_srand((double)microtime() * 1000000); |
|
| 268 | + mt_srand((double) microtime() * 1000000); |
|
| 269 | 269 | $randCalled = true; |
| 270 | 270 | } |
| 271 | 271 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 14 | -include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
| 14 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | 17 | * SmartObject base Multilanguage-enabled class |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function stripMultilanguageFields() |
| 53 | 53 | { |
| 54 | - $objectVars =& $this->getVars(); |
|
| 54 | + $objectVars = & $this->getVars(); |
|
| 55 | 55 | $newObjectVars = array(); |
| 56 | 56 | foreach ($objectVars as $key => $var) { |
| 57 | 57 | if (!$var['multilingual']) { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | public function stripNonMultilanguageFields() |
| 65 | 65 | { |
| 66 | - $objectVars =& $this->getVars(); |
|
| 66 | + $objectVars = & $this->getVars(); |
|
| 67 | 67 | $newObjectVars = array(); |
| 68 | 68 | foreach ($objectVars as $key => $var) { |
| 69 | 69 | if ($var['multilingual'] || $key == $this->handler->keyName) { |
@@ -118,21 +118,21 @@ discard block |
||
| 118 | 118 | public function getObjects($criteria = null, $id_as_key = false, $as_object = true, $debug = false, $language = false) |
| 119 | 119 | { |
| 120 | 120 | // Create the first part of the SQL query to join the "_text" table |
| 121 | - $sql = 'SELECT * FROM ' . |
|
| 122 | - $this->table . |
|
| 123 | - ' AS ' . |
|
| 124 | - $this->_itemname . |
|
| 125 | - ' INNER JOIN ' . |
|
| 126 | - $this->table . |
|
| 127 | - '_text AS ' . |
|
| 128 | - $this->_itemname . |
|
| 129 | - '_text ON ' . |
|
| 130 | - $this->_itemname . |
|
| 131 | - '.' . |
|
| 132 | - $this->keyName . |
|
| 133 | - '=' . |
|
| 134 | - $this->_itemname . |
|
| 135 | - '_text.' . |
|
| 121 | + $sql = 'SELECT * FROM '. |
|
| 122 | + $this->table. |
|
| 123 | + ' AS '. |
|
| 124 | + $this->_itemname. |
|
| 125 | + ' INNER JOIN '. |
|
| 126 | + $this->table. |
|
| 127 | + '_text AS '. |
|
| 128 | + $this->_itemname. |
|
| 129 | + '_text ON '. |
|
| 130 | + $this->_itemname. |
|
| 131 | + '.'. |
|
| 132 | + $this->keyName. |
|
| 133 | + '='. |
|
| 134 | + $this->_itemname. |
|
| 135 | + '_text.'. |
|
| 136 | 136 | $this->keyName; |
| 137 | 137 | |
| 138 | 138 | if ($language) { |
@@ -171,6 +171,6 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | public function changeTableNameForML() |
| 173 | 173 | { |
| 174 | - $this->table = $this->db->prefix($this->_moduleName . '_' . $this->_itemname . '_text'); |
|
| 174 | + $this->table = $this->db->prefix($this->_moduleName.'_'.$this->_itemname.'_text'); |
|
| 175 | 175 | } |
| 176 | 176 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
| 3 | 3 | |
| 4 | -include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/basedurl.php'; |
|
| 4 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/basedurl.php'; |
|
| 5 | 5 | |
| 6 | 6 | /** |
| 7 | 7 | * Class SmartobjectFile |
@@ -29,8 +29,8 @@ 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'; |
|
| 33 | -include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 32 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
| 33 | +include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Class SmartobjectCurrency |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function getDefaultCurrencyControl() |
| 140 | 140 | { |
| 141 | - $radio_box = '<input name="default_currency" value="' . $this->getVar('currencyid') . '" type="radio"'; |
|
| 141 | + $radio_box = '<input name="default_currency" value="'.$this->getVar('currencyid').'" type="radio"'; |
|
| 142 | 142 | if ($this->getVar('default_currency', 'e')) { |
| 143 | 143 | $radio_box .= 'checked="checked"'; |
| 144 | 144 | } |
@@ -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 | } |
@@ -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'); |