public function run()
	{
		$key = yii::app()->request->getParam('name');
		$tooltip = Yii::app()->request->getParam('value');
		if (!$key || !$tooltip) {
			throw new CHttpException(404, Yii::t('zii', 'Unauthorized request'));
		}

		if (!$this->getDbConnection()
			->createCommand()
			->update($this->tooltipTable, array('tooltip' => $tooltip), 'tooltip_key=:key', array(':key' => $key))
		) {
			$this->getDbConnection()
				->createCommand()
				->insert($this->tooltipTable, array('tooltip_key' => $key, 'tooltip' => $tooltip));
		}
	}
public function run()
	{
		$key = yii::app()->request->getParam('name');
		$tooltip = Yii::app()->request->getParam('value');
		if (!$key || !$tooltip) {
			throw new CHttpException(404, Yii::t('zii', 'Unauthorized request'));
		}

		if (!$this->getDbConnection()
			->createCommand()
			->update($this->tooltipTable, array('tooltip' => $tooltip), 'tooltip_key=:key', array(':key' => $key))
		) {
			$this->getDbConnection()
				->createCommand()
				->insert($this->tooltipTable, array('tooltip_key' => $key, 'tooltip' => $tooltip));
		}
	}
public function run ( ) { $ key = yii :: app ( ) -> request -> getParam ( 'name' ) ; $ tooltip = Yii :: app ( ) -> request -> getParam ( 'value' ) ; if ( ! $ key || ! $ tooltip ) { throw new CHttpException ( 404 , Yii :: t ( 'zii' , 'Unauthorized request' ) ) ; } if ( ! $ this -> getDbConnection ( ) -> createCommand ( ) -> update ( $ this -> tooltipTable , array ( 'tooltip' => $ tooltip ) , 'tooltip_key=:key' , array ( ':key' => $ key ) ) ) { $ this -> getDbConnection ( ) -> createCommand ( ) -> insert ( $ this -> tooltipTable , array ( 'tooltip_key' => $ key , 'tooltip' => $ tooltip ) ) ; } }
CAction run's method
CAction run s method