Completed
Push — prado-3.3 ( 93ffb3...b1ee51 )
by Fabio
19:32
created
framework/Web/UI/WebControls/TDropDownList.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,13 +140,13 @@
 block discarded – undo
140 140
 	 */
141 141
 	public function getIsValid()
142 142
 	{
143
-	    return $this->_isValid;
143
+		return $this->_isValid;
144 144
 	}
145 145
 	/**
146 146
 	 * @param bool wether this control is valid.
147 147
 	 */
148 148
 	public function setIsValid($value)
149 149
 	{
150
-	    $this->_isValid=TPropertyValue::ensureBoolean($value);
150
+		$this->_isValid=TPropertyValue::ensureBoolean($value);
151 151
 	}
152 152
 }
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TCheckBox.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 	 */
132 132
 	public function getIsValid()
133 133
 	{
134
-	    return $this->_isValid;
134
+		return $this->_isValid;
135 135
 	}
136 136
 	/**
137 137
 	 * @param bool wether this control is valid.
138 138
 	 */
139 139
 	public function setIsValid($value)
140 140
 	{
141
-	    $this->_isValid=TPropertyValue::ensureBoolean($value);
141
+		$this->_isValid=TPropertyValue::ensureBoolean($value);
142 142
 	}
143 143
 
144 144
 	/**
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	 */
289 289
 	public function getSurroundingTag()
290 290
 	{
291
-    return 'span';
291
+	return 'span';
292 292
 	}
293 293
 
294 294
 	/**
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 	 */
297 297
 	public function getSurroundingTagID()
298 298
 	{
299
-    return $this->getSpanNeeded() ? $this->getClientID().'_parent' : $this->getClientID();
299
+	return $this->getSpanNeeded() ? $this->getClientID().'_parent' : $this->getClientID();
300 300
 	}
301 301
 
302 302
 	/**
@@ -326,11 +326,11 @@  discard block
 block discarded – undo
326 326
 		}
327 327
 		else
328 328
 			$onclick='';
329
-    if($needspan=$this->getSpanNeeded())
330
-    {
331
-      $writer->addAttribute('id',$this->getSurroundingTagID());
332
-      $writer->renderBeginTag($this->getSurroundingTag());
333
-    }
329
+	if($needspan=$this->getSpanNeeded())
330
+	{
331
+	  $writer->addAttribute('id',$this->getSurroundingTagID());
332
+	  $writer->renderBeginTag($this->getSurroundingTag());
333
+	}
334 334
 		$clientID=$this->getClientID();
335 335
 		if(($text=$this->getText())!=='')
336 336
 		{
@@ -416,15 +416,15 @@  discard block
 block discarded – undo
416 416
 		$this->setViewState('EnableClientScript',TPropertyValue::ensureBoolean($value),true);
417 417
 	}
418 418
 
419
-    /**
420
-     * Check if we need a span tag to surround this control. The span tag will be created if
421
-     * the Text property is set for this control.
422
-     *
423
-     * @return bool wether this control needs a surrounding span tag
424
-     */
425
-    protected function getSpanNeeded() {
426
-        return $this->getText()!=='';
427
-    }
419
+	/**
420
+	 * Check if we need a span tag to surround this control. The span tag will be created if
421
+	 * the Text property is set for this control.
422
+	 *
423
+	 * @return bool wether this control needs a surrounding span tag
424
+	 */
425
+	protected function getSpanNeeded() {
426
+		return $this->getText()!=='';
427
+	}
428 428
 
429 429
 	/**
430 430
 	 * Renders a label beside the checkbox.
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TXmlTransform.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -46,50 +46,50 @@  discard block
 block discarded – undo
46 46
    * @throws TConfigurationException If XSL extension is not available
47 47
    */
48 48
   public function __construct() {
49
-    if(!class_exists('XSLTProcessor', false)) {
50
-      throw new TConfigurationException('xmltransform_xslextension_required');
51
-    }
49
+	if(!class_exists('XSLTProcessor', false)) {
50
+	  throw new TConfigurationException('xmltransform_xslextension_required');
51
+	}
52 52
   }
53 53
 
54 54
   /**
55 55
    * @return string The path to the XML style sheet.
56 56
    */
57 57
   public function getTransformPath() {
58
-    return $this->getViewState('TransformPath', '');
58
+	return $this->getViewState('TransformPath', '');
59 59
   }
60 60
 
61 61
   /**
62 62
    * @param string The path to the XML style sheet.  It must be in namespace format.
63 63
    */
64 64
   public function setTransformPath($value) {
65
-    if(!is_file($value)) {
66
-      $value = Prado::getPathOfNamespace($value, self::EXT_XSL_FILE);
67
-      if($value === null) {
65
+	if(!is_file($value)) {
66
+	  $value = Prado::getPathOfNamespace($value, self::EXT_XSL_FILE);
67
+	  if($value === null) {
68 68
 	throw new TInvalidDataValueException('xmltransform_transformpath_invalid', $value);
69
-      }
70
-    }
71
-    $this->setViewState('TransformPath', $value, '');
69
+	  }
70
+	}
71
+	$this->setViewState('TransformPath', $value, '');
72 72
   }
73 73
 
74 74
   /**
75 75
    * @return string XML style sheet as string
76 76
    */
77 77
   public function getTransformContent() {
78
-    return $this->getViewState('TransformContent', '');
78
+	return $this->getViewState('TransformContent', '');
79 79
   }
80 80
 
81 81
   /**
82 82
    * @param string $value XML style sheet as string
83 83
    */
84 84
   public function setTransformContent($value) {
85
-    $this->setViewState('TransformContent', $value, '');
85
+	$this->setViewState('TransformContent', $value, '');
86 86
   }
87 87
 
88 88
   /**
89 89
    * @return string The path to the XML document. It must be in namespace format.
90 90
    */
91 91
   public function getDocumentPath() {
92
-    return $this->getViewState('DocumentPath', '');
92
+	return $this->getViewState('DocumentPath', '');
93 93
   }
94 94
 
95 95
   /**
@@ -97,27 +97,27 @@  discard block
 block discarded – undo
97 97
    * @throws TInvalidDataValueException
98 98
    */
99 99
   public function setDocumentPath($value) {
100
-    if(!is_file($value)) {
101
-      $value = Prado::getPathOfNamespace($value, self::EXT_XML_FILE);
102
-      if($value === null) {
100
+	if(!is_file($value)) {
101
+	  $value = Prado::getPathOfNamespace($value, self::EXT_XML_FILE);
102
+	  if($value === null) {
103 103
 	throw new TInvalidDataValueException('xmltransform_documentpath_invalid', $value);
104
-      }
105
-    }
106
-    $this->setViewState('DocumentPath', $value, '');
104
+	  }
105
+	}
106
+	$this->setViewState('DocumentPath', $value, '');
107 107
   }
108 108
 
109 109
   /**
110 110
    * @return string XML data
111 111
    */
112 112
   public function getDocumentContent() {
113
-    return $this->getViewState('DocumentContent', '');
113
+	return $this->getViewState('DocumentContent', '');
114 114
   }
115 115
 
116 116
   /**
117 117
    * @param string $value XML data. If not empty, it takes precedence over {@link setDocumentPath DocumentPath}.
118 118
    */
119 119
   public function setDocumentContent($value) {
120
-    $this->setViewState('DocumentContent', $value, '');
120
+	$this->setViewState('DocumentContent', $value, '');
121 121
   }
122 122
 
123 123
   /**
@@ -125,41 +125,41 @@  discard block
 block discarded – undo
125 125
    * @return TAttributeCollection the list of custom parameters
126 126
    */
127 127
   public function getParameters() {
128
-    if($params = $this->getViewState('Parameters',null)) {
129
-      return $params;
130
-    } else {
131
-      $params = new TAttributeCollection();
132
-      $this->setViewState('Parameters', $params, null);
133
-      return $params;
134
-    }
128
+	if($params = $this->getViewState('Parameters',null)) {
129
+	  return $params;
130
+	} else {
131
+	  $params = new TAttributeCollection();
132
+	  $this->setViewState('Parameters', $params, null);
133
+	  return $params;
134
+	}
135 135
   }
136 136
 
137 137
   private function getTransformXmlDocument() {
138
-    if(($content = $this->getTransformContent()) !== '') {
139
-      $document = new DOMDocument();
140
-      $document->loadXML($content);
141
-      return $document;
142
-    } else if(($path = $this->getTransformPath()) !== '') {
143
-      $document = new DOMDocument();
144
-      $document->load($path);
145
-      return $document;
146
-    } else {
147
-      throw new TConfigurationException('xmltransform_transform_required');
148
-    }
138
+	if(($content = $this->getTransformContent()) !== '') {
139
+	  $document = new DOMDocument();
140
+	  $document->loadXML($content);
141
+	  return $document;
142
+	} else if(($path = $this->getTransformPath()) !== '') {
143
+	  $document = new DOMDocument();
144
+	  $document->load($path);
145
+	  return $document;
146
+	} else {
147
+	  throw new TConfigurationException('xmltransform_transform_required');
148
+	}
149 149
   }
150 150
 
151 151
   private function getSourceXmlDocument() {
152
-    if(($content = $this->getDocumentContent()) !== '') {
153
-      $document = new DOMDocument();
154
-      $document->loadXML($content);
155
-      return $document;
156
-    } else if(($path = $this->getDocumentPath()) !== '') {
157
-      $document = new DOMDocument();
158
-      $document->load($path);
159
-      return $document;
160
-    } else {
161
-      return null;
162
-    }
152
+	if(($content = $this->getDocumentContent()) !== '') {
153
+	  $document = new DOMDocument();
154
+	  $document->loadXML($content);
155
+	  return $document;
156
+	} else if(($path = $this->getDocumentPath()) !== '') {
157
+	  $document = new DOMDocument();
158
+	  $document->load($path);
159
+	  return $document;
160
+	} else {
161
+	  return null;
162
+	}
163 163
   }
164 164
 
165 165
   /**
@@ -167,27 +167,27 @@  discard block
 block discarded – undo
167 167
    * @param THtmlWriter The writer used for the rendering purpose
168 168
    */
169 169
   public function render($writer) {
170
-    if(($document=$this->getSourceXmlDocument()) === null) {
170
+	if(($document=$this->getSourceXmlDocument()) === null) {
171 171
 	  $htmlWriter = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), new TTextWriter());
172 172
 	  parent::render($htmlWriter);
173
-      $document = new DOMDocument();
174
-      $document->loadXML($htmlWriter->flush());
175
-    }
176
-    $stylesheet = $this->getTransformXmlDocument();
177
-
178
-    // Perform XSL transformation
179
-    $xslt = new XSLTProcessor();
180
-    $xslt->importStyleSheet($stylesheet);
181
-
182
-    // Check for parameters
183
-    $parameters = $this->getParameters();
184
-    foreach($parameters as $name => $value) {
185
-      $xslt->setParameter('', $name, $value);
186
-    }
187
-    $output = $xslt->transformToXML($document);
188
-
189
-    // Write output
190
-    $writer->write($output);
173
+	  $document = new DOMDocument();
174
+	  $document->loadXML($htmlWriter->flush());
175
+	}
176
+	$stylesheet = $this->getTransformXmlDocument();
177
+
178
+	// Perform XSL transformation
179
+	$xslt = new XSLTProcessor();
180
+	$xslt->importStyleSheet($stylesheet);
181
+
182
+	// Check for parameters
183
+	$parameters = $this->getParameters();
184
+	foreach($parameters as $name => $value) {
185
+	  $xslt->setParameter('', $name, $value);
186
+	}
187
+	$output = $xslt->transformToXML($document);
188
+
189
+	// Write output
190
+	$writer->write($output);
191 191
   }
192 192
 }
193 193
 
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TItemDataRenderer.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@
 block discarded – undo
25 25
  * - {@link getItemIndex ItemIndex}: zero-based index of this renderer in the item list collection.
26 26
  * - {@link getItemType ItemType}: item type of this renderer, such as TListItemType::AlternatingItem
27 27
  * - {@link getData Data}: data associated with this renderer
28
-
29 28
  * @author Qiang Xue <[email protected]>
30 29
  * @package System.Web.UI.WebControls
31 30
  * @since 3.1.2
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TDataTypeValidator.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,9 +62,9 @@
 block discarded – undo
62 62
 	}
63 63
 
64 64
 	/**
65
-     * Sets the date format for a date validation
66
-     * @param string the date format value
67
-     */
65
+	 * Sets the date format for a date validation
66
+	 * @param string the date format value
67
+	 */
68 68
 	public function setDateFormat($value)
69 69
 	{
70 70
 		$this->setViewState('DateFormat', $value, '');
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TReCaptcha.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,12 +170,12 @@
 block discarded – undo
170 170
 	public function validate()
171 171
 	{
172 172
 		if (!
173
-		      (
173
+			  (
174 174
 			($challenge = @$_POST[$this->getChallengeFieldName()])
175 175
 			and
176 176
 			($response = @$_POST[$this->getResponseFieldName()])
177
-		      )
178
-                   )
177
+			  )
178
+				   )
179 179
 		   return false;
180 180
 
181 181
 		$resp = recaptcha_check_answer(
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TInlineFrame.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	public function setWidth($value)
160 160
 	{
161 161
 	  if(($value=TPropertyValue::ensureInteger($value))<0)
162
-	    $value=-1;
162
+		$value=-1;
163 163
 	  $this->setViewState('Width',$value,-1);
164 164
 	}
165 165
 	
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	public function setHeight($value)
178 178
 	{
179 179
 	  if(($value=TPropertyValue::ensureInteger($value))<0)
180
-	    $value=-1;
180
+		$value=-1;
181 181
 	  $this->setViewState('Height',$value,-1);
182 182
 	}
183 183
 	
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/THiddenField.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,14 +117,14 @@
 block discarded – undo
117 117
 	 */
118 118
 	public function getIsValid()
119 119
 	{
120
-	    return $this->_isValid;
120
+		return $this->_isValid;
121 121
 	}
122 122
 	/**
123 123
 	 * @param bool wether this control is valid.
124 124
 	 */
125 125
 	public function setIsValid($value)
126 126
 	{
127
-	    $this->_isValid=TPropertyValue::ensureBoolean($value);
127
+		$this->_isValid=TPropertyValue::ensureBoolean($value);
128 128
 	}
129 129
 
130 130
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/WebControls/TTextBox.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -251,14 +251,14 @@  discard block
 block discarded – undo
251 251
 	 */
252 252
 	public function getIsValid()
253 253
 	{
254
-	    return $this->_isValid;
254
+		return $this->_isValid;
255 255
 	}
256 256
 	/**
257 257
 	 * @param bool wether this control is valid.
258 258
 	 */
259 259
 	public function setIsValid($value)
260 260
 	{
261
-	    $this->_isValid=TPropertyValue::ensureBoolean($value);
261
+		$this->_isValid=TPropertyValue::ensureBoolean($value);
262 262
 	}
263 263
 
264 264
 	/**
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
 
330 330
 	/**
331 331
 	 * @return boolean a value indicating whether an automatic postback to the server
332
-     * will occur whenever the user modifies the text in the TTextBox control and
333
-     * then tabs out of the component. Defaults to false.
332
+	 * will occur whenever the user modifies the text in the TTextBox control and
333
+	 * then tabs out of the component. Defaults to false.
334 334
 	 */
335 335
 	public function getAutoPostBack()
336 336
 	{
Please login to merge, or discard this patch.