english/administrator/components/com_templates/tables/style.php
/**
	 * Overloaded store method to ensure unicity of default style.
	 *
	 * @param	boolean True to update fields even if they are null.
	 * @return	boolean	True on success.
	 * @since	1.0
	 * @link	http://docs.joomla.org/JTable/store
	 */
Overloaded store method to ensure unicity of default style.
@param       boolean True to update fields even if they are null.
@return      boolean True on success.
Overloaded store method to ensure unicity of default style . @param boolean True to update fields even if they are null . @return boolean True on success .
public function store($updateNulls = false)
	{
		if ($this->home!='0') {
			$query = $this->_db->getQuery(true);
			$query->update('#__template_styles');
			$query->set('home=\'0\'');
			$query->where('client_id='.(int)$this->client_id);
			$query->where('home='.$this->_db->quote($this->home));
			$this->_db->setQuery($query);
			$this->_db->query();
		}
		return parent::store($updateNulls);
	}
public function store ( $ updateNulls = false ) { if ( $ this -> home != '0' ) { $ query = $ this -> _db -> getQuery ( true ) ; $ query -> update ( '#__template_styles' ) ; $ query -> set ( 'home=\'0\'' ) ; $ query -> where ( 'client_id=' . ( int ) $ this -> client_id ) ; $ query -> where ( 'home=' . $ this -> _db -> quote ( $ this -> home ) ) ; $ this -> _db -> setQuery ( $ query ) ; $ this -> _db -> query ( ) ; } return parent :: store ( $ updateNulls ) ; }
Overloaded store method to ensure unicity of default style.
Overloaded store method to ensure unicity of default style .