Completed
Branch master (2d4977)
by Michael
03:20
created
class/smartaddto.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  */
8 8
 
9 9
 if (!defined("XOOPS_ROOT_PATH")) {
10
-    die("XOOPS root path not defined");
10
+	die("XOOPS root path not defined");
11 11
 }
12 12
 
13 13
 class SmartAddTo {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 * @param int $layout 0=Horizontal 1 row, 1=Horizontal 2 rows, 2=Vertical with icons, 3=Vertical no icons
22 22
 	 * @param int $method 0=directpage, 1=popup
23 23
 	 */
24
-	function SmartAddTo($layout=0, $method=1) {
24
+	function SmartAddTo($layout = 0, $method = 1) {
25 25
 		$layout = intval($layout);
26 26
 		if ($layout < 0 || $layout > 3) {
27 27
 			$layout = 0;
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		$this->_method = $method;
36 36
 	}
37 37
 
38
-	function render($fetchOnly=false)
38
+	function render($fetchOnly = false)
39 39
 	{
40 40
 		global $xoTheme, $xoopsTpl;
41 41
 
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 		$xoopsTpl->assign('smartobject_addto_url', SMARTOBJECT_URL . 'include/addto/');
48 48
 
49 49
 		if ($fetchOnly) {
50
-			return $xoopsTpl->fetch('db:smartobject_addto.html' );
50
+			return $xoopsTpl->fetch('db:smartobject_addto.html');
51 51
 		} else {
52
-			$xoopsTpl->display( 'db:smartobject_addto.html' );
52
+			$xoopsTpl->display('db:smartobject_addto.html');
53 53
 		}
54 54
 	}
55 55
 
Please login to merge, or discard this patch.
class/form/elements/smartformtimeelement.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @subpackage SmartObjectForm
12 12
  */
13 13
 class SmartFormTimeElement extends XoopsFormSelect {
14
-    function SmartFormTimeElement($object, $key) {
14
+	function SmartFormTimeElement($object, $key) {
15 15
 		$var = $object->vars[$key];
16 16
 		$timearray = array();
17 17
 		for ($i = 0; $i < 24; $i++) {
@@ -23,6 +23,6 @@  discard block
 block discarded – undo
23 23
 		ksort($timearray);
24 24
 		$this->XoopsFormSelect($var['form_caption'], $key, $object->getVar($key, 'e'));
25 25
 		$this->addOptionArray($timearray);
26
-    }
26
+	}
27 27
 }
28 28
 ?>
29 29
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 		for ($i = 0; $i < 24; $i++) {
18 18
 			for ($j = 0; $j < 60; $j = $j + 10) {
19 19
 				$key_t = ($i * 3600) + ($j * 60);
20
-				$timearray[$key_t] = ($j != 0) ? $i.':'.$j : $i.':0'.$j;
20
+				$timearray[$key_t] = ($j != 0) ? $i . ':' . $j : $i . ':0' . $j;
21 21
 			}
22 22
 		}
23 23
 		ksort($timearray);
Please login to merge, or discard this patch.
class/form/elements/smartformselectelement.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
  * @subpackage SmartObjectForm
12 12
  */
13 13
 class SmartFormSelectElement extends XoopsFormSelect {
14
-    var $multiple = false;
15
-    function SmartFormSelectElement($object, $key) {
16
-        $var = $object->vars[$key];
17
-        $size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1);
14
+	var $multiple = false;
15
+	function SmartFormSelectElement($object, $key) {
16
+		$var = $object->vars[$key];
17
+		$size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1);
18 18
 
19 19
 		// Adding the options inside this SelectBox
20 20
 		// If the custom method is not from a module, than it's from the core
@@ -58,6 +58,6 @@  discard block
 block discarded – undo
58 58
 				}
59 59
 			}
60 60
 		}
61
-    }
61
+	}
62 62
 }
63 63
 ?>
64 64
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
 				if (isset($control['itemHandler'])) {
41 41
 					if (!$control['module']) {
42 42
 						// Creating the specified core object handler
43
-						$control_handler =& xoops_gethandler($control['itemHandler']);
43
+						$control_handler = & xoops_gethandler($control['itemHandler']);
44 44
 					} else {
45
-						$control_handler =& xoops_getmodulehandler($control['itemHandler'], $control['module']);
45
+						$control_handler = & xoops_getmodulehandler($control['itemHandler'], $control['module']);
46 46
 					}
47 47
 				} else {
48
-					$control_handler =& $object->handler;
48
+					$control_handler = & $object->handler;
49 49
 				}
50 50
 
51 51
 				// Checking if the specified method exists
Please login to merge, or discard this patch.
class/form/elements/smartformuser_sigelement.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Contains the set password tray class
4
- *
5
- * @license GNU
6
- * @author marcan <[email protected]>
7
- * @version $Id: smartformuser_sigelement.php 159 2007-12-17 16:44:05Z malanciault $
8
- * @link http://smartfactory.ca The SmartFactory
9
- * @package SmartObject
10
- * @subpackage SmartObjectForm
11
- */
3
+	 * Contains the set password tray class
4
+	 *
5
+	 * @license GNU
6
+	 * @author marcan <[email protected]>
7
+	 * @version $Id: smartformuser_sigelement.php 159 2007-12-17 16:44:05Z malanciault $
8
+	 * @link http://smartfactory.ca The SmartFactory
9
+	 * @package SmartObject
10
+	 * @subpackage SmartObjectForm
11
+	 */
12 12
 if (!defined('XOOPS_ROOT_PATH')) {
13 13
 	die("XOOPS root path not defined");
14 14
 }
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 
18 18
 	function SmartFormUser_sigElement($object, $key){
19 19
 
20
-	    $var = $object->vars[$key];
21
-	    $control = $object->controls[$key];
20
+		$var = $object->vars[$key];
21
+		$control = $object->controls[$key];
22 22
 
23
-     	$this->XoopsFormElementTray($var['form_caption'], '<br /><br />', $key . '_signature_tray');
23
+	 	$this->XoopsFormElementTray($var['form_caption'], '<br /><br />', $key . '_signature_tray');
24 24
 
25 25
 		$signature_textarea = new XoopsFormDhtmlTextArea('', $key, $object->getVar($key, 'e'));
26 26
 		$this->addElement($signature_textarea);
Please login to merge, or discard this 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
 class SmartFormUser_sigElement extends XoopsFormElementTray {
17 17
 
18
-	function SmartFormUser_sigElement($object, $key){
18
+	function SmartFormUser_sigElement($object, $key) {
19 19
 
20 20
 	    $var = $object->vars[$key];
21 21
 	    $control = $object->controls[$key];
Please login to merge, or discard this patch.
class/form/elements/smartformselect_multielement.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 include_once (SMARTOBJECT_ROOT_PATH . "class/form/elements/smartformselectelement.php");
14 14
 
15 15
 class SmartFormSelect_multiElement extends SmartFormSelectElement  {
16
-    function SmartFormSelect_multiElement($object, $key) {
17
-        $this->multiple = true;
18
-        parent::SmartFormSelectElement($object, $key);
19
-    }
16
+	function SmartFormSelect_multiElement($object, $key) {
17
+		$this->multiple = true;
18
+		parent::SmartFormSelectElement($object, $key);
19
+	}
20 20
 }
21 21
 ?>
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  */
13 13
 include_once (SMARTOBJECT_ROOT_PATH . "class/form/elements/smartformselectelement.php");
14 14
 
15
-class SmartFormSelect_multiElement extends SmartFormSelectElement  {
15
+class SmartFormSelect_multiElement extends SmartFormSelectElement {
16 16
     function SmartFormSelect_multiElement($object, $key) {
17 17
         $this->multiple = true;
18 18
         parent::SmartFormSelectElement($object, $key);
Please login to merge, or discard this patch.
class/form/elements/smartformimageelement.php 3 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -11,34 +11,34 @@
 block discarded – undo
11 11
  * @subpackage SmartObjectForm
12 12
  */
13 13
 class SmartFormImageElement extends XoopsFormElementTray {
14
-    function SmartFormImageElement($object, $key) {
15
-    	$var = $object->vars[$key];
16
-        $object_imageurl = $object->getImageDir();
17
-        $this->XoopsFormElementTray( $var['form_caption'], ' ' );
14
+	function SmartFormImageElement($object, $key) {
15
+		$var = $object->vars[$key];
16
+		$object_imageurl = $object->getImageDir();
17
+		$this->XoopsFormElementTray( $var['form_caption'], ' ' );
18 18
 
19 19
 
20
-        $objectArray['image'] = str_replace('{XOOPS_URL}', XOOPS_URL, $objectArray['image']);
20
+		$objectArray['image'] = str_replace('{XOOPS_URL}', XOOPS_URL, $objectArray['image']);
21 21
 
22 22
 
23
-        if($object->getVar($key) != '' && (substr($object->getVar($key), 0, 4) == 'http' || substr($object->getVar($key), 0, 11) == '{XOOPS_URL}')){
24
-        	$this->addElement( new XoopsFormLabel( '', "<img src='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar($key)) . "' alt='' /><br/><br/>" ) );
25
-        }elseif($object->getVar($key) != ''){
26
-        	$this->addElement( new XoopsFormLabel( '', "<img src='" . $object_imageurl . $object->getVar($key) . "' alt='' /><br/><br/>" ) );
27
-       	}
23
+		if($object->getVar($key) != '' && (substr($object->getVar($key), 0, 4) == 'http' || substr($object->getVar($key), 0, 11) == '{XOOPS_URL}')){
24
+			$this->addElement( new XoopsFormLabel( '', "<img src='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar($key)) . "' alt='' /><br/><br/>" ) );
25
+		}elseif($object->getVar($key) != ''){
26
+			$this->addElement( new XoopsFormLabel( '', "<img src='" . $object_imageurl . $object->getVar($key) . "' alt='' /><br/><br/>" ) );
27
+	   	}
28 28
 
29
-        include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformfileuploadelement.php";
30
-        $this->addElement(new SmartFormFileUploadElement($object, $key));
29
+		include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformfileuploadelement.php";
30
+		$this->addElement(new SmartFormFileUploadElement($object, $key));
31 31
 
32 32
 		$this->addElement(new XoopsFormLabel( '<div style="height: 10px; padding-top: 8px; font-size: 80%;">'._CO_SOBJECT_URL_FILE_DSC.'</div>', ''));
33 33
 		include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformtextelement.php";
34
-        include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformcheckelement.php";
35
-
36
-        $this->addElement(new XoopsFormLabel( '', '<br />' . _CO_SOBJECT_URL_FILE));
37
-        $this->addElement(new SmartFormTextElement($object, 'url_'.$key));
38
-        $this->addElement(new XoopsFormLabel( '', '<br /><br />'));
39
-        $delete_check = new SmartFormCheckElement('', 'delete_'.$key);
40
-        $delete_check->addOption(1, '<span style="color:red;">'._CO_SOBJECT_DELETE.'</span>');
41
-        $this->addElement($delete_check);
42
-    }
34
+		include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformcheckelement.php";
35
+
36
+		$this->addElement(new XoopsFormLabel( '', '<br />' . _CO_SOBJECT_URL_FILE));
37
+		$this->addElement(new SmartFormTextElement($object, 'url_'.$key));
38
+		$this->addElement(new XoopsFormLabel( '', '<br /><br />'));
39
+		$delete_check = new SmartFormCheckElement('', 'delete_'.$key);
40
+		$delete_check->addOption(1, '<span style="color:red;">'._CO_SOBJECT_DELETE.'</span>');
41
+		$this->addElement($delete_check);
42
+	}
43 43
 }
44 44
 ?>
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -14,30 +14,30 @@
 block discarded – undo
14 14
     function SmartFormImageElement($object, $key) {
15 15
     	$var = $object->vars[$key];
16 16
         $object_imageurl = $object->getImageDir();
17
-        $this->XoopsFormElementTray( $var['form_caption'], ' ' );
17
+        $this->XoopsFormElementTray($var['form_caption'], ' ');
18 18
 
19 19
 
20 20
         $objectArray['image'] = str_replace('{XOOPS_URL}', XOOPS_URL, $objectArray['image']);
21 21
 
22 22
 
23
-        if($object->getVar($key) != '' && (substr($object->getVar($key), 0, 4) == 'http' || substr($object->getVar($key), 0, 11) == '{XOOPS_URL}')){
24
-        	$this->addElement( new XoopsFormLabel( '', "<img src='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar($key)) . "' alt='' /><br/><br/>" ) );
25
-        }elseif($object->getVar($key) != ''){
26
-        	$this->addElement( new XoopsFormLabel( '', "<img src='" . $object_imageurl . $object->getVar($key) . "' alt='' /><br/><br/>" ) );
23
+        if ($object->getVar($key) != '' && (substr($object->getVar($key), 0, 4) == 'http' || substr($object->getVar($key), 0, 11) == '{XOOPS_URL}')) {
24
+        	$this->addElement(new XoopsFormLabel('', "<img src='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar($key)) . "' alt='' /><br/><br/>"));
25
+        }elseif ($object->getVar($key) != '') {
26
+        	$this->addElement(new XoopsFormLabel('', "<img src='" . $object_imageurl . $object->getVar($key) . "' alt='' /><br/><br/>"));
27 27
        	}
28 28
 
29
-        include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformfileuploadelement.php";
29
+        include_once SMARTOBJECT_ROOT_PATH . "class/form/elements/smartformfileuploadelement.php";
30 30
         $this->addElement(new SmartFormFileUploadElement($object, $key));
31 31
 
32
-		$this->addElement(new XoopsFormLabel( '<div style="height: 10px; padding-top: 8px; font-size: 80%;">'._CO_SOBJECT_URL_FILE_DSC.'</div>', ''));
33
-		include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformtextelement.php";
34
-        include_once SMARTOBJECT_ROOT_PATH."class/form/elements/smartformcheckelement.php";
32
+		$this->addElement(new XoopsFormLabel('<div style="height: 10px; padding-top: 8px; font-size: 80%;">' . _CO_SOBJECT_URL_FILE_DSC . '</div>', ''));
33
+		include_once SMARTOBJECT_ROOT_PATH . "class/form/elements/smartformtextelement.php";
34
+        include_once SMARTOBJECT_ROOT_PATH . "class/form/elements/smartformcheckelement.php";
35 35
 
36
-        $this->addElement(new XoopsFormLabel( '', '<br />' . _CO_SOBJECT_URL_FILE));
37
-        $this->addElement(new SmartFormTextElement($object, 'url_'.$key));
38
-        $this->addElement(new XoopsFormLabel( '', '<br /><br />'));
39
-        $delete_check = new SmartFormCheckElement('', 'delete_'.$key);
40
-        $delete_check->addOption(1, '<span style="color:red;">'._CO_SOBJECT_DELETE.'</span>');
36
+        $this->addElement(new XoopsFormLabel('', '<br />' . _CO_SOBJECT_URL_FILE));
37
+        $this->addElement(new SmartFormTextElement($object, 'url_' . $key));
38
+        $this->addElement(new XoopsFormLabel('', '<br /><br />'));
39
+        $delete_check = new SmartFormCheckElement('', 'delete_' . $key);
40
+        $delete_check->addOption(1, '<span style="color:red;">' . _CO_SOBJECT_DELETE . '</span>');
41 41
         $this->addElement($delete_check);
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
         if($object->getVar($key) != '' && (substr($object->getVar($key), 0, 4) == 'http' || substr($object->getVar($key), 0, 11) == '{XOOPS_URL}')){
24 24
         	$this->addElement( new XoopsFormLabel( '', "<img src='" . str_replace('{XOOPS_URL}', XOOPS_URL, $object->getVar($key)) . "' alt='' /><br/><br/>" ) );
25
-        }elseif($object->getVar($key) != ''){
25
+        } elseif($object->getVar($key) != ''){
26 26
         	$this->addElement( new XoopsFormLabel( '', "<img src='" . $object_imageurl . $object->getVar($key) . "' alt='' /><br/><br/>" ) );
27 27
        	}
28 28
 
Please login to merge, or discard this patch.
class/form/elements/smartformfileelement.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 class SmartFormFileElement extends XoopsFormFile {
4 4
 	var $object;
5 5
 	var $key;
6
-    function SmartFormFileElement($object, $key) {
7
-        $this->object = $object;
8
-       	$this->key = $key;
9
-        $this->XoopsFormFile($object->vars[$key]['form_caption'], $key, isset($object->vars[$key]['form_maxfilesize']) ? $object->vars[$key]['form_maxfilesize'] : 0);
10
-        $this->setExtra(" size=50");
11
-    }
6
+	function SmartFormFileElement($object, $key) {
7
+		$this->object = $object;
8
+	   	$this->key = $key;
9
+		$this->XoopsFormFile($object->vars[$key]['form_caption'], $key, isset($object->vars[$key]['form_maxfilesize']) ? $object->vars[$key]['form_maxfilesize'] : 0);
10
+		$this->setExtra(" size=50");
11
+	}
12 12
 	/**
13 13
 	 * prepare HTML for output
14 14
 	 *
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 	function render(){
18 18
 		$ret = '';
19 19
 		if($this->object->getVar($this->key) != '' ){
20
-       		$ret .=	"<div>"._CO_SOBJECT_CURRENT_FILE.$this->object->getVar($this->key) ."</div>" ;
21
-        }
20
+	   		$ret .=	"<div>"._CO_SOBJECT_CURRENT_FILE.$this->object->getVar($this->key) ."</div>" ;
21
+		}
22 22
 
23 23
 
24 24
 		$ret .= "<div><input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' />
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@
 block discarded – undo
14 14
 	 *
15 15
 	 * @return	string	HTML
16 16
 	 */
17
-	function render(){
17
+	function render() {
18 18
 		$ret = '';
19
-		if($this->object->getVar($this->key) != '' ){
20
-       		$ret .=	"<div>"._CO_SOBJECT_CURRENT_FILE.$this->object->getVar($this->key) ."</div>" ;
19
+		if ($this->object->getVar($this->key) != '') {
20
+       		$ret .= "<div>" . _CO_SOBJECT_CURRENT_FILE . $this->object->getVar($this->key) . "</div>";
21 21
         }
22 22
 
23 23
 
24
-		$ret .= "<div><input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' />
25
-		        <input type='file' name='".$this->getName()."' id='".$this->getName()."'".$this->getExtra()." />
26
-		        <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='".$this->getName()."' /></div>";
24
+		$ret .= "<div><input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' />
25
+		        <input type='file' name='".$this->getName() . "' id='" . $this->getName() . "'" . $this->getExtra() . " />
26
+		        <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='".$this->getName() . "' /></div>";
27 27
 
28 28
 	return $ret;
29 29
 	}
Please login to merge, or discard this patch.
class/form/elements/smartformhidden.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
 		if(is_array($this->getValue())){
41 41
 			$ret = '';
42 42
 			foreach($this->getValue() as $value){
43
-     			$ret .= "<input type='hidden' name='".$this->getName()."[]' id='".$this->getName()."' value='".$value."' />\n";
44
-            }
43
+	 			$ret .= "<input type='hidden' name='".$this->getName()."[]' id='".$this->getName()."' value='".$value."' />\n";
44
+			}
45 45
 		}else{
46 46
 			$ret = "<input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";
47 47
 		}
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,14 +36,14 @@
 block discarded – undo
36 36
 class SmartFormHidden extends XoopsFormHidden {
37 37
 
38 38
 
39
-	function render(){
40
-		if(is_array($this->getValue())){
39
+	function render() {
40
+		if (is_array($this->getValue())) {
41 41
 			$ret = '';
42
-			foreach($this->getValue() as $value){
43
-     			$ret .= "<input type='hidden' name='".$this->getName()."[]' id='".$this->getName()."' value='".$value."' />\n";
42
+			foreach ($this->getValue() as $value) {
43
+     			$ret .= "<input type='hidden' name='" . $this->getName() . "[]' id='" . $this->getName() . "' value='" . $value . "' />\n";
44 44
             }
45
-		}else{
46
-			$ret = "<input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";
45
+		} else {
46
+			$ret = "<input type='hidden' name='" . $this->getName() . "' id='" . $this->getName() . "' value='" . $this->getValue() . "' />";
47 47
 		}
48 48
 		return $ret;
49 49
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 			foreach($this->getValue() as $value){
43 43
      			$ret .= "<input type='hidden' name='".$this->getName()."[]' id='".$this->getName()."' value='".$value."' />\n";
44 44
             }
45
-		}else{
45
+		} else{
46 46
 			$ret = "<input type='hidden' name='".$this->getName()."' id='".$this->getName()."' value='".$this->getValue()."' />";
47 47
 		}
48 48
 		return $ret;
Please login to merge, or discard this patch.
class/form/elements/smartformuserelement.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@  discard block
 block discarded – undo
11 11
  * @subpackage SmartObjectForm
12 12
  */
13 13
 class SmartFormUserElement extends XoopsFormSelect {
14
-    var $multiple = false;
15
-    function SmartFormUserElement($object, $key) {
16
-        $var = $object->vars[$key];
17
-        $size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1);
14
+	var $multiple = false;
15
+	function SmartFormUserElement($object, $key) {
16
+		$var = $object->vars[$key];
17
+		$size = isset($var['size']) ? $var['size'] : ($this->multiple ? 5 : 1);
18 18
 
19 19
 		$this->XoopsFormSelect($var['form_caption'], $key, $object->getVar($key, 'e'), $size, $this->multiple);
20 20
 
@@ -23,19 +23,19 @@  discard block
 block discarded – undo
23 23
 		$control = $object->getControl($key);
24 24
 
25 25
 		global $xoopsDB;
26
-	    $ret = array();
27
-	    $limit = $start = 0;
28
-	    $sql = 'SELECT uid, uname FROM '.$xoopsDB->prefix('users');
29
-    	$sql .= ' ORDER BY uname ASC';
26
+		$ret = array();
27
+		$limit = $start = 0;
28
+		$sql = 'SELECT uid, uname FROM '.$xoopsDB->prefix('users');
29
+		$sql .= ' ORDER BY uname ASC';
30 30
 
31
-	    $result = $xoopsDB->query($sql);
32
-	    if ($result) {
33
-		    while ($myrow = $xoopsDB->fetchArray($result)) {
34
-		    	$uArray[$myrow['uid']] = $myrow['uname'];
35
-	        }
36
-	    }
31
+		$result = $xoopsDB->query($sql);
32
+		if ($result) {
33
+			while ($myrow = $xoopsDB->fetchArray($result)) {
34
+				$uArray[$myrow['uid']] = $myrow['uname'];
35
+			}
36
+		}
37 37
 		$this->addOptionArray($uArray);
38 38
 
39
-    }
39
+	}
40 40
 }
41 41
 ?>
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 		global $xoopsDB;
26 26
 	    $ret = array();
27 27
 	    $limit = $start = 0;
28
-	    $sql = 'SELECT uid, uname FROM '.$xoopsDB->prefix('users');
28
+	    $sql = 'SELECT uid, uname FROM ' . $xoopsDB->prefix('users');
29 29
     	$sql .= ' ORDER BY uname ASC';
30 30
 
31 31
 	    $result = $xoopsDB->query($sql);
Please login to merge, or discard this patch.