?
Path : /home/admin/public_html/old/administrator/components/com_xijc/tables/ |
Current File : /home/admin/public_html/old/administrator/components/com_xijc/tables/configuration.php |
<?php /** * @package JomSocial * @copyright (C) 2008 by Slashes & Dots Sdn Bhd - All rights reserved! * @license http://www.azrul.com Copyrighted Commercial Software */ // Disallow direct access to this file defined('_JEXEC') or die('Restricted access'); /** * Jom Social Table Model */ class XiJCTableConfiguration extends JTable { var $name = null; var $params = null; function __construct(&$db) { parent::__construct( '#__xijc_config' , 'name' , $db ); } /** * Save the configuration **/ function store() { $db =& $this->getDBO(); $query = 'SELECT COUNT(*) FROM ' . $db->nameQuote( '#__xijc_config') . ' ' . 'WHERE ' . $db->nameQuote( 'name' ) . '=' . $db->Quote( 'config' ); $db->setQuery( $query ); $count = $db->loadResult(); $data = new stdClass(); $data->name = $this->name; $data->params = $this->params; if( $count > 0 ) { return $db->updateObject( '#__xijc_config' , $data , 'name' ); } return $db->insertObject( '#__xijc_config' , $data ); } }