Completed
Push — autoload ( 4808d1...dcd67f )
by Fabio
60:18 queued 50:52
created
framework/Web/UI/ActiveControls/TActiveRadioButtonList.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	protected function createRepeatedControl()
79 79
 	{
80
-		$control = new TActiveRadioButtonItem;
80
+		$control=new TActiveRadioButtonItem;
81 81
 		$control->getAdapter()->setBaseActiveControl($this->getActiveControl());
82 82
 		return $control;
83 83
 	}
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 	 * @param string checkbox id
139 139
 	 * @param string onclick js
140 140
 	 */
141
-	protected function renderInputTag($writer,$clientID,$onclick)
141
+	protected function renderInputTag($writer, $clientID, $onclick)
142 142
 	{
143
-		TRadioButton::renderInputTag($writer,$clientID,$onclick);
143
+		TRadioButton::renderInputTag($writer, $clientID, $onclick);
144 144
 	}
145 145
 }
146 146
\ No newline at end of file
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableCell.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function raiseCallbackEvent($param)
102 102
 	{
103
-		$parameter = new TActiveTableCellEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getCellIndex());
103
+		$parameter=new TActiveTableCellEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getCellIndex());
104 104
 		$this->onCellSelected($parameter);
105 105
 		$this->raiseBubbleEvent($this, $parameter);
106 106
 	}
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	{
128 128
 		parent::addAttributesToRender($writer);
129 129
 		$writer->addAttribute('id', $this->getClientID());
130
-		if ($this->hasEventHandler('OnCellSelected'))
130
+		if($this->hasEventHandler('OnCellSelected'))
131 131
 			$this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
132 132
 	}
133 133
 
@@ -140,19 +140,19 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	public function render($writer)
142 142
 	{
143
-		if ($this->getHasPreRendered())
143
+		if($this->getHasPreRendered())
144 144
 		{
145 145
 			parent::render($writer);
146
-			if ($this->getActiveControl()->canUpdateClientSide())
146
+			if($this->getActiveControl()->canUpdateClientSide())
147 147
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
148 148
 		}
149 149
 		else {
150 150
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
151 151
 			// If we update a TActiveTableCell on callback, we shouldn't update all childs,
152 152
 			// because the whole content will be replaced by the parent.
153
-			if ($this->getHasControls())
153
+			if($this->getHasControls())
154 154
 			{
155
-				foreach ($this->findControlsByType('IActiveControl', false) as $control)
155
+				foreach($this->findControlsByType('IActiveControl', false) as $control)
156 156
 					$control->getActiveControl()->setEnableUpdate(false);
157 157
 			}
158 158
 		}
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	protected function getPostBackOptions()
167 167
 	{
168
-		$options['ID'] = $this->getClientID();
169
-		$options['EventTarget'] = $this->getUniqueID();
168
+		$options['ID']=$this->getClientID();
169
+		$options['EventTarget']=$this->getUniqueID();
170 170
 		return $options;
171 171
 	}
172 172
 
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	public function getCellIndex()
180 180
 	{
181
-		foreach ($this->getRow()->getCells() as $key => $row)
182
-			if ($row == $this) return $key;
181
+		foreach($this->getRow()->getCells() as $key => $row)
182
+			if($row==$this) return $key;
183 183
 		throw new TConfigurationException('tactivetablecell_control_notincollection', get_class($this), $this->getUniqueID());
184 184
 	}
185 185
 
@@ -190,14 +190,14 @@  discard block
 block discarded – undo
190 190
 	 */
191 191
 	public function getRow()
192 192
 	{
193
-		if ($this->_row === null)
193
+		if($this->_row===null)
194 194
 		{
195
-			$row = $this->getParent();
196
-			while (!($row instanceof TTableRow) && $row !== null)
195
+			$row=$this->getParent();
196
+			while(!($row instanceof TTableRow) && $row!==null)
197 197
 			{
198
-				$row = $row->getParent();
198
+				$row=$row->getParent();
199 199
 			}
200
-			if ($row instanceof TTableRow) $this->_row = $row;
200
+			if($row instanceof TTableRow) $this->_row=$row;
201 201
 			else throw new TConfigurationException('tactivetablecell_control_outoftable', get_class($this), $this->getUniqueID());
202 202
 		}
203 203
 		return $this->_row;
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	/**
229 229
 	* @var integer the zero-based index of the cell.
230 230
 	*/
231
-	private $_selectedCellIndex = -1;
231
+	private $_selectedCellIndex=-1;
232 232
 
233 233
 	/**
234 234
 	 * Creates a new TActiveTableRowEventParameter.
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	public function __construct($response, $parameter, $index=-1)
237 237
 	{
238 238
 		parent::__construct($response, $parameter);
239
-		$this->_selectedCellIndex = $index;
239
+		$this->_selectedCellIndex=$index;
240 240
 	}
241 241
 
242 242
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackResponseAdapter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 	 * @param string writer class name.
44 44
 	 * @param THttpResponse http response handler.
45 45
 	 */
46
-	public function createNewHtmlWriter($type,$response)
46
+	public function createNewHtmlWriter($type, $response)
47 47
 	{
48
-		$writer = new TCallbackResponseWriter();
49
-		$this->_writers[] = $writer;
50
-		return parent::createNewHtmlWriter($type,$writer);
48
+		$writer=new TCallbackResponseWriter();
49
+		$this->_writers[]=$writer;
50
+		return parent::createNewHtmlWriter($type, $writer);
51 51
 	}
52 52
 
53 53
 	/**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function setResponseData($data)
67 67
 	{
68
-		$this->_data = $data;
68
+		$this->_data=$data;
69 69
 	}
70 70
 
71 71
 	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	{
85 85
 		if($url[0]==='/')
86 86
 			$url=$this->getRequest()->getBaseUrl().$url;
87
-		$this->_redirectUrl=str_replace('&','&',$url);
87
+		$this->_redirectUrl=str_replace('&', '&', $url);
88 88
 	}
89 89
 
90 90
 	/**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	public function __construct()
125 125
 	{
126 126
 	  	parent::__construct();
127
-		$this->_boundary = sprintf('%x',crc32(uniqid(null, true)));
127
+		$this->_boundary=sprintf('%x', crc32(uniqid(null, true)));
128 128
 	}
129 129
 
130 130
 	/**
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 */
141 141
 	public function setBoundary($value)
142 142
 	{
143
-		$this->_boundary = $value;
143
+		$this->_boundary=$value;
144 144
 	}
145 145
 
146 146
 	/**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 */
151 151
 	public function flush()
152 152
 	{
153
-		$content = parent::flush();
153
+		$content=parent::flush();
154 154
 		if(empty($content))
155 155
 			return "";
156 156
 		return '<!--'.$this->getBoundary().'-->'.$content.'<!--//'.$this->getBoundary().'-->';
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackClientSide.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 	 */
265 265
 	public function setEnablePageStateUpdate($value)
266 266
 	{
267
-		$enabled = TPropertyValue::ensureBoolean($value);
267
+		$enabled=TPropertyValue::ensureBoolean($value);
268 268
 		$this->setOption('EnablePageStateUpdate', $enabled);
269 269
 	}
270 270
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	public function getEnablePageStateUpdate()
276 276
 	{
277
-		$option = $this->getOption('EnablePageStateUpdate');
277
+		$option=$this->getOption('EnablePageStateUpdate');
278 278
 		return ($option===null) ? true : $option;
279 279
 	}
280 280
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	public function setPostBackTarget($value)
293 293
 	{
294 294
 		if($value instanceof TControl)
295
-			$value = $value->getUniqueID();
295
+			$value=$value->getUniqueID();
296 296
 		$this->setOption('EventTarget', $value);
297 297
 	}
298 298
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveTableRow.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function raiseCallbackEvent($param)
103 103
 	{
104
-		$parameter = new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex());
104
+		$parameter=new TActiveTableRowEventParameter($this->getResponse(), $param->getCallbackParameter(), $this->getRowIndex());
105 105
 		$this->onRowSelected($parameter);
106 106
 	}
107 107
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	public function bubbleEvent($sender, $param)
117 117
 	{
118
-		if ($param instanceof TActiveTableCellEventParameter)
118
+		if($param instanceof TActiveTableCellEventParameter)
119 119
 		{
120 120
 			$this->raiseCallbackEvent($param);
121 121
 			return true;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	{
146 146
 		parent::addAttributesToRender($writer);
147 147
 		$writer->addAttribute('id', $this->getClientID());
148
-		if ($this->hasEventHandler('OnRowSelected'))
148
+		if($this->hasEventHandler('OnRowSelected'))
149 149
 			$this->getActiveControl()->registerCallbackClientScript($this->getClientClassName(), $this->getPostBackOptions());
150 150
 	}
151 151
 
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	public function render($writer)
160 160
 	{
161
-		if ($this->getHasPreRendered())
161
+		if($this->getHasPreRendered())
162 162
 		{
163 163
 			parent::render($writer);
164
-			if ($this->getActiveControl()->canUpdateClientSide())
164
+			if($this->getActiveControl()->canUpdateClientSide())
165 165
 				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
166 166
 		}
167 167
 		else
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
 			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
170 170
 			// If we update a TActiveTableRow on callback, we shouldn't update all childs,
171 171
 			// because the whole content will be replaced by the parent.
172
-			if ($this->getHasControls())
172
+			if($this->getHasControls())
173 173
 			{
174
-				foreach ($this->findControlsByType('IActiveControl', false) as $control)
174
+				foreach($this->findControlsByType('IActiveControl', false) as $control)
175 175
 					$control->getActiveControl()->setEnableUpdate(false);
176 176
 			}
177 177
 		}
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 	 */
185 185
 	protected function getPostBackOptions()
186 186
 	{
187
-		$options['ID'] = $this->getClientID();
188
-		$options['EventTarget'] = $this->getUniqueID();
187
+		$options['ID']=$this->getClientID();
188
+		$options['EventTarget']=$this->getUniqueID();
189 189
 		return $options;
190 190
 	}
191 191
 
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function getRowIndex()
199 199
 	{
200
-		foreach ($this->getTable()->getRows() as $key => $row)
201
-			if ($row == $this) return $key;
200
+		foreach($this->getTable()->getRows() as $key => $row)
201
+			if($row==$this) return $key;
202 202
 		throw new TConfigurationException('tactivetablerow_control_notincollection', get_class($this), $this->getUniqueID());
203 203
 	}
204 204
 
@@ -209,14 +209,14 @@  discard block
 block discarded – undo
209 209
 	 */
210 210
 	public function getTable()
211 211
 	{
212
-		if ($this->_table === null)
212
+		if($this->_table===null)
213 213
 		{
214
-			$table = $this->getParent();
215
-			while (!($table instanceof TTable) && $table !== null)
214
+			$table=$this->getParent();
215
+			while(!($table instanceof TTable) && $table!==null)
216 216
 			{
217
-				$table = $table->getParent();
217
+				$table=$table->getParent();
218 218
 			}
219
-			if ($table instanceof TTable) $this->_table = $table;
219
+			if($table instanceof TTable) $this->_table=$table;
220 220
 			else throw new TConfigurationException('tactivetablerow_control_outoftable', get_class($this), $this->getUniqueID());
221 221
 		}
222 222
 		return $this->_table;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	/**
247 247
 	* @var integer the zero-based index of the row.
248 248
 	*/
249
-	private $_selectedRowIndex = -1;
249
+	private $_selectedRowIndex=-1;
250 250
 
251 251
 	/**
252 252
 	 * Creates a new TActiveTableRowEventParameter.
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 	public function __construct($response, $parameter, $index=-1)
255 255
 	{
256 256
 		parent::__construct($response, $parameter);
257
-		$this->_selectedRowIndex = $index;
257
+		$this->_selectedRowIndex=$index;
258 258
 	}
259 259
 
260 260
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TCallbackEventParameter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
 	 */
48 48
 	public function __construct($response, $parameter)
49 49
 	{
50
-		$this->_response = $response;
51
-		$this->_parameter = $parameter;
50
+		$this->_response=$response;
51
+		$this->_parameter=$parameter;
52 52
 	}
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDataList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     parent::setDataSource($value);
56 56
     if($this->getActiveControl()->canUpdateClientSide()) {
57 57
       $this->renderPager();
58
-      $this->getPage()->getAdapter()->registerControlToRender($this,$this->getResponse()->createHtmlWriter());
58
+      $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
59 59
     }
60 60
   }
61 61
 
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
   {
79 79
     if($this->getHasPreRendered()) {
80 80
       $this->renderDataList($writer);
81
-      if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(),$writer);
81
+      if($this->getActiveControl()->canUpdateClientSide()) $this->getPage()->getCallbackClient()->replaceContent($this->getContainerID(), $writer);
82 82
     }
83 83
     else {
84
-      $this->getPage()->getAdapter()->registerControlToRender($this,$writer);
84
+      $this->getPage()->getAdapter()->registerControlToRender($this, $writer);
85 85
     }
86 86
   }
87 87
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
       if($item->ControlToPaginate==$this->ID) {
99 99
         $writer=$this->getResponse()->createHtmlWriter();
100
-        $this->getPage()->getAdapter()->registerControlToRender($item,$writer);
100
+        $this->getPage()->getAdapter()->registerControlToRender($item, $writer);
101 101
       }
102 102
     }
103 103
   }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActivePager.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 		);
95 95
 
96 96
 		$this->getControls()->add($list);
97
-		$list->setDataSource(range(1,$this->getPageCount()));
97
+		$list->setDataSource(range(1, $this->getPageCount()));
98 98
 		$list->dataBind();
99 99
 		$list->setSelectedIndex($this->getCurrentPageIndex());
100 100
 		$list->setAutoPostBack(true);
101
-		$list->attachEventHandler('OnSelectedIndexChanged',array($this,'listIndexChanged'));
101
+		$list->attachEventHandler('OnSelectedIndexChanged', array($this, 'listIndexChanged'));
102 102
 		$list->attachEventHandler('OnCallback', array($this, 'handleCallback'));
103 103
 	}
104 104
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 * @param string CommandParameter corresponding to the OnCommand event of the button
115 115
 	 * @return mixed the button instance
116 116
 	 */
117
-	protected function createPagerButton($buttonType,$enabled,$text,$commandName,$commandParameter)
117
+	protected function createPagerButton($buttonType, $enabled, $text, $commandName, $commandParameter)
118 118
 	{
119 119
 		if($buttonType===TPagerButtonType::LinkButton)
120 120
 		{
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 		}
131 131
 		else if($buttonType===TPagerButtonType::ImageButton)
132 132
 		{
133
-			$button = new TActiveImageButton;
134
-			$button->setImageUrl($this->getPageImageUrl($text,$commandName));
133
+			$button=new TActiveImageButton;
134
+			$button->setImageUrl($this->getPageImageUrl($text, $commandName));
135 135
 			if($enabled)
136
-				$button->Visible = true;
136
+				$button->Visible=true;
137 137
 			else
138
-				$button->Visible = false;
138
+				$button->Visible=false;
139 139
 		}
140 140
 		else
141 141
 		{
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
 		if($buttonType===TPagerButtonType::ImageButton)
148 148
 		{
149
-			$button->ImageUrl = $text;
149
+			$button->ImageUrl=$text;
150 150
 		}
151 151
 
152 152
 		$button->setText($text);
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
 	 * @param mixed $sender
171 171
 	 * @param TCallbackEventParameter $param
172 172
 	 */
173
-	public function handleCallback ($sender,$param)
173
+	public function handleCallback($sender, $param)
174 174
 	{
175 175
 		// Update all the buttons pagers attached to the same control.
176 176
 		// Dropdown pagers doesn't need to be re-rendered.
177 177
 		$controlToPaginate=$this->getControlToPaginate();
178
-		foreach ($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control)
178
+		foreach($this->getNamingContainer()->findControlsByType('TActivePager', false) as $control)
179 179
 		{
180
-			if ($control->getMode() !== TPagerMode::DropDownList && $control->getControlToPaginate()===$controlToPaginate)
180
+			if($control->getMode()!==TPagerMode::DropDownList && $control->getControlToPaginate()===$controlToPaginate)
181 181
 			{
182 182
 				$control->render($param->getNewWriter());
183 183
 				// FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting
@@ -189,18 +189,18 @@  discard block
 block discarded – undo
189 189
 		$this->onCallback($param);
190 190
 	}
191 191
 
192
-	public function render ($writer)
192
+	public function render($writer)
193 193
 	{
194 194
 		if($this->getHasPreRendered())
195 195
 		{
196
-			$this->setDisplay(($this->getPageCount()==1)?TDisplayStyle::None:TDisplayStyle::Dynamic);
196
+			$this->setDisplay(($this->getPageCount()==1) ? TDisplayStyle::None : TDisplayStyle::Dynamic);
197 197
 			TWebControl::render($writer);
198 198
 			if($this->getActiveControl()->canUpdateClientSide())
199
-				$this->getPage()->getCallbackClient()->replaceContent($this,$writer);
199
+				$this->getPage()->getCallbackClient()->replaceContent($this, $writer);
200 200
 		}
201 201
 		else
202 202
 		{
203
-			$this->getPage()->getAdapter()->registerControlToRender($this,$writer);
203
+			$this->getPage()->getAdapter()->registerControlToRender($this, $writer);
204 204
 		}
205 205
 	}
206 206
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TEventTriggeredCallback.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,10 @@
 block discarded – undo
64 64
 	 */
65 65
 	protected function getTriggerOptions()
66 66
 	{
67
-		$options = parent::getTriggerOptions();
68
-		$name = preg_replace('/^on/', '', $this->getEventName());
69
-		$options['EventName'] = strtolower($name);
70
-		$options['StopEvent'] = $this->getPreventDefaultAction();
67
+		$options=parent::getTriggerOptions();
68
+		$name=preg_replace('/^on/', '', $this->getEventName());
69
+		$options['EventName']=strtolower($name);
70
+		$options['StopEvent']=$this->getPreventDefaultAction();
71 71
 		return $options;
72 72
 	}
73 73
 
Please login to merge, or discard this patch.