Completed
Push — master ( 01b1a5...81f493 )
by Michael
04:03
created
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/smartformimageuploadelement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @package    SmartObject
10 10
  * @subpackage SmartObjectForm
11 11
  */
12
-include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformuploadelement.php';
12
+include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformuploadelement.php';
13 13
 
14 14
 /**
15 15
  * Class SmartFormImageUploadElement
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $this->SmartFormFileElement($object, $key);
27 27
         // Override name for upload purposes
28
-        $this->setName('upload_' . $key);
28
+        $this->setName('upload_'.$key);
29 29
     }
30 30
 
31 31
     /**
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function render()
37 37
     {
38
-        return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' />
39
-        <input type='file' name='" . $this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . " />
40
-        <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName() . "' />";
38
+        return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' />
39
+        <input type='file' name='" . $this->getName()."' id='".$this->getName()."'".$this->getExtra()." />
40
+        <input type='hidden' name='smart_upload_image[]' id='smart_upload_image[]' value='" . $this->getName()."' />";
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
class/form/elements/smartformrichfileelement.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -22,33 +22,33 @@
 block discarded – undo
22 22
         parent::__construct($form_caption, '&nbsp;');
23 23
         if ($object->getVar('url') !== '') {
24 24
             $caption = $object->getVar('caption') !== '' ? $object->getVar('caption') : $object->getVar('url');
25
-            $this->addElement(new XoopsFormLabel('', _CO_SOBJECT_CURRENT_FILE .
26
-                                                     "<a href='" .
27
-                                                     str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar('url')) .
28
-                                                     "' target='_blank' >" .
29
-                                                     $caption .
25
+            $this->addElement(new XoopsFormLabel('', _CO_SOBJECT_CURRENT_FILE.
26
+                                                     "<a href='".
27
+                                                     str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar('url')).
28
+                                                     "' target='_blank' >".
29
+                                                     $caption.
30 30
                                                      '</a><br><br>'));
31 31
             //$this->addElement( new XoopsFormLabel( '', "<br><a href = '".SMARTOBJECT_URL."admin/file.php?op=del&fileid=".$object->id()."'>"._CO_SOBJECT_DELETE_FILE."</a>"));
32 32
         }
33 33
 
34
-        include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformfileuploadelement.php';
34
+        include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformfileuploadelement.php';
35 35
         if ($object->isNew()) {
36 36
             $this->addElement(new SmartFormFileUploadElement($object, $key));
37
-            $this->addElement(new XoopsFormLabel('', '<br><br><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>'));
38
-            $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_URL_FILE));
39
-            $this->addElement(new SmartFormTextElement($object, 'url_' . $key));
37
+            $this->addElement(new XoopsFormLabel('', '<br><br><small>'._CO_SOBJECT_URL_FILE_DSC.'</small>'));
38
+            $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_URL_FILE));
39
+            $this->addElement(new SmartFormTextElement($object, 'url_'.$key));
40 40
         }
41
-        $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_CAPTION));
42
-        $this->addElement(new SmartFormTextElement($object, 'caption_' . $key));
43
-        $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_DESC . '<br>'));
44
-        $this->addElement(new XoopsFormTextArea('', 'desc_' . $key, $object->getVar('description')));
41
+        $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_CAPTION));
42
+        $this->addElement(new SmartFormTextElement($object, 'caption_'.$key));
43
+        $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_DESC.'<br>'));
44
+        $this->addElement(new XoopsFormTextArea('', 'desc_'.$key, $object->getVar('description')));
45 45
 
46 46
         if (!$object->isNew()) {
47
-            $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_CHANGE_FILE));
47
+            $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_CHANGE_FILE));
48 48
             $this->addElement(new SmartFormFileUploadElement($object, $key));
49
-            $this->addElement(new XoopsFormLabel('', '<br><br><small>' . _CO_SOBJECT_URL_FILE_DSC . '</small>'));
50
-            $this->addElement(new XoopsFormLabel('', '<br>' . _CO_SOBJECT_URL_FILE));
51
-            $this->addElement(new SmartFormTextElement($object, 'url_' . $key));
49
+            $this->addElement(new XoopsFormLabel('', '<br><br><small>'._CO_SOBJECT_URL_FILE_DSC.'</small>'));
50
+            $this->addElement(new XoopsFormLabel('', '<br>'._CO_SOBJECT_URL_FILE));
51
+            $this->addElement(new SmartFormTextElement($object, 'url_'.$key));
52 52
         }
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
class/form/elements/smartformtimeelement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         for ($i = 0; $i < 24; ++$i) {
24 24
             for ($j = 0; $j < 60; $j += 10) {
25 25
                 $key_t             = ($i * 3600) + ($j * 60);
26
-                $timearray[$key_t] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j;
26
+                $timearray[$key_t] = ($j != 0) ? $i.':'.$j : $i.':0'.$j;
27 27
             }
28 28
         }
29 29
         ksort($timearray);
Please login to merge, or discard this patch.
class/form/elements/smartformparentcategoryelement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
         $criteria    = new CriteriaCompo();
23 23
         $criteria->setSort('weight, name');
24 24
         $categoryHandler = xoops_getModuleHandler('category', $object->handler->_moduleName);
25
-        $categories       = $categoryHandler->getObjects($criteria);
25
+        $categories = $categoryHandler->getObjects($criteria);
26 26
 
27
-        include_once(XOOPS_ROOT_PATH . '/class/tree.php');
27
+        include_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/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='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/smartformselect_multielement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * @package    SmartObject
10 10
  * @subpackage SmartObjectForm
11 11
  */
12
-include_once(SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformselectelement.php');
12
+include_once(SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformselectelement.php');
13 13
 
14 14
 /**
15 15
  * Class SmartFormSelect_multiElement
Please login to merge, or discard this patch.
class/form/elements/smartformfileuploadelement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * @package    SmartObject
10 10
  * @subpackage SmartObjectForm
11 11
  */
12
-include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformuploadelement.php';
12
+include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformuploadelement.php';
13 13
 
14 14
 /**
15 15
  * Class SmartFormFileUploadElement
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $this->SmartFormFileElement($object, $key);
27 27
         // Override name for upload purposes
28
-        $this->setName('upload_' . $key);
28
+        $this->setName('upload_'.$key);
29 29
     }
30 30
 
31 31
     /**
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function render()
37 37
     {
38
-        return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' />
39
-        <input type='file' name='upload_" . $this->getName() . "' id='upload_" . $this->getName() . "'" . $this->getExtra() . " />
40
-        <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "' />";
38
+        return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' />
39
+        <input type='file' name='upload_" . $this->getName()."' id='upload_".$this->getName()."'".$this->getExtra()." />
40
+        <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName()."' />";
41 41
     }
42 42
 }
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.