Skip to content

Commit

Permalink
remove second parameter on calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mdomba committed Aug 7, 2012
1 parent 789938d commit 3fd13f9
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion framework/web/helpers/CHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ public static function ajax($options)
foreach(array('beforeSend','complete','error','success') as $name)
{
if(isset($options[$name]) && !($options[$name] instanceof CJavaScriptExpression))
$options[$name]=new CJavaScriptExpression($options[$name], true);
$options[$name]=new CJavaScriptExpression($options[$name]);
}
if(isset($options['update']))
{
Expand Down
2 changes: 1 addition & 1 deletion framework/web/widgets/CAutoComplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ protected function getClientOptions()
if($this->$func instanceof CJavaScriptExpression)
$options[$func]=$this->$func;
else
$options[$func]=new CJavaScriptExpression($this->$func, true);
$options[$func]=new CJavaScriptExpression($this->$func);
}
}

Expand Down
2 changes: 1 addition & 1 deletion framework/web/widgets/CMaskedTextField.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function getClientOptions()
if($this->completed instanceof CJavaScriptExpression)
$options['completed']=$this->completed;
else
$options['completed']=new CJavaScriptExpression($this->completed, true);
$options['completed']=new CJavaScriptExpression($this->completed);
}

return $options;
Expand Down
2 changes: 1 addition & 1 deletion framework/web/widgets/CMultiFileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected function getClientOptions()
foreach(array('onFileRemove','afterFileRemove','onFileAppend','afterFileAppend','onFileSelect','afterFileSelect') as $event)
{
if(isset($options[$event]) && !($options[$event] instanceof CJavaScriptExpression))
$options[$event]=new CJavaScriptExpression($options[$event], true);
$options[$event]=new CJavaScriptExpression($options[$event]);
}

if($this->accept!==null)
Expand Down
2 changes: 1 addition & 1 deletion framework/web/widgets/CStarRating.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ protected function getClientOptions()
if($this->$event instanceof CJavaScriptExpression)
$options[$event]=$this->$event;
else
$options[$event]=new CJavaScriptExpression($this->$event, true);
$options[$event]=new CJavaScriptExpression($this->$event);
}
}
return $options;
Expand Down
2 changes: 1 addition & 1 deletion framework/zii/widgets/CListView.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function registerClientScript()
if($this->$event instanceof CJavaScriptExpression)
$options[$event]=$this->$event;
else
$options[$event]=new CJavaScriptExpression($this->$event, true);
$options[$event]=new CJavaScriptExpression($this->$event);
}
}

Expand Down
2 changes: 1 addition & 1 deletion framework/zii/widgets/grid/CButtonColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function init()
if(!isset($button['options']['class']))
$this->buttons[$id]['options']['class']=$id;
if(!($button['click'] instanceof CJavaScriptExpression))
$this->buttons[$id]['click']=new CJavaScriptExpression($button['click'], true);
$this->buttons[$id]['click']=new CJavaScriptExpression($button['click']);
}
}

Expand Down
2 changes: 1 addition & 1 deletion framework/zii/widgets/grid/CGridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public function registerClientScript()
if($this->$event instanceof CJavaScriptExpression)
$options[$event]=$this->$event;
else
$options[$event]=new CJavaScriptExpression($this->$event, true);
$options[$event]=new CJavaScriptExpression($this->$event);
}
}

Expand Down
2 changes: 1 addition & 1 deletion framework/zii/widgets/jui/CJuiButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function run()
if($this->onclick!==null)
{
if(!($this->onclick instanceof CJavaScriptExpression))
$this->onclick=new CJavaScriptExpression($this->onclick, true);
$this->onclick=new CJavaScriptExpression($this->onclick);
$click = CJavaScript::encode($this->onclick);
$cs->registerScript(__CLASS__.'#'.$id,"jQuery('#{$id}').button($options).click($click);");
}
Expand Down

0 comments on commit 3fd13f9

Please sign in to comment.