Support Joomla!
Main
News
Help
Forum
Extensions
Shop
Developers
Joomla! 1.5 Documentation
Home
API reference wiki
Browse SVN repository
Packages
Select a package...
Unknown
Cache_Lite
com-tecnick-tcpdf
core
Joomla-Framework
OpenID
patError
patTemplate
PEAR
phpGACL
PHPMailer
PHP_Compat
utf8
Yadis
Package: Joomla-Framework
Other documents
Changelog
To do
To do (2)
Element index (all)
Error log
Install
Copyright
License
Developer Network License
The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the
Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /joomla/database/table/content.php
Documentation is available at
content.php
<?php
/**
*
@version
$Id: content.php 6674 2007-02-19 05:52:03Z Jinx $
*
@package
Joomla.Framework
*
@subpackage
Table
*
@copyright
Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
*
@license
GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Check to ensure this file is within the rest of the framework
defined
(
'JPATH_BASE'
)
or
die
(
)
;
// Include library dependencies
jimport
(
'joomla.filter.input'
)
;
/**
* Content table
*
*
@package
Joomla.Framework
*
@subpackage
Table
*
@since
1.0
*/
class
JTableContent
extends
JTable
{
/**
@var
int
Primary key */
var
$id
=
null
;
/**
@var
string
*/
var
$title
=
null
;
/**
@var
string
*/
var
$title_alias
=
null
;
/**
@var
string
*/
var
$introtext
=
null
;
/**
@var
string
*/
var
$fulltext
=
null
;
/**
@var
int
*/
var
$state
=
null
;
/**
@var
int
The id of the category section*/
var
$sectionid
=
null
;
/**
@var
int
DEPRECATED */
var
$mask
=
null
;
/**
@var
int
*/
var
$catid
=
null
;
/**
@var
datetime
*/
var
$created
=
null
;
/**
@var
int
User id*/
var
$created_by
=
null
;
/**
@var
string
An alias for the author*/
var
$created_by_alias
=
null
;
/**
@var
datetime
*/
var
$modified
=
null
;
/**
@var
int
User id*/
var
$modified_by
=
null
;
/**
@var
boolean
*/
var
$checked_out
=
0
;
/**
@var
time
*/
var
$checked_out_time
=
0
;
/**
@var
datetime
*/
var
$frontpage_up
=
null
;
/**
@var
datetime
*/
var
$frontpage_down
=
null
;
/**
@var
datetime
*/
var
$publish_up
=
null
;
/**
@var
datetime
*/
var
$publish_down
=
null
;
/**
@var
string
*/
var
$images
=
null
;
/**
@var
string
*/
var
$urls
=
null
;
/**
@var
string
*/
var
$attribs
=
null
;
/**
@var
int
*/
var
$version
=
null
;
/**
@var
int
*/
var
$parentid
=
null
;
/**
@var
int
*/
var
$ordering
=
null
;
/**
@var
string
*/
var
$metakey
=
null
;
/**
@var
string
*/
var
$metadesc
=
null
;
/**
@var
string
*/
var
$metadata
=
null
;
/**
@var
int
*/
var
$access
=
null
;
/**
@var
int
*/
var
$hits
=
null
;
/**
*
@param
database
A database connector object
*/
function
__construct
(
&
$db
)
{
parent
::
__construct
(
'#__content'
,
'id'
,
$db
)
;
}
/**
* Validation and filtering
*/
function
check
(
)
{
/*
TODO: This filter is too rigorous,need to implement more configurable solution
// specific filters
$filter = & JInputFilter::getInstance( null, null, 1, 1 );
$this->introtext = trim( $filter->clean( $this->introtext ) );
$this->fulltext = trim( $filter->clean( $this->fulltext ) );
*/
jimport
(
'joomla.filter.output'
)
;
$alias
=
JOutputFilter
::
stringURLSafe
(
$this
->
title
)
;
if
(
empty
(
$this
->
title_alias
)
||
$this
->
title_alias
===
$alias
)
{
$this
->
title_alias
=
$alias
;
}
if
(
trim
(
str_replace
(
' '
,
''
,
$this
->
fulltext
) )
==
''
)
{
$this
->
fulltext
=
''
;
}
return
true
;
}
/**
* Converts record to XML
*
@param
boolean
Map foreign keys to text values
*/
function
toXML
(
$mapKeysToText
=
false
)
{
$db
=
&
JFactory
::
getDBO
(
)
;
if
(
$mapKeysToText
)
{
$query
=
'SELECT name'
.
' FROM #__sections'
.
' WHERE id = '
.
$this
->
sectionid
;
$db
->
setQuery
(
$query
)
;
$this
->
sectionid
=
$db
->
loadResult
(
)
;
$query
=
'SELECT name'
.
' FROM #__categories'
.
' WHERE id = '
.
$this
->
catid
;
$db
->
setQuery
(
$query
)
;
$this
->
catid
=
$db
->
loadResult
(
)
;
$query
=
'SELECT name'
.
' FROM #__users'
.
' WHERE id = '
.
$this
->
created_by
;
$db
->
setQuery
(
$query
)
;
$this
->
created_by
=
$db
->
loadResult
(
)
;
}
return
parent
::
toXML
(
$mapKeysToText
)
;
}
}
?>
Documentation generated on Mon, 05 Mar 2007 20:55:32 +0000 by
phpDocumentor 1.3.1