Completed
Push — master ( bf34f3...88111b )
by Michael
03:08
created
class/SmartobjectCategory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         global $myts;
98 98
         $objectArray = parent::toArray();
99 99
         if ($objectArray['image']) {
100
-            $objectArray['image'] = $this->getImageDir() . $objectArray['image'];
100
+            $objectArray['image'] = $this->getImageDir().$objectArray['image'];
101 101
         }
102 102
 
103 103
         return $objectArray;
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getCategoryPath($withAllLink = true, $currentCategory = false)
115 115
     {
116
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectcontroller.php';
116
+        require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectcontroller.php';
117 117
         $controller = new SmartObjectController($this->handler);
118 118
 
119 119
         if (!$this->_categoryPath) {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                     exit;
131 131
                 }
132 132
                 $parentid = $parentObj->getVar('parentid');
133
-                $ret      = $parentObj->getCategoryPath($withAllLink, $currentCategory) . ' > ' . $ret;
133
+                $ret      = $parentObj->getCategoryPath($withAllLink, $currentCategory).' > '.$ret;
134 134
             }
135 135
             $this->_categoryPath = $ret;
136 136
         }
Please login to merge, or discard this patch.
class/SmartobjectAdsenseHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
     public function getAdsensesByTag()
133 133
     {
134 134
         if (!$this->objects) {
135
-            $adsensesObj =& $this->getObjects(null, true);
135
+            $adsensesObj = & $this->getObjects(null, true);
136 136
             $ret         = [];
137 137
             foreach ($adsensesObj as $adsenseObj) {
138 138
                 $ret[$adsenseObj->getVar('tag')] = $adsenseObj;
Please login to merge, or discard this patch.
class/smartloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
17 17
 
18
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
18
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
19 19
 
20 20
 /**
21 21
  * Include other classes used by the SmartObject
Please login to merge, or discard this patch.
class/SmartobjectLink.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
             return $ret;
113 113
         } else {
114
-            $ret = '<a href="' . $ret . '" alt="' . $this->getVar('link', 'e') . '" title="' . $this->getVar('link', 'e') . '">' . _AM_SOBJECT_SENT_LINKS_GOTO . '</a>';
114
+            $ret = '<a href="'.$ret.'" alt="'.$this->getVar('link', 'e').'" title="'.$this->getVar('link', 'e').'">'._AM_SOBJECT_SENT_LINKS_GOTO.'</a>';
115 115
 
116 116
             return $ret;
117 117
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function getViewItemLink()
124 124
     {
125
-        $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>';
125
+        $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>';
126 126
 
127 127
         return $ret;
128 128
     }
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
         if ($this->getVar('from_uid')) {
138 138
             $user = smart_getLinkedUnameFromId($this->getVar('from_uid'));
139 139
             if ($user == $GLOBALS['xoopsConfig']['anonymous']) {
140
-                $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>';
140
+                $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>';
141 141
             }
142 142
         } else {
143
-            $user = '<a href="mailto:' . $this->getVar('from_email') . '">' . $this->getVar('from_email') . '</a>';
143
+            $user = '<a href="mailto:'.$this->getVar('from_email').'">'.$this->getVar('from_email').'</a>';
144 144
         }
145 145
 
146 146
         return $user;
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
         if ($this->getVar('to_uid')) {
170 170
             $user = smart_getLinkedUnameFromId($this->getVar('to_uid'));
171 171
             if ($user == $GLOBALS['xoopsConfig']['anonymous']) {
172
-                $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>';
172
+                $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>';
173 173
             }
174 174
         } else {
175
-            $user = '<a href="mailto:' . $this->getVar('to_email') . '">' . $this->getVar('to_email') . '</a>';
175
+            $user = '<a href="mailto:'.$this->getVar('to_email').'">'.$this->getVar('to_email').'</a>';
176 176
         }
177 177
 
178 178
         return $user;
Please login to merge, or discard this patch.
class/SmartDbTable.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
  */
39 39
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
40 40
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
41
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
41
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
42 42
 }
43 43
 /**
44 44
  * Include the language constants for the SmartObjectDBUpdater
45 45
  */
46 46
 global $xoopsConfig;
47
-$common_file = SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/smartdbupdater.php';
47
+$common_file = SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/smartdbupdater.php';
48 48
 if (!file_exists($common_file)) {
49
-    $common_file = SMARTOBJECT_ROOT_PATH . 'language/english/smartdbupdater.php';
49
+    $common_file = SMARTOBJECT_ROOT_PATH.'language/english/smartdbupdater.php';
50 50
 }
51 51
 include $common_file;
52 52
 
@@ -143,20 +143,20 @@  discard block
 block discarded – undo
143 143
     public function getExistingFieldsArray()
144 144
     {
145 145
         global $xoopsDB;
146
-        $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $this->name());
146
+        $result = $xoopsDB->query('SHOW COLUMNS FROM '.$this->name());
147 147
         while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
148 148
             $fields[$existing_field['Field']] = $existing_field['Type'];
149 149
             if ('YES' !== $existing_field['Null']) {
150 150
                 $fields[$existing_field['Field']] .= ' NOT NULL';
151 151
             }
152 152
             if ($existing_field['Extra']) {
153
-                $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra'];
153
+                $fields[$existing_field['Field']] .= ' '.$existing_field['Extra'];
154 154
             }
155 155
             if (!(null === $existing_field['Default'])
156 156
                 && ($existing_field['Default']
157 157
                     || '' === $existing_field['Default']
158 158
                     || 0 == $existing_field['Default'])) {
159
-                $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
159
+                $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
160 160
             }
161 161
         }
162 162
 
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
             $query = sprintf('INSERT INTO %s VALUES (%s)', $this->name(), $data);
243 243
             $ret   = $xoopsDB->query($query);
244 244
             if (!$ret) {
245
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()) . '<br>';
245
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_ADD_DATA_ERR, $this->name()).'<br>';
246 246
             } else {
247
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_ADD_DATA, $this->name()) . '<br>';
247
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_ADD_DATA, $this->name()).'<br>';
248 248
             }
249 249
         }
250 250
 
@@ -396,13 +396,13 @@  discard block
 block discarded – undo
396 396
     {
397 397
         global $xoopsDB;
398 398
         $query = $this->getStructure();
399
-        $query = 'CREATE TABLE `' . $this->name() . '` (' . $query . ") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'";
399
+        $query = 'CREATE TABLE `'.$this->name().'` ('.$query.") ENGINE=MyISAM COMMENT='The SmartFactory <www.smartfactory.ca>'";
400 400
         //xoops_debug($query);
401 401
         $ret = $xoopsDB->query($query);
402 402
         if (!$ret) {
403
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
403
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CREATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
404 404
         } else {
405
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CREATE_TABLE, $this->name()) . '<br>';
405
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CREATE_TABLE, $this->name()).'<br>';
406 406
         }
407 407
 
408 408
         return $ret;
@@ -420,11 +420,11 @@  discard block
 block discarded – undo
420 420
         $query = sprintf('DROP TABLE %s', $this->name());
421 421
         $ret   = $xoopsDB->query($query);
422 422
         if (!$ret) {
423
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
423
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
424 424
 
425 425
             return false;
426 426
         } else {
427
-            echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROP_TABLE, $this->name()) . '<br>';
427
+            echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROP_TABLE, $this->name()).'<br>';
428 428
 
429 429
             return true;
430 430
         }
@@ -450,9 +450,9 @@  discard block
 block discarded – undo
450 450
             $ret   = $ret && $xoopsDB->query($query);
451 451
             if ($alteredField['showerror']) {
452 452
                 if (!$ret) {
453
-                    echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
453
+                    echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CHGFIELD_ERR, $alteredField['name'], $this->name()).' ('.$xoopsDB->error().')<br>';
454 454
                 } else {
455
-                    echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()) . '<br>';
455
+                    echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_CHGFIELD, $alteredField['name'], $this->name()).'<br>';
456 456
                 }
457 457
             }
458 458
         }
@@ -475,9 +475,9 @@  discard block
 block discarded – undo
475 475
             //echo $query;
476 476
             $ret = $ret && $xoopsDB->query($query);
477 477
             if (!$ret) {
478
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()) . '<br>';
478
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_NEWFIELD_ERR, $newField['name'], $this->name()).'<br>';
479 479
             } else {
480
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()) . '<br>';
480
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_NEWFIELD, $newField['name'], $this->name()).'<br>';
481 481
             }
482 482
         }
483 483
 
@@ -498,9 +498,9 @@  discard block
 block discarded – undo
498 498
             $query = sprintf('UPDATE %s SET %s = %s', $this->name(), $updatedField['name'], $updatedField['value']);
499 499
             $ret   = $ret && $xoopsDB->query($query);
500 500
             if (!$ret) {
501
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
501
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
502 502
             } else {
503
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>';
503
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>';
504 504
             }
505 505
         }
506 506
 
@@ -521,9 +521,9 @@  discard block
 block discarded – undo
521 521
             //echo $query."<br>";
522 522
             $ret = $ret && $xoopsDB->query($query);
523 523
             if (!$ret) {
524
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
524
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE_ERR, $this->name()).' ('.$xoopsDB->error().')<br>';
525 525
             } else {
526
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()) . '<br>';
526
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_UPDATE_TABLE, $this->name()).'<br>';
527 527
             }
528 528
         }
529 529
 
@@ -544,9 +544,9 @@  discard block
 block discarded – undo
544 544
             $query = sprintf('ALTER TABLE %s DROP %s', $this->name(), $droppedField);
545 545
             $ret   = $ret && $xoopsDB->query($query);
546 546
             if (!$ret) {
547
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()) . ' (' . $xoopsDB->error() . ')<br>';
547
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROPFIELD_ERR, $droppedField, $this->name()).' ('.$xoopsDB->error().')<br>';
548 548
             } else {
549
-                echo '&nbsp;&nbsp;' . sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()) . '<br>';
549
+                echo '&nbsp;&nbsp;'.sprintf(_SDU_MSG_DROPFIELD, $droppedField, $this->name()).'<br>';
550 550
             }
551 551
         }
552 552
 
Please login to merge, or discard this patch.
class/SmartPrinterFriendly.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
          * @todo make the output XHTML compliant
45 45
          */
46 46
 
47
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
47
+        require_once XOOPS_ROOT_PATH.'/class/template.php';
48 48
 
49 49
         $this->_tpl = new \XoopsTpl();
50 50
 
Please login to merge, or discard this patch.
class/SmartobjectMemberHandler.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 use XoopsModules\Smartobject;
22 22
 
23 23
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
24
-require_once XOOPS_ROOT_PATH . '/kernel/user.php';
25
-require_once XOOPS_ROOT_PATH . '/kernel/group.php';
26
-require_once XOOPS_ROOT_PATH . '/kernel/member.php';
24
+require_once XOOPS_ROOT_PATH.'/kernel/user.php';
25
+require_once XOOPS_ROOT_PATH.'/kernel/group.php';
26
+require_once XOOPS_ROOT_PATH.'/kernel/member.php';
27 27
 
28 28
 /**
29 29
  * XOOPS member handler class.
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
144 144
             // send some notifications
145 145
             $xoopsMailer = xoops_getMailer();
146 146
             $xoopsMailer->useMail();
147
-            $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH . 'language/' . $xoopsConfig['language'] . '/mail_template');
147
+            $xoopsMailer->setTemplateDir(SMARTOBJECT_ROOT_PATH.'language/'.$xoopsConfig['language'].'/mail_template');
148 148
             $xoopsMailer->setTemplate('smartobject_notify_user_added_by_admin.tpl');
149 149
             $xoopsMailer->assign('XOOPS_USER_PASSWORD', $password);
150 150
             $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
151 151
             $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
152
-            $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
152
+            $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
153 153
             $xoopsMailer->assign('NAME', $userObj->getVar('name'));
154 154
             $xoopsMailer->assign('UNAME', $userObj->getVar('uname'));
155 155
             $xoopsMailer->setToUsers($userObj);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         if (strlen($name) > 0) {
196 196
             $name = explode(' ', trim($name));
197 197
             if (count($name) > 1) {
198
-                $basename = strtolower(substr($name[0], 0, 1) . $name[count($name) - 1]);
198
+                $basename = strtolower(substr($name[0], 0, 1).$name[count($name) - 1]);
199 199
             } else {
200 200
                 $basename = strtolower($name[0]);
201 201
             }
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
         while ($i < $count) {
213 213
             $num = $this->genRandNumber();
214 214
             if ($onbasename < 0 && $hasbasename) {
215
-                $names[] = xoops_substr($basename, 0, 58, '') . $num;
215
+                $names[] = xoops_substr($basename, 0, 58, '').$num;
216 216
             } else {
217
-                $names[] = xoops_substr($emailname, 0, 58, '') . $num;
217
+                $names[] = xoops_substr($emailname, 0, 58, '').$num;
218 218
             }
219 219
             $i          = count($names);
220 220
             $onbasename = ~$onbasename;
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     {
257 257
         static $randCalled = false;
258 258
         if (!$randCalled) {
259
-            mt_srand((double)microtime() * 1000000);
259
+            mt_srand((double) microtime() * 1000000);
260 260
             $randCalled = true;
261 261
         }
262 262
     }
Please login to merge, or discard this patch.
class/SmartobjectCustomtagHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
             $granted_ids                   = $smartobjectPermissionsHandler->getGrantedItems('view');
64 64
 
65 65
             if ($granted_ids && count($granted_ids) > 0) {
66
-                $criteria->add(new \Criteria('customtagid', '(' . implode(', ', $granted_ids) . ')', 'IN'));
67
-                $customtagsObj =& $this->getObjects($criteria, true);
66
+                $criteria->add(new \Criteria('customtagid', '('.implode(', ', $granted_ids).')', 'IN'));
67
+                $customtagsObj = & $this->getObjects($criteria, true);
68 68
                 foreach ($customtagsObj as $customtagObj) {
69 69
                     $ret[$customtagObj->getVar('name')] = $customtagObj;
70 70
                 }
Please login to merge, or discard this patch.
class/SmartobjectCurrency.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
24 24
 
25 25
 //require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php';
26
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
26
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
27 27
 
28 28
 /**
29 29
  * Class SmartobjectCurrency
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function getDefaultCurrencyControl()
133 133
     {
134
-        $radio_box = '<input name="default_currency" value="' . $this->getVar('currencyid') . '" type="radio"';
134
+        $radio_box = '<input name="default_currency" value="'.$this->getVar('currencyid').'" type="radio"';
135 135
         if ($this->getVar('default_currency', 'e')) {
136 136
             $radio_box .= 'checked';
137 137
         }
Please login to merge, or discard this patch.