@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | |
13 | 13 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
14 | 14 | |
15 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'; |
|
15 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php'; |
|
16 | 16 | |
17 | -require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectcontroller.php'; |
|
17 | +require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectcontroller.php'; |
|
18 | 18 | |
19 | 19 | if (!defined('XOBJ_DTYPE_SIMPLE_ARRAY')) { |
20 | 20 | define('XOBJ_DTYPE_SIMPLE_ARRAY', 101); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function closeSection($section_name) |
115 | 115 | { |
116 | - $this->initVar('close_section_' . $section_name, XOBJ_DTYPE_FORM_SECTION_CLOSE, '', false, null, '', false, '', '', false, false, true); |
|
116 | + $this->initVar('close_section_'.$section_name, XOBJ_DTYPE_FORM_SECTION_CLOSE, '', false, null, '', false, '', '', false, false, true); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | } |
152 | 152 | parent::initVar($key, $data_type, $value, $required, $maxlength, $options); |
153 | 153 | if ($this->handler && (!$form_caption || $form_caption === '')) { |
154 | - $dyn_form_caption = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key); |
|
154 | + $dyn_form_caption = strtoupper('_CO_'.$this->handler->_moduleName.'_'.$this->handler->_itemname.'_'.$key); |
|
155 | 155 | if (defined($dyn_form_caption)) { |
156 | 156 | $form_caption = constant($dyn_form_caption); |
157 | 157 | } |
158 | 158 | } |
159 | 159 | if ($this->handler && (!$form_dsc || $form_dsc === '')) { |
160 | - $dyn_form_dsc = strtoupper('_CO_' . $this->handler->_moduleName . '_' . $this->handler->_itemname . '_' . $key . '_DSC'); |
|
160 | + $dyn_form_dsc = strtoupper('_CO_'.$this->handler->_moduleName.'_'.$this->handler->_itemname.'_'.$key.'_DSC'); |
|
161 | 161 | if (defined($dyn_form_dsc)) { |
162 | 162 | $form_dsc = constant($dyn_form_dsc); |
163 | 163 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $cancel_js_action = false, |
442 | 442 | $captcha = false |
443 | 443 | ) { |
444 | - require_once SMARTOBJECT_ROOT_PATH . 'class/form/smartobjectform.php'; |
|
444 | + require_once SMARTOBJECT_ROOT_PATH.'class/form/smartobjectform.php'; |
|
445 | 445 | $form = new SmartobjectForm($this, $form_name, $form_caption, $form_action, null, $submit_button_caption, $cancel_js_action, $captcha); |
446 | 446 | |
447 | 447 | return $form; |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | public function toArray() |
454 | 454 | { |
455 | 455 | $ret = array(); |
456 | - $vars =& $this->getVars(); |
|
456 | + $vars = & $this->getVars(); |
|
457 | 457 | foreach ($vars as $key => $var) { |
458 | 458 | $value = $this->getVar($key); |
459 | 459 | $ret[$key] = $value; |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | } |
472 | 472 | |
473 | 473 | // Hightlighting searched words |
474 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smarthighlighter.php'; |
|
474 | + require_once SMARTOBJECT_ROOT_PATH.'class/smarthighlighter.php'; |
|
475 | 475 | $highlight = smart_getConfig('module_search_highlighter', false, true); |
476 | 476 | |
477 | 477 | if ($highlight && isset($_GET['keywords'])) { |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | } |
503 | 503 | } else { |
504 | 504 | if ($prefix) { |
505 | - $err_str = '[' . $prefix . '] ' . $err_str; |
|
505 | + $err_str = '['.$prefix.'] '.$err_str; |
|
506 | 506 | } |
507 | 507 | parent::setErrors($err_str); |
508 | 508 | } |
@@ -830,8 +830,8 @@ discard block |
||
830 | 830 | $this->setErrors(sprintf(_XOBJ_ERR_REQUIRED, $k)); |
831 | 831 | continue 2; |
832 | 832 | } |
833 | - if (isset($v['maxlength']) && strlen($cleanv) > (int)$v['maxlength']) { |
|
834 | - $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int)$v['maxlength'])); |
|
833 | + if (isset($v['maxlength']) && strlen($cleanv) > (int) $v['maxlength']) { |
|
834 | + $this->setErrors(sprintf(_XOBJ_ERR_SHORTERTHAN, $k, (int) $v['maxlength'])); |
|
835 | 835 | continue 2; |
836 | 836 | } |
837 | 837 | if (!$v['not_gpc']) { |
@@ -860,7 +860,7 @@ discard block |
||
860 | 860 | break; |
861 | 861 | case XOBJ_DTYPE_INT: |
862 | 862 | case XOBJ_DTYPE_TIME_ONLY: |
863 | - $cleanv = (int)$cleanv; |
|
863 | + $cleanv = (int) $cleanv; |
|
864 | 864 | break; |
865 | 865 | |
866 | 866 | case XOBJ_DTYPE_CURRENCY: |
@@ -891,10 +891,10 @@ discard block |
||
891 | 891 | continue 2; |
892 | 892 | } |
893 | 893 | if ($cleanv !== '' && !preg_match("/^http[s]*:\/\//i", $cleanv)) { |
894 | - $cleanv = 'http://' . $cleanv; |
|
894 | + $cleanv = 'http://'.$cleanv; |
|
895 | 895 | } |
896 | 896 | if (!$v['not_gpc']) { |
897 | - $cleanv =& $ts->stripSlashesGPC($cleanv); |
|
897 | + $cleanv = & $ts->stripSlashesGPC($cleanv); |
|
898 | 898 | } |
899 | 899 | break; |
900 | 900 | case XOBJ_DTYPE_SIMPLE_ARRAY: |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | case XOBJ_DTYPE_STIME: |
907 | 907 | case XOBJ_DTYPE_MTIME: |
908 | 908 | case XOBJ_DTYPE_LTIME: |
909 | - $cleanv = !is_string($cleanv) ? (int)$cleanv : strtotime($cleanv); |
|
909 | + $cleanv = !is_string($cleanv) ? (int) $cleanv : strtotime($cleanv); |
|
910 | 910 | if (!($cleanv > 0)) { |
911 | 911 | $cleanv = strtotime($cleanv); |
912 | 912 | } |
@@ -915,7 +915,7 @@ discard block |
||
915 | 915 | break; |
916 | 916 | } |
917 | 917 | } |
918 | - $this->cleanVars[$k] =& $cleanv; |
|
918 | + $this->cleanVars[$k] = & $cleanv; |
|
919 | 919 | unset($cleanv); |
920 | 920 | } |
921 | 921 | if (count($this->_errors) > 0) { |
@@ -1140,10 +1140,10 @@ discard block |
||
1140 | 1140 | } |
1141 | 1141 | break; |
1142 | 1142 | case XOBJ_DTYPE_SIMPLE_ARRAY: |
1143 | - $ret =& explode('|', $ret); |
|
1143 | + $ret = & explode('|', $ret); |
|
1144 | 1144 | break; |
1145 | 1145 | case XOBJ_DTYPE_ARRAY: |
1146 | - $ret =& unserialize($ret); |
|
1146 | + $ret = & unserialize($ret); |
|
1147 | 1147 | break; |
1148 | 1148 | case XOBJ_DTYPE_SOURCE: |
1149 | 1149 | switch (strtolower($format)) { |
@@ -1301,7 +1301,7 @@ discard block |
||
1301 | 1301 | $actions = array(), |
1302 | 1302 | $headerAsRow = true |
1303 | 1303 | ) { |
1304 | - require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectsingleview.php'; |
|
1304 | + require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectsingleview.php'; |
|
1305 | 1305 | $singleview = new SmartObjectSingleView($this, $userSide, $actions, $headerAsRow); |
1306 | 1306 | // add all fields mark as displayOnSingleView except the keyid |
1307 | 1307 | foreach ($this->vars as $key => $var) { |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
14 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
14 | +require_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) { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $language = false |
124 | 124 | ) { |
125 | 125 | // Create the first part of the SQL query to join the "_text" table |
126 | - $sql = 'SELECT * FROM ' . $this->table . ' AS ' . $this->_itemname . ' INNER JOIN ' . $this->table . '_text AS ' . $this->_itemname . '_text ON ' . $this->_itemname . '.' . $this->keyName . '=' . $this->_itemname . '_text.' . $this->keyName; |
|
126 | + $sql = 'SELECT * FROM '.$this->table.' AS '.$this->_itemname.' INNER JOIN '.$this->table.'_text AS '.$this->_itemname.'_text ON '.$this->_itemname.'.'.$this->keyName.'='.$this->_itemname.'_text.'.$this->keyName; |
|
127 | 127 | |
128 | 128 | if ($language) { |
129 | 129 | // If a language was specified, then let's create a WHERE clause to only return the objects associated with this language |
@@ -161,6 +161,6 @@ discard block |
||
161 | 161 | |
162 | 162 | public function changeTableNameForML() |
163 | 163 | { |
164 | - $this->table = $this->db->prefix($this->_moduleName . '_' . $this->_itemname . '_text'); |
|
164 | + $this->table = $this->db->prefix($this->_moduleName.'_'.$this->_itemname.'_text'); |
|
165 | 165 | } |
166 | 166 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
3 | 3 | |
4 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/basedurl.php'; |
|
4 | +require_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 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
33 | -require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
32 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
33 | +require_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'; |
144 | 144 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
31 | 31 | |
32 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
32 | +require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Class SmartobjectBasedUrl |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
31 | 31 | |
32 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/projax/projax.php'; |
|
32 | +require_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 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
31 | 31 | |
32 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
32 | +require_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,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function getCloneLink() |
134 | 134 | { |
135 | - $ret = '<a href="' . SMARTOBJECT_URL . 'admin/customtag.php?op=clone&customtagid=' . $this->id() . '"><img src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'editcopy.png" style="vertical-align: middle;" alt="' . _CO_SOBJECT_CUSTOMTAG_CLONE . '" title="' . _CO_SOBJECT_CUSTOMTAG_CLONE . '"></a>'; |
|
135 | + $ret = '<a href="'.SMARTOBJECT_URL.'admin/customtag.php?op=clone&customtagid='.$this->id().'"><img src="'.SMARTOBJECT_IMAGES_ACTIONS_URL.'editcopy.png" style="vertical-align: middle;" alt="'._CO_SOBJECT_CUSTOMTAG_CLONE.'" title="'._CO_SOBJECT_CUSTOMTAG_CLONE.'"></a>'; |
|
136 | 136 | |
137 | 137 | return $ret; |
138 | 138 | } |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | $granted_ids = $smartobjectPermissionsHandler->getGrantedItems('view'); |
298 | 298 | |
299 | 299 | if ($granted_ids && count($granted_ids) > 0) { |
300 | - $criteria->add(new Criteria('customtagid', '(' . implode(', ', $granted_ids) . ')', 'IN')); |
|
300 | + $criteria->add(new Criteria('customtagid', '('.implode(', ', $granted_ids).')', 'IN')); |
|
301 | 301 | $customtagsObj = $this->getObjects($criteria, true); |
302 | 302 | foreach ($customtagsObj as $customtagObj) { |
303 | 303 | $ret[$customtagObj->getVar('name')] = $customtagObj; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | // -------------------------------------------------------------------------// |
29 | 29 | |
30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
31 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
31 | +require_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,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | public function getViewItemLink() |
130 | 130 | { |
131 | - $ret = '<a href="' . SMARTOBJECT_URL . 'admin/link.php?op=view&linkid=' . $this->getVar('linkid') . '"><img src="' . SMARTOBJECT_IMAGES_ACTIONS_URL . 'mail_find.png" alt="' . _AM_SOBJECT_SENT_LINK_VIEW . '" title="' . _AM_SOBJECT_SENT_LINK_VIEW . '"></a>'; |
|
131 | + $ret = '<a href="'.SMARTOBJECT_URL.'admin/link.php?op=view&linkid='.$this->getVar('linkid').'"><img src="'.SMARTOBJECT_IMAGES_ACTIONS_URL.'mail_find.png" alt="'._AM_SOBJECT_SENT_LINK_VIEW.'" title="'._AM_SOBJECT_SENT_LINK_VIEW.'"></a>'; |
|
132 | 132 | |
133 | 133 | return $ret; |
134 | 134 | } |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | if ($this->getVar('from_uid')) { |
144 | 144 | $user = smart_getLinkedUnameFromId($this->getVar('from_uid')); |
145 | 145 | if ($user == $GLOBALS['xoopsConfig']['anonymous']) { |
146 | - $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>'; |
|
146 | + $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>'; |
|
147 | 147 | } |
148 | 148 | } else { |
149 | - $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>'; |
|
149 | + $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>'; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | return $user; |
@@ -175,10 +175,10 @@ discard block |
||
175 | 175 | if ($this->getVar('to_uid')) { |
176 | 176 | $user = smart_getLinkedUnameFromId($this->getVar('to_uid')); |
177 | 177 | if ($user == $GLOBALS['xoopsConfig']['anonymous']) { |
178 | - $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>'; |
|
178 | + $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>'; |
|
179 | 179 | } |
180 | 180 | } else { |
181 | - $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>'; |
|
181 | + $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>'; |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | return $user; |
@@ -103,7 +103,7 @@ |
||
103 | 103 | */ |
104 | 104 | public function render($fetchOnly = false, $debug = false) |
105 | 105 | { |
106 | - require_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
106 | + require_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
107 | 107 | |
108 | 108 | $this->_tpl = new XoopsTpl(); |
109 | 109 | $vars = $this->_object->vars; |