title ) == '') { $this->setError( JText::_( 'SECTION MUST HAVE A TITLE') ); return false; } // check for existing name /*$query = "SELECT id" . ' FROM #__sections " . ' WHERE title = '. $this->_db->Quote($this->title) . ' AND scope = ' . $this->_db->Quote($this->scope) ; $this->_db->setQuery( $query ); $xid = intval( $this->_db->loadResult() ); if ($xid && $xid != intval( $this->id )) { $this->_error = JText::sprintf( 'WARNNAMETRYAGAIN', JText::_( 'Section') ); return false; }*/ if(empty($this->alias)) { $this->alias = $this->title; } $this->alias = JFilterOutput::stringURLSafe($this->alias); if(trim(str_replace('-','',$this->alias)) == '') { $datenow =& JFactory::getDate(); $this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S"); } return true; } /** * Overloaded bind function * * @access public * @param array $hash named array * @return null|string null is operation was satisfactory, otherwise returns an error * @see JTable:bind * @since 1.5 */ function bind($array, $ignore = '') { if (isset( $array['params'] ) && is_array($array['params'])) { $registry = new JRegistry(); $registry->loadArray($array['params']); $array['params'] = $registry->toString(); } return parent::bind($array, $ignore); } }