Completed
Push — master ( bf34f3...88111b )
by Michael
03:08
created
class/SmartPersistableMlObjectHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $language = false
38 38
     ) {
39 39
         // Create the first part of the SQL query to join the "_text" table
40
-        $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;
40
+        $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;
41 41
 
42 42
         if ($language) {
43 43
             // If a language was specified, then let's create a WHERE clause to only return the objects associated with this language
@@ -75,6 +75,6 @@  discard block
 block discarded – undo
75 75
 
76 76
     public function changeTableNameForML()
77 77
     {
78
-        $this->table = $this->db->prefix($this->_moduleName . '_' . $this->_itemname . '_text');
78
+        $this->table = $this->db->prefix($this->_moduleName.'_'.$this->_itemname.'_text');
79 79
     }
80 80
 }
Please login to merge, or discard this patch.
class/SmartObjectTreeTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 use XoopsModules\Smartobject;
14 14
 
15
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
15
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
16 16
 
17 17
 /**
18 18
  * SmartObjectTreeTable class
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 $space .= ' ';
103 103
             }
104 104
 
105
-            $aColumn['value'] = $space . $value;
105
+            $aColumn['value'] = $space.$value;
106 106
             $aColumn['class'] = $class;
107 107
             $aColumn['width'] = $column->getWidth();
108 108
             $aColumn['align'] = $column->getAlign();
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             }
127 127
         }
128 128
 
129
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectcontroller.php';
129
+        require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectcontroller.php';
130 130
         $controller = new SmartObjectController($this->_objectHandler);
131 131
 
132 132
         if (in_array('edit', $this->_actions)) {
Please login to merge, or discard this patch.
class/SmartPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         $ret = false;
71 71
         foreach ($this->_infoArray['items'] as $k => $v) {
72 72
             $search_str = str_replace('%u', '', $v['url']);
73
-            if (strpos($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'], $search_str) > 0) {
73
+            if (strpos($_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'], $search_str) > 0) {
74 74
                 $ret = $k;
75 75
                 break;
76 76
             }
Please login to merge, or discard this patch.
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.