git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_WebCongresos/trunk@2 94ccb1af-fd9d-d947-8d90-7f70ea60afc8
57 lines
1.3 KiB
PHP
57 lines
1.3 KiB
PHP
<?php
|
|
/*
|
|
* @component SQL 2 Excel Component
|
|
* @copyright Copyright (C) Joomla-R-Us, joomla-r-us.com
|
|
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3
|
|
*/
|
|
|
|
// no direct access
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
// Include library dependencies
|
|
jimport('joomla.filter.input');
|
|
|
|
class TableSqlexcelsection extends JTable
|
|
{
|
|
// #__sql2excel_sections
|
|
var $id = null;
|
|
var $title = null;
|
|
var $alias = null;
|
|
var $description = null;
|
|
var $published = null;
|
|
var $checked_out = null;
|
|
var $checked_out_time = null;
|
|
var $ordering = null;
|
|
var $access = null;
|
|
var $count = null;
|
|
|
|
|
|
function __construct(& $db) {
|
|
parent::__construct('#__sql2excel_sections', 'id', $db);
|
|
}
|
|
|
|
function check()
|
|
{
|
|
// Make sure the section has a title specified
|
|
if (trim( $this->title ) == '') {
|
|
$this->setError( JText::_( 'The section must have a title') );
|
|
return false;
|
|
}
|
|
|
|
// Make sure we do have an alias
|
|
if(empty($this->alias)) {
|
|
$this->alias = $this->title;
|
|
}
|
|
|
|
// Make alias URL safe
|
|
$this->alias = JFilterOutput::stringURLSafe($this->alias);
|
|
$this->alias = str_replace('-','',$this->alias);
|
|
if($this->alias == '') {
|
|
$datenow =& JFactory::getDate();
|
|
$this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
?>
|