Completed
Push — prado-3.3 ( f4da81...5dd4b5 )
by Fabio
09:03
created
framework/Web/UI/ActiveControls/TActiveHyperLink.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function setText($value)
52 52
 	{
53
-		if(parent::getText() === $value)
53
+		if(parent::getText()===$value)
54 54
 			return;
55 55
 
56 56
 		parent::setText($value);
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public function setImageUrl($value)
66 66
 	{
67
-		if(parent::getImageUrl() === $value)
67
+		if(parent::getImageUrl()===$value)
68 68
 			return;
69 69
 
70 70
 		parent::setImageUrl($value);
71
-		if($this->getActiveControl()->canUpdateClientSide() && $value !== '')
71
+		if($this->getActiveControl()->canUpdateClientSide() && $value!=='')
72 72
 		{
73
-			$textWriter = new TTextWriter;
74
-			$renderer = Prado::createComponent($this->GetResponse()->getHtmlWriterType(), $textWriter);
73
+			$textWriter=new TTextWriter;
74
+			$renderer=Prado::createComponent($this->GetResponse()->getHtmlWriterType(), $textWriter);
75 75
 			$this->createImage($value)->renderControl($renderer);
76 76
 			$this->getPage()->getCallbackClient()->update($this, $textWriter->flush());
77 77
 		}
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 	 */
84 84
 	public function setNavigateUrl($value)
85 85
 	{
86
-		if(parent::getNavigateUrl() === $value)
86
+		if(parent::getNavigateUrl()===$value)
87 87
 			return;
88 88
 
89 89
 		parent::setNavigateUrl($value);
90 90
 		if($this->getActiveControl()->canUpdateClientSide())
91 91
 		{
92 92
 			//replace & with & and urldecode the url (setting the href using javascript is literal)
93
-			$url = urldecode(str_replace('&', '&', $value));
93
+			$url=urldecode(str_replace('&', '&', $value));
94 94
 			$this->getPage()->getCallbackClient()->setAttribute($this, 'href', $url);
95 95
 		}
96 96
 	}
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function setTarget($value)
103 103
 	{
104
-		if(parent::getTarget() === $value)
104
+		if(parent::getTarget()===$value)
105 105
 			return;
106 106
 
107 107
 		parent::setTarget($value);
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveLabel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function setText($value)
57 57
 	{
58
-		if(parent::getText() === $value)
58
+		if(parent::getText()===$value)
59 59
 			return;
60 60
 
61 61
 		parent::setText($value);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function setForControl($value)
73 73
 	{
74
-		if(parent::getForControl() === $value)
74
+		if(parent::getForControl()===$value)
75 75
 			return;
76 76
 
77 77
 		parent::setForControl($value);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @param THtmlWriter the writer used for the rendering purpose
88 88
 	 */
89 89
 	protected function addAttributesToRender($writer) {
90
-	    $writer->addAttribute('id',$this->getClientID());
90
+	    $writer->addAttribute('id', $this->getClientID());
91 91
 	    parent::addAttributesToRender($writer);
92 92
 	}
93 93
 }
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveDatePicker.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public function getAutoPostBack()
39 39
 	{
40
-		return $this->getViewState('AutoPostBack',true);
40
+		return $this->getViewState('AutoPostBack', true);
41 41
 	}
42 42
 
43 43
 	/**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	public function setAutoPostBack($value)
50 50
 	{
51
-		$this->setViewState('AutoPostBack',TPropertyValue::ensureBoolean($value),true);
51
+		$this->setViewState('AutoPostBack', TPropertyValue::ensureBoolean($value), true);
52 52
 	}
53 53
 
54 54
 	/**
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	protected function getDatePickerOptions()
59 59
 	{
60
-		$options = parent::getDatePickerOptions();
60
+		$options=parent::getDatePickerOptions();
61 61
 		$options['CausesValidation']=$this->getCausesValidation();
62 62
 		$options['ValidationGroup']=$this->getValidationGroup();
63
-		$options['EventTarget'] = $this->getUniqueID();
64
-		$options['ShowCalendar'] = $this->getShowCalendar();
65
-		$options['AutoPostBack'] = $this->getAutoPostBack();
63
+		$options['EventTarget']=$this->getUniqueID();
64
+		$options['ShowCalendar']=$this->getShowCalendar();
65
+		$options['AutoPostBack']=$this->getAutoPostBack();
66 66
 		return $options;
67 67
 	}
68 68
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	/**
81 81
 	 * @return TBaseActiveCallbackControl standard callback control options.
82 82
 	 */
83
-	public function getActiveControl(){
83
+	public function getActiveControl() {
84 84
 		return $this->getAdapter()->getBaseActiveControl();
85 85
 	}
86 86
 
@@ -88,21 +88,21 @@  discard block
 block discarded – undo
88 88
 	 * Client-side Text property can only be updated after the OnLoad stage.
89 89
 	 * @param string text content for the textbox
90 90
 	 */
91
-	public function setText($value){
92
-		if(parent::getText() === $value)
91
+	public function setText($value) {
92
+		if(parent::getText()===$value)
93 93
 			return;
94 94
 
95 95
 		parent::setText($value);
96
-		if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()){
96
+		if($this->getActiveControl()->canUpdateClientSide() && $this->getHasLoadedPostData()) {
97 97
 			$cb=$this->getPage()->getCallbackClient();
98 98
 			$cb->setValue($this, $value);
99
-			if ($this->getInputMode()==TDatePickerInputMode::DropDownList)
99
+			if($this->getInputMode()==TDatePickerInputMode::DropDownList)
100 100
 			{
101
-				$s = Prado::createComponent('System.Util.TDateTimeStamp');
102
-				$date = $s->getDate($this->getTimeStampFromText());
101
+				$s=Prado::createComponent('System.Util.TDateTimeStamp');
102
+				$date=$s->getDate($this->getTimeStampFromText());
103 103
 				$id=$this->getClientID();
104 104
 				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'day', 'Value', $date['mday'], 'select');
105
-				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'month', 'Value', $date['mon']-1, 'select');
105
+				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'month', 'Value', $date['mon'] - 1, 'select');
106 106
 				$cb->select($id.TControl::CLIENT_ID_SEPARATOR.'year', 'Value', $date['year'], 'select');
107 107
 
108 108
 			}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * This method is mainly used by framework and control developers.
116 116
 	 * @param TCallbackEventParameter the event parameter
117 117
 	 */
118
- 	public function raiseCallbackEvent($param){
118
+ 	public function raiseCallbackEvent($param) {
119 119
 		$this->onCallback($param);
120 120
 	}
121 121
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * handler can be invoked.
127 127
 	 * @param TCallbackEventParameter event parameter to be passed to the event handlers
128 128
 	 */
129
-	public function onCallback($param){
129
+	public function onCallback($param) {
130 130
 		$this->raiseEvent('OnCallback', $this, $param);
131 131
 	}
132 132
 
@@ -136,22 +136,22 @@  discard block
 block discarded – undo
136 136
 
137 137
 	protected function registerCalendarClientScriptPre()
138 138
 	{
139
-		$cs = $this->getPage()->getClientScript();
139
+		$cs=$this->getPage()->getClientScript();
140 140
 		$cs->registerPradoScript("activedatepicker");
141 141
 	}
142 142
 
143 143
 	protected function renderClientControlScript($writer)
144 144
 	{
145
-		$cs = $this->getPage()->getClientScript();
145
+		$cs=$this->getPage()->getClientScript();
146 146
 		if(!$cs->isEndScriptRegistered('TDatePicker.spacer'))
147 147
 		{
148
-			$spacer = $this->getAssetUrl('spacer.gif');
149
-			$code = "Prado.WebUI.TDatePicker.spacer = '$spacer';";
148
+			$spacer=$this->getAssetUrl('spacer.gif');
149
+			$code="Prado.WebUI.TDatePicker.spacer = '$spacer';";
150 150
 			$cs->registerEndScript('TDatePicker.spacer', $code);
151 151
 		}
152 152
 
153
-		$options = TJavaScript::encode($this->getDatePickerOptions());
154
-		$code = "new Prado.WebUI.TActiveDatePicker($options);";
153
+		$options=TJavaScript::encode($this->getDatePickerOptions());
154
+		$code="new Prado.WebUI.TActiveDatePicker($options);";
155 155
 		$cs->registerEndScript("prado:".$this->getClientID(), $code);
156 156
 	}
157 157
 
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveHiddenField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function setValue($value)
57 57
 	{
58
-		if(parent::getValue() === $value)
58
+		if(parent::getValue()===$value)
59 59
 			return;
60 60
 
61 61
 		parent::setValue($value);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	protected function addAttributesToRender($writer)
112 112
 	{
113 113
 		parent::addAttributesToRender($writer);
114
-		$writer->addAttribute('id',$this->getClientID());
114
+		$writer->addAttribute('id', $this->getClientID());
115 115
 		$this->getActiveControl()->registerCallbackClientScript(
116 116
 			$this->getClientClassName(), $this->getPostBackOptions());
117 117
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TTimeTriggeredCallback.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public function setInterval($value)
45 45
 	{
46
-		$interval = TPropertyValue::ensureFloat($value);
46
+		$interval=TPropertyValue::ensureFloat($value);
47 47
 		if($interval <= 0)
48 48
 			throw new TConfigurationException('callback_interval_be_positive', $this->getID());
49 49
 
50
-		if($this->getInterval() === $value)
50
+		if($this->getInterval()===$value)
51 51
 			return;
52 52
 
53 53
 		$this->setViewState('Interval', $interval, 1);
54
-		if ($this->getActiveControl()->canUpdateClientSide()){
55
-			$client = $this->getPage()->getCallbackClient();
54
+		if($this->getActiveControl()->canUpdateClientSide()) {
55
+			$client=$this->getPage()->getCallbackClient();
56 56
 			$client->callClientFunction('Prado.WebUI.TTimeTriggeredCallback.setTimerInterval', array($this, $interval));
57 57
 		}
58 58
 	}
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function startTimer()
64 64
 	{
65
-		$client = $this->getPage()->getCallbackClient();
65
+		$client=$this->getPage()->getCallbackClient();
66 66
 		$client->callClientFunction('Prado.WebUI.TTimeTriggeredCallback.start', array($this));
67 67
 	}
68 68
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function stopTimer()
73 73
 	{
74
-		$client = $this->getPage()->getCallbackClient();
74
+		$client=$this->getPage()->getCallbackClient();
75 75
 		$client->callClientFunction('Prado.WebUI.TTimeTriggeredCallback.stop', array($this));
76 76
 	}
77 77
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	protected function getTriggerOptions()
99 99
 	{
100
-		$options['ID'] = $this->getClientID();
101
-		$options['EventTarget']= $this->getUniqueID();
102
-		$options['Interval'] = $this->getInterval();
100
+		$options['ID']=$this->getClientID();
101
+		$options['EventTarget']=$this->getUniqueID();
102
+		$options['Interval']=$this->getInterval();
103 103
 		return $options;
104 104
 	}
105 105
 
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
 		parent::render($writer);
113 113
 		$this->getActiveControl()->registerCallbackClientScript(
114 114
 			$this->getClientClassName(), $this->getTriggerOptions());
115
-		if($this->getStartTimerOnLoad()){
116
-			$id = $this->getClientID();
117
-			$code = "Prado.WebUI.TTimeTriggeredCallback.start('{$id}');";
118
-			$cs = $this->getPage()->getClientScript();
115
+		if($this->getStartTimerOnLoad()) {
116
+			$id=$this->getClientID();
117
+			$code="Prado.WebUI.TTimeTriggeredCallback.start('{$id}');";
118
+			$cs=$this->getPage()->getClientScript();
119 119
 			$cs->registerEndScript("{$id}:start", $code);
120 120
 		}
121 121
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveButton.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	public function setText($value)
96 96
 	{
97
-		if(parent::getText() === $value)
97
+		if(parent::getText()===$value)
98 98
 			return;
99 99
 
100 100
 		parent::setText($value);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	protected function addAttributesToRender($writer)
118 118
 	{
119 119
 		parent::addAttributesToRender($writer);
120
-		$writer->addAttribute('id',$this->getClientID());
120
+		$writer->addAttribute('id', $this->getClientID());
121 121
 		$this->getActiveControl()->registerCallbackClientScript(
122 122
 			$this->getClientClassName(), $this->getPostBackOptions());
123 123
 	}
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveImage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	public function setAlternateText($value)
50 50
 	{
51
-		if(parent::getAlternateText() === $value)
51
+		if(parent::getAlternateText()===$value)
52 52
 			return;
53 53
 
54 54
 		parent::setAlternateText($value);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function setImageAlign($value)
67 67
 	{
68
-		if(parent::getImageAlign() === $value)
68
+		if(parent::getImageAlign()===$value)
69 69
 			return;
70 70
 
71 71
 		parent::setImageAlign($value);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	public function setImageUrl($value)
80 80
 	{
81
-		if(parent::getImageUrl() === $value)
81
+		if(parent::getImageUrl()===$value)
82 82
 			return;
83 83
 
84 84
 		parent::setImageUrl($value);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function setDescriptionUrl($value)
93 93
 	{
94
-		if(parent::getDescriptionUrl() === $value)
94
+		if(parent::getDescriptionUrl()===$value)
95 95
 			return;
96 96
 
97 97
 		parent::setDescriptionUrl($value);
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveLinkButton.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 */
96 96
 	public function setText($value)
97 97
 	{
98
-		if(parent::getText() === $value)
98
+		if(parent::getText()===$value)
99 99
 			return;
100 100
 
101 101
 		parent::setText($value);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	protected function addAttributesToRender($writer)
119 119
 	{
120 120
 		parent::addAttributesToRender($writer);
121
-		$writer->addAttribute('id',$this->getClientID());
121
+		$writer->addAttribute('id', $this->getClientID());
122 122
 
123 123
 		if($this->getEnabled(true))
124 124
 		{
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 */
135 135
 	public function setEnabled($value)
136 136
 	{
137
-		if(parent::getEnabled() === $value)
137
+		if(parent::getEnabled()===$value)
138 138
 			return;
139 139
 
140 140
 		parent::setEnabled($value);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		{
143 143
 			if($this->getEnabled(true))
144 144
 			{
145
-				$nop = "javascript:;//".$this->getClientID();
145
+				$nop="javascript:;//".$this->getClientID();
146 146
 				$this->getPage()->getCallbackClient()->setAttribute($this, 'href', $nop);
147 147
 
148 148
 				$this->getActiveControl()->registerCallbackClientScript(
Please login to merge, or discard this patch.
framework/Web/UI/ActiveControls/TActiveCheckBox.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function setText($value)
90 90
 	{
91
-		if(parent::getText() === $value)
91
+		if(parent::getText()===$value)
92 92
 			return;
93 93
 
94 94
 		parent::setText($value);
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public function setChecked($value)
107 107
 	{
108
-		$value = TPropertyValue::ensureBoolean($value);
109
-		if(parent::getChecked() === $value)
108
+		$value=TPropertyValue::ensureBoolean($value);
109
+		if(parent::getChecked()===$value)
110 110
 			return;
111 111
 
112 112
 		parent::setChecked($value);
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
 	 * @param string checkbox id
133 133
 	 * @param string onclick js
134 134
 	 */
135
-	protected function renderInputTag($writer,$clientID,$onclick)
135
+	protected function renderInputTag($writer, $clientID, $onclick)
136 136
 	{
137
-		parent::renderInputTag($writer,$clientID,$onclick);
138
-		if ($this->getAutoPostBack())
137
+		parent::renderInputTag($writer, $clientID, $onclick);
138
+		if($this->getAutoPostBack())
139 139
 			$this->getActiveControl()->registerCallbackClientScript(
140 140
 				$this->getClientClassName(), $this->getPostBackOptions());
141 141
 	}
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function getLabelAttributes()
156 156
 	{
157
-		$attributes = parent::getLabelAttributes();
158
-		$attributes['id'] = $this->getDefaultLabelID();
157
+		$attributes=parent::getLabelAttributes();
158
+		$attributes['id']=$this->getDefaultLabelID();
159 159
 		return $attributes;
160 160
 	}
161 161
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @param string checkbox id
166 166
 	 * @param string label text
167 167
 	 */
168
-	protected function renderLabel($writer,$clientID,$text)
168
+	protected function renderLabel($writer, $clientID, $text)
169 169
 	{
170 170
 		$writer->addAttribute('id', $this->getDefaultLabelID());
171 171
 		parent::renderLabel($writer, $clientID, $text);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	protected function getDefaultLabelID()
178 178
 	{
179
-		if($attributes=$this->getViewState('LabelAttributes',null))
179
+		if($attributes=$this->getViewState('LabelAttributes', null))
180 180
 			return TCheckBox::getLabelAttributes()->itemAt('id');
181 181
 		else
182 182
 			return $this->getClientID().'_label';
Please login to merge, or discard this patch.