Completed
Push — master ( c5aa4f...a09810 )
by Michael
02:13
created
class/form/elements/smartformuserelement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         global $xoopsDB;
33 33
         $ret   = array();
34 34
         $limit = $start = 0;
35
-        $sql   = 'SELECT uid, uname FROM ' . $xoopsDB->prefix('users');
35
+        $sql   = 'SELECT uid, uname FROM '.$xoopsDB->prefix('users');
36 36
         $sql   .= ' ORDER BY uname ASC';
37 37
 
38 38
         $result = $xoopsDB->query($sql);
Please login to merge, or discard this patch.
class/form/elements/smartformuploadelement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
      */
29 29
     public function render()
30 30
     {
31
-        return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "'>
32
-                <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . ">
33
-                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "'>";
31
+        return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."'>
32
+                <input type='file' name='" . $this->getName()."' id='".$this->getName()."'".$this->getExtra().">
33
+                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName()."'>";
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
class/form/elements/smartformfileelement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
     {
31 31
         $ret = '';
32 32
         if ($this->object->getVar($this->key) !== '') {
33
-            $ret .= '<div>' . _CO_SOBJECT_CURRENT_FILE . $this->object->getVar($this->key) . '</div>';
33
+            $ret .= '<div>'._CO_SOBJECT_CURRENT_FILE.$this->object->getVar($this->key).'</div>';
34 34
         }
35 35
 
36
-        $ret .= "<div><input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "'>
37
-                <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . ">
38
-                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "'></div>";
36
+        $ret .= "<div><input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."'>
37
+                <input type='file' name='" . $this->getName()."' id='".$this->getName()."'".$this->getExtra().">
38
+                <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName()."'></div>";
39 39
 
40 40
         return $ret;
41 41
     }
Please login to merge, or discard this patch.
class/form/elements/smartformimageelement.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,23 +27,23 @@
 block discarded – undo
27 27
         if ($object->getVar($key) !== ''
28 28
             && (0 === strpos($object->getVar($key), 'http')
29 29
                 || 0 === strpos($object->getVar($key), '{XOOPS_URL}'))) {
30
-            $this->addElement(new XoopsFormLabel('', "<img src='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar($key)) . "' alt=''><br><br>"));
30
+            $this->addElement(new XoopsFormLabel('', "<img src='".str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar($key))."' alt=''><br><br>"));
31 31
         } elseif ($object->getVar($key) !== '') {
32
-            $this->addElement(new XoopsFormLabel('', "<img src='" . $object_imageurl . $object->getVar($key) . "' alt=''><br><br>"));
32
+            $this->addElement(new XoopsFormLabel('', "<img src='".$object_imageurl.$object->getVar($key)."' alt=''><br><br>"));
33 33
         }
34 34
 
35
-        require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformfileuploadelement.php';
35
+        require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformfileuploadelement.php';
36 36
         $this->addElement(new SmartFormFileUploadElement($object, $key));
37 37
 
38
-        $this->addElement(new XoopsFormLabel('<div style="height: 10px; padding-top: 8px; font-size: 80%;">' . _CO_SOBJECT_URL_FILE_DSC . '</div>', ''));
39
-        require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformtextelement.php';
40
-        require_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformcheckelement.php';
38
+        $this->addElement(new XoopsFormLabel('<div style="height: 10px; padding-top: 8px; font-size: 80%;">'._CO_SOBJECT_URL_FILE_DSC.'</div>', ''));
39
+        require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformtextelement.php';
40
+        require_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformcheckelement.php';
41 41
 
42
-        $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_URL_FILE));
43
-        $this->addElement(new SmartFormTextElement($object, 'url_' . $key));
42
+        $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_URL_FILE));
43
+        $this->addElement(new SmartFormTextElement($object, 'url_'.$key));
44 44
         $this->addElement(new XoopsFormLabel('', '<br><br>'));
45
-        $delete_check = new SmartFormCheckElement('', 'delete_' . $key);
46
-        $delete_check->addOption(1, '<span style="color:red;">' . _CO_SOBJECT_DELETE . '</span>');
45
+        $delete_check = new SmartFormCheckElement('', 'delete_'.$key);
46
+        $delete_check->addOption(1, '<span style="color:red;">'._CO_SOBJECT_DELETE.'</span>');
47 47
         $this->addElement($delete_check);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
class/form/elements/smartformcheckelement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $ret = '';
20 20
         if (count($this->getOptions()) > 1 && substr($this->getName(), -2, 2) !== '[]') {
21
-            $newname = $this->getName() . '[]';
21
+            $newname = $this->getName().'[]';
22 22
             $this->setName($newname);
23 23
         }
24 24
         foreach ($this->getOptions() as $value => $name) {
25
-            $ret .= "<input type='checkbox' name='" . $this->getName() . "' value='" . $value . "'";
25
+            $ret .= "<input type='checkbox' name='".$this->getName()."' value='".$value."'";
26 26
             if (count($this->getValue()) > 0 && in_array($value, $this->getValue())) {
27 27
                 $ret .= ' checked';
28 28
             }
29
-            $ret .= $this->getExtra() . '>' . $name . '<br>';
29
+            $ret .= $this->getExtra().'>'.$name.'<br>';
30 30
         }
31 31
 
32 32
         return $ret;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             if (hasSelections === false) {
51 51
                 window.alert(\"{$eltmsg}\"); myform['{$eltname}[]'][0].focus(); return false; }\n";
52 52
         } else {
53
-            $js .= "for (var i = 0; i < myform['" . $eltname . "'].length; i++) {
53
+            $js .= "for (var i = 0; i < myform['".$eltname."'].length; i++) {
54 54
                 if (myform['{$eltname}'][i].checked) {
55 55
                     hasSelections = true;
56 56
                 }
Please login to merge, or discard this patch.
class/form/elements/smartformparentcategoryelement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $categoryHandler = xoops_getModuleHandler('category', $object->handler->_moduleName);
25 25
         $categories      = $categoryHandler->getObjects($criteria);
26 26
 
27
-        require_once XOOPS_ROOT_PATH . '/class/tree.php';
27
+        require_once XOOPS_ROOT_PATH.'/class/tree.php';
28 28
         $mytree = new XoopsObjectTree($categories, 'categoryid', 'parentid');
29 29
         parent::__construct($object->vars[$key]['form_caption'], $key, $object->getVar($key, 'e'));
30 30
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         if ($key > 0) {
57 57
             $value       = $tree->tree[$key]['obj']->getVar($tree->_myId);
58
-            $ret[$key]   = $prefix_curr . $tree->tree[$key]['obj']->getVar($fieldName);
58
+            $ret[$key]   = $prefix_curr.$tree->tree[$key]['obj']->getVar($fieldName);
59 59
             $prefix_curr .= '-';
60 60
         }
61 61
         if (isset($tree->tree[$key]['child']) && !empty($tree->tree[$key]['child'])) {
Please login to merge, or discard this patch.
class/form/elements/smartformhidden.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
         if (is_array($this->getValue())) {
33 33
             $ret = '';
34 34
             foreach ($this->getValue() as $value) {
35
-                $ret .= "<input type='hidden' name='" . $this->getName() . "[]' id='" . $this->getName() . "' value='" . $value . "'>\n";
35
+                $ret .= "<input type='hidden' name='".$this->getName()."[]' id='".$this->getName()."' value='".$value."'>\n";
36 36
             }
37 37
         } else {
38
-            $ret = "<input type='hidden' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "'>";
38
+            $ret = "<input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."'>";
39 39
         }
40 40
 
41 41
         return $ret;
Please login to merge, or discard this patch.
class/smartuploader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,9 +69,9 @@
 block discarded – undo
69 69
  * @link    http://smartfactory.ca The SmartFactory
70 70
  * @package SmartObject
71 71
  */
72
-mt_srand((double)microtime() * 1000000);
72
+mt_srand((double) microtime() * 1000000);
73 73
 
74
-require_once XOOPS_ROOT_PATH . '/class/uploader.php';
74
+require_once XOOPS_ROOT_PATH.'/class/uploader.php';
75 75
 
76 76
 /**
77 77
  * Class SmartUploader
Please login to merge, or discard this patch.
class/smartexport.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             }
237 237
         } while (false);
238 238
         if ($needQuote) {
239
-            $val = '"' . $val . '"';
239
+            $val = '"'.$val.'"';
240 240
         }
241 241
 
242 242
         return $val;
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
             case 'csv':
251 251
                 $separator      = isset($this->options['separator']) ? $this->options['separator'] : ';';
252 252
                 $firstRow       = implode($separator, $this->data['columnsHeaders']);
253
-                $exportFileData .= $firstRow . "\r\n";
253
+                $exportFileData .= $firstRow."\r\n";
254 254
 
255 255
                 foreach ($this->data['rows'] as $cols) {
256
-                    $exportFileData .= $this->arrayToCsvString($cols, $separator) . "\r\n";
256
+                    $exportFileData .= $this->arrayToCsvString($cols, $separator)."\r\n";
257 257
                 }
258 258
                 break;
259 259
         }
@@ -278,19 +278,19 @@  discard block
 block discarded – undo
278 278
     public function saveCsv($content)
279 279
     {
280 280
         if (!$this->filepath) {
281
-            $this->filepath = XOOPS_UPLOAD_PATH . '/';
281
+            $this->filepath = XOOPS_UPLOAD_PATH.'/';
282 282
         }
283 283
         if (!$this->filename) {
284 284
             $this->filename .= time();
285 285
             $this->filename .= '.csv';
286 286
         }
287 287
 
288
-        $fullFileName = $this->filepath . $this->filename;
288
+        $fullFileName = $this->filepath.$this->filename;
289 289
 
290 290
         if (!$handle = fopen($fullFileName, 'a+')) {
291
-            trigger_error('Unable to open ' . $fullFileName, E_USER_WARNING);
291
+            trigger_error('Unable to open '.$fullFileName, E_USER_WARNING);
292 292
         } elseif (fwrite($handle, $content) === false) {
293
-            trigger_error('Unable to write in ' . $fullFileName, E_USER_WARNING);
293
+            trigger_error('Unable to write in '.$fullFileName, E_USER_WARNING);
294 294
         } else {
295 295
             $mimeType  = 'text/csv';
296 296
             $file      = strrev($this->filename);
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             } else {
301 301
                 $file_name = $temp_name;
302 302
             }
303
-            $fullFileName = $this->filepath . stripslashes(trim($this->filename));
303
+            $fullFileName = $this->filepath.stripslashes(trim($this->filename));
304 304
 
305 305
             if (ini_get('zlib.output_compression')) {
306 306
                 ini_set('zlib.output_compression', 'Off');
@@ -311,10 +311,10 @@  discard block
 block discarded – undo
311 311
             header('Cache-Control: private', false);
312 312
             header('Content-Transfer-Encoding: binary');
313 313
             if (isset($mimeType)) {
314
-                header('Content-Type: ' . $mimeType);
314
+                header('Content-Type: '.$mimeType);
315 315
             }
316 316
 
317
-            header('Content-Disposition: attachment; filename=' . $file_name);
317
+            header('Content-Disposition: attachment; filename='.$file_name);
318 318
 
319 319
             if (isset($mimeType) && false !== strpos($mimeType, 'text/')) {
320 320
                 $fp = fopen($fullFileName, 'r');
Please login to merge, or discard this patch.