components/com_content/content.php-Dateireferenz

gehe zum Quellcode dieser Datei

Namensbereiche

namespace  Joomla

Funktionen

 _orderby_pri ($orderby)
 _orderby_sec ($orderby)
 _where ($type=1, &$access, &$noauth, $gid, $id, $now=NULL, $year=NULL, $month=NULL, $params=NULL)
 BlogOutput (&$rows, &$params, $gid, &$access, $pop, &$menu, $limitstart, $limit, $total, $archive=NULL, $archive_page=NULL)
 cancelContent (&$access)
 editItem ($uid, $gid, &$access, $sectionid=0, $task, $Itemid)
 emailContentForm ($uid, $gid)
 emailContentSend ($uid, $gid)
 findKeyItem ($gid, $access, $pop, $option, $now)
 frontpage ($gid, &$access, $pop, $now, $limit, $limitstart)
 recordVote ()
 saveContent (&$access, $task)
 show ($row, $params, $gid, &$access, $pop, $option='com_content', $ItemidCount=NULL)
 showArchiveCategory ($id=0, $gid, &$access, $pop, $option, $year, $month, $module, $limit, $limitstart)
 showArchiveSection ($id=NULL, $gid, &$access, $pop, $option, $year, $month, $limit, $limitstart)
 showBlogCategory ($id=0, $gid, &$access, $pop, $now, $limit, $limitstart)
 showBlogSection ($id=0, $gid, &$access, $pop, $now=NULL, $limit, $limitstart)
 showCategory ($id, $gid, &$access, $sectionid, $limit, $selected, $limitstart, $now, $selected, $filter)
 showItem ($uid, $gid, &$access, $pop, $option='com_content', $now)
 showSection ($id, $gid, &$access, $now)
 votingQuery ($active=NULL)

Variablen

 $access = new stdClass()
 $cache = & mosCache::getCache( 'com_content' )
 $filter = stripslashes( strval( mosGetParam( $_REQUEST, 'filter', '' ) ) )
case $gid
 $id = intval( mosGetParam( $_REQUEST, 'id', 0 ) )
case $Itemid
 $limit = intval( mosGetParam( $_REQUEST, 'limit', 0 ) )
 $limitstart = intval( mosGetParam( $_REQUEST, 'limitstart', 0 ) )
 $module = intval( mosGetParam( $_REQUEST, 'module', 0 ) )
 $month = intval( mosGetParam( $_REQUEST, 'month', date( 'm' ) ) )
case $option
 $pop = intval( mosGetParam( $_REQUEST, 'pop', 0 ) )
 $sectionid = intval( mosGetParam( $_REQUEST, 'sectionid', 0 ) )
case $selected = preg_replace( '/[^a-z]/i', '', $selected )
case $task
 $year = intval( mosGetParam( $_REQUEST, 'year', date( 'Y' ) ) )
case __pad0__
case __pad10__
case __pad11__
case __pad12__
case __pad13__
default __pad14__
case __pad1__
case __pad2__
case __pad3__
case __pad4__
case __pad5__
case __pad6__
case __pad7__
case __pad8__
case __pad9__
 break
$access canEdit = $acl->acl_check( 'action', 'edit', 'users', $my->usertype, 'content', 'all' )
$access canEditOwn = $acl->acl_check( 'action', 'edit', 'users', $my->usertype, 'content', 'own' )
$access canPublish = $acl->acl_check( 'action', 'publish', 'users', $my->usertype, 'content', 'all' )
 return


Dokumentation der Funktionen

_orderby_pri ( orderby  ) 

Definiert in Zeile 2434 der Datei content.php.

Wird benutzt von frontpage(), showArchiveSection(), showBlogCategory() und showBlogSection().

02434                                   {
02435         switch ( $orderby ) {
02436                 case 'alpha':
02437                         $orderby = 'cc.title, ';
02438                         break;
02439 
02440                 case 'ralpha':
02441                         $orderby = 'cc.title DESC, ';
02442                         break;
02443 
02444                 case 'order':
02445                         $orderby = 'cc.ordering, ';
02446                         break;
02447 
02448                 default:
02449                         $orderby = '';
02450                         break;
02451         }
02452 
02453         return $orderby;
02454 }

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

_orderby_sec ( orderby  ) 

Definiert in Zeile 2457 der Datei content.php.

Wird benutzt von frontpage(), showArchiveCategory(), showArchiveSection(), showBlogCategory(), showBlogSection(), showCategory(), showItem() und showSection().

02457                                   {
02458         switch ( $orderby ) {
02459                 case 'date':
02460                         $orderby = 'a.created';
02461                         break;
02462 
02463                 case 'rdate':
02464                         $orderby = 'a.created DESC';
02465                         break;
02466 
02467                 case 'alpha':
02468                         $orderby = 'a.title';
02469                         break;
02470 
02471                 case 'ralpha':
02472                         $orderby = 'a.title DESC';
02473                         break;
02474 
02475                 case 'hits':
02476                         $orderby = 'a.hits DESC';
02477                         break;
02478 
02479                 case 'rhits':
02480                         $orderby = 'a.hits';
02481                         break;
02482 
02483                 case 'order':
02484                         $orderby = 'a.ordering';
02485                         break;
02486 
02487                 case 'author':
02488                         $orderby = 'a.created_by_alias, u.name';
02489                         break;
02490 
02491                 case 'rauthor':
02492                         $orderby = 'a.created_by_alias DESC, u.name DESC';
02493                         break;
02494 
02495                 case 'front':
02496                         $orderby = 'f.ordering';
02497                         break;
02498 
02499                 default:
02500                         $orderby = 'a.ordering';
02501                         break;
02502         }
02503 
02504         return $orderby;
02505 }

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

_where ( type = 1,
&$  access,
&$  noauth,
gid,
id,
now = NULL,
year = NULL,
month = NULL,
params = NULL 
)

Definiert in Zeile 2510 der Datei content.php.

Benutzt $access, $database, $gid, $id, $mainframe, $month, $noauth, $now, $nullDate, $params, $type, $where, $year, canEdit und mosArrayToInts().

Wird benutzt von frontpage(), showArchiveCategory(), showArchiveSection(), showBlogCategory() und showBlogSection().

02510                                                                                                             {
02511         global $database, $mainframe;
02512 
02513         $noauth                 = !$mainframe->getCfg( 'shownoauth' );
02514         $nullDate               = $database->getNullDate();
02515         $now                    = _CURRENT_SERVER_TIME;
02516         $where                  = array();
02517         $unpublished    = 0;
02518 
02519         if ( isset($params) ) {
02520         // param controls whether unpublished items visible to publishers and above
02521                 $unpublished = $params->def( 'unpublished', 0 );
02522         }
02523 
02524         // normal
02525         if ( $type > 0) {
02526                 if ( isset($params) && $unpublished ) {
02527                 // shows unpublished items for publishers and above
02528                         if ( $access->canEdit ) {
02529                                 $where[] = "a.state >= 0";
02530                         } else {
02531                                 $where[] = "a.state = 1";
02532                                 $where[] = "( a.publish_up = " . $database->Quote( $nullDate ) . " OR a.publish_up <= " . $database->Quote( $now ) . " )";
02533                                 $where[] = "( a.publish_down = " . $database->Quote( $nullDate ) . " OR a.publish_down >= " . $database->Quote( $now ) . " )";
02534                         }
02535                 } else {
02536                 // unpublished items NOT shown for publishers and above
02537                         $where[] = "a.state = 1";
02538                         //if ( !$access->canEdit ) {
02539                                 $where[] = "( a.publish_up = " . $database->Quote( $nullDate ) . " OR a.publish_up <= " . $database->Quote( $now ) . " )";
02540                                 $where[] = "( a.publish_down = " . $database->Quote( $nullDate ) . " OR a.publish_down >= " . $database->Quote( $now ) . " )";
02541                         //}
02542                 }
02543 
02544                 // add query checks for category or section ids
02545                 if ( $id > 0 ) {
02546                         $ids = explode( ',', $id );
02547                         mosArrayToInts( $ids );
02548                         if ( $type == 1 ) {
02549                                 $where[] = '( a.sectionid=' . implode( ' OR a.sectionid=', $ids ) . ' )';
02550                         } else if ( $type == 2 ) {
02551                                 $where[] = '( a.catid=' . implode( ' OR a.catid=', $ids ) . ' )';
02552                         }
02553                 }
02554         }
02555 
02556         // archive
02557         if ( $type < 0 ) {
02558                 $where[] = "a.state = -1";
02559                 if ( $year ) {
02560                         $where[] = "YEAR( a.created ) = " . $database->Quote( $year );
02561                 }
02562                 if ( $month ) {
02563                         $where[] = "MONTH( a.created ) = " . $database->Quote( $month );
02564                 }
02565                 if ( $id > 0 ) {
02566                         if ( $type == -1 ) {
02567                                 $where[] = "a.sectionid = " . (int) $id;
02568                         } else if ( $type == -2) {
02569                                 $where[] = "a.catid = " . (int) $id;
02570                         }
02571                 }
02572         }
02573 
02574         $where[] = "s.published = 1";
02575         $where[] = "cc.published = 1";
02576         if ( $noauth ) {
02577                 $where[] = "a.access <= " . (int) $gid;
02578                 $where[] = "s.access <= " . (int) $gid;
02579                 $where[] = "cc.access <= " . (int) $gid;
02580         }
02581 
02582         return $where;
02583 }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

BlogOutput ( &$  rows,
&$  params,
gid,
&$  access,
pop,
&$  menu,
limitstart,
limit,
total,
archive = NULL,
archive_page = NULL 
)

Definiert in Zeile 1155 der Datei content.php.

Benutzt $access, $database, $gid, $GLOBALS, $i, $id, $Itemid, $limit, $limitstart, $link, $mainframe, $menu, $module, $month, $mosConfig_live_site, $msg, $option, $pageNav, $params, $pop, $rows, $task, $total, $width, $year, $z, mosHTML::BackButton(), mosHTML::integerSelectList(), mosHTML::monthSelectList(), show() und HTML_content::showLinks().

Wird benutzt von frontpage(), showArchiveCategory(), showArchiveSection(), showBlogCategory() und showBlogSection().

01155                                                                                                                                        {
01156         global $mainframe, $Itemid, $task, $id, $option, $database, $mosConfig_live_site;
01157         // parameters
01158         if ( $params->get( 'page_title', 1 ) && $menu) {
01159                 $header = $params->def( 'header', $menu->name );
01160         } else {
01161                 $header = '';
01162         }
01163         $columns = $params->def( 'columns', 2 );
01164         if ( $columns == 0 ) {
01165                 $columns = 1;
01166         }
01167         $intro                          = $params->def( 'intro',                                4 );
01168         $leading                        = $params->def( 'leading',                              1 );
01169         $links                          = $params->def( 'link',                                 4 );
01170         $pagination             = $params->def( 'pagination',                   2 );
01171         $pagination_results = $params->def( 'pagination_results',       1 );
01172         $pagination_results = $params->def( 'pagination_results',       1 );
01173         $descrip                        = $params->def( 'description',                  1 );
01174         $descrip_image          = $params->def( 'description_image',    1 );
01175         // needed for back button for page
01176         $back                           = $params->get( 'back_button', $mainframe->getCfg( 'back_button' ) );
01177         // needed to disable back button for item
01178         $params->set( 'back_button',    0 );
01179         $params->def( 'pageclass_sfx',  '' );
01180         $params->set( 'intro_only',     1 );
01181 
01182         $i = 0;
01183 
01184         // used to display section/catagory description text and images
01185         // currently not supported in Archives
01186         if ( $menu && $menu->componentid && ( $descrip || $descrip_image ) ) {
01187                 switch ( $menu->type ) {
01188                         case 'content_blog_section':
01189                                 $description = new mosSection( $database );
01190                                 $description->load( (int)$menu->componentid );
01191                                 break;
01192 
01193                         case 'content_blog_category':
01194                                 $description = new mosCategory( $database );
01195                                 $description->load( (int)$menu->componentid );
01196                                 break;
01197 
01198                         default:
01199                                 $menu->componentid = 0;
01200                                 break;
01201                 }
01202         }
01203 
01204         // Page Output
01205         // page header
01206         if ( $header ) {
01207                 echo '<div class="componentheading'. $params->get( 'pageclass_sfx' ) .'">'. $header .'</div>';
01208         }
01209 
01210         if ( $archive ) {
01211                 echo '<br />';
01212                 echo mosHTML::monthSelectList( 'month', 'size="1" class="inputbox"', $params->get( 'month' ) );
01213                 echo mosHTML::integerSelectList( 2000, 2010, 1, 'year', 'size="1" class="inputbox"', $params->get( 'year' ), "%04d" );
01214                 echo '<input type="submit" class="button" value="'._SUBMIT_BUTTON.'" />';
01215         }
01216 
01217         // checks to see if there are there any items to display
01218         if ( $total ) {
01219                 $col_with = 100 / $columns;                     // width of each column
01220                 $width = 'width="'. intval( $col_with ) .'%"';
01221 
01222                 if ( $archive ) {
01223                         // Search Success message
01224                         $msg = sprintf( _ARCHIVE_SEARCH_SUCCESS, $params->get( 'month' ), $params->get( 'year' ) );
01225                         echo "<br /><br /><div align='center'>". $msg ."</div><br /><br />";
01226                 }
01227                 echo '<table class="blog' . $params->get( 'pageclass_sfx' ) . '" cellpadding="0" cellspacing="0">';
01228 
01229                 // Secrion/Category Description & Image
01230                 if ( $menu && $menu->componentid && ( $descrip || $descrip_image ) ) {
01231                         $link = $mosConfig_live_site .'/images/stories/'. $description->image;
01232                         echo '<tr>';
01233                         echo '<td valign="top">';
01234                         if ( $descrip_image && $description->image ) {
01235                                 echo '<img src="'. $link .'" align="'. $description->image_position .'" hspace="6" alt="" />';
01236                         }
01237                         if ( $descrip && $description->description ) {
01238                                 echo $description->description;
01239                         }
01240                         echo '<br/><br/>';
01241                         echo '</td>';
01242                         echo '</tr>';
01243                 }
01244 
01245                 // Leading story output
01246                 if ( $leading ) {
01247                         echo '<tr>';
01248                         echo '<td valign="top">';
01249                         for ( $z = 0; $z < $leading; $z++ ) {
01250                                 if ( $i >= ($total - $limitstart) ) {
01251                                         // stops loop if total number of items is less than the number set to display as leading
01252                                         break;
01253                                 }
01254                                 echo '<div>';
01255                                 show( $rows[$i], $params, $gid, $access, $pop );
01256                                 echo '</div>';
01257                                 $i++;
01258                         }
01259                         echo '</td>';
01260                         echo '</tr>';
01261                 }
01262 
01263                 if ( $intro && ( $i < $total ) ) {
01264                         echo '<tr>';
01265                         echo '<td valign="top">';
01266                         echo '<table width="100%"  cellpadding="0" cellspacing="0">';
01267                         // intro story output
01268                         for ( $z = 0; $z < $intro; $z++ ) {
01269                                 if ( $i >= ($total - $limitstart) ) {
01270                                         // stops loop if total number of items is less than the number set to display as intro + leading
01271                                         break;
01272                                 }
01273 
01274                                 if ( !( $z % $columns ) || $columns == 1 ) {
01275                                         echo '<tr>';
01276                                 }
01277 
01278                                 echo '<td valign="top" '. $width .'>';
01279 
01280                                 // outputs either intro or only a link
01281                                 if ( $z < $intro ) {
01282                                         show( $rows[$i], $params, $gid, $access, $pop );
01283                                 } else {
01284                                         echo '</td>';
01285                                         echo '</tr>';
01286                                         break;
01287                                 }
01288 
01289                                 echo '</td>';
01290 
01291                                 $i++;
01292 
01293                 // this is required to output a closing </tr> tag if one of the 3 conditions are met
01294                 // 1. No of intro story output = number of columns
01295                 // 2. Total number of items is reached before the number set to display
01296                 // 3. Reached the last item but it does not fully fill the last row of output - a blank column is left
01297                 if ( !( ( $z + 1 ) % $columns ) || $columns == 1 ) {
01298                     echo '</tr>';
01299                 } else if ($i >= $total) {
01300                     echo '</tr>';
01301                 } else if ( ( ( $z + 1 )==$intro ) && ( $intro % $columns ) ) {
01302                     echo '</tr>';
01303                 }
01304 
01305             }
01306 
01307                         echo '</table>';
01308                         echo '</td>';
01309                         echo '</tr>';
01310                 }
01311 
01312                 // Links output
01313                 if ( $links && ( $i < $total - $limitstart ) ) {
01314                         $showmore = $leading + $intro;
01315 
01316                         echo '<tr>';
01317                         echo '<td valign="top">';
01318                         echo '<div class="blog_more'. $params->get( 'pageclass_sfx' ) .'">';
01319                         HTML_content::showLinks( $rows, $links, $total, $i, $showmore );
01320                         echo '</div>';
01321                         echo '</td>';
01322                         echo '</tr>';
01323                 }
01324 
01325                 // Pagination output
01326                 if ( $pagination ) {
01327                         if ( ( $pagination == 2 ) && ( $total <= $limit ) ) {
01328                                 // not visible when they is no 'other' pages to display
01329                         } else {
01330                                 require_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/pageNavigation.php' );
01331                                 // get the total number of records
01332                                 $limitstart = $limitstart ? $limitstart : 0;
01333                                 $pageNav        = new mosPageNav( $total, $limitstart, $limit );
01334 
01335                                 if ( $Itemid && $Itemid != 99999999 ) {
01336                                         // where Itemid value is returned, do not add Itemid to url
01337                                         $Itemid_link = '&amp;Itemid='. $Itemid;
01338                                 } else {
01339                                         // where Itemid value is NOT returned, do not add Itemid to url
01340                                         $Itemid_link = '';
01341                                 }
01342 
01343                                 if ( $option == 'com_frontpage' ) {
01344                                         $link   = 'index.php?option=com_frontpage'. $Itemid_link;
01345                                 } else if ( $archive_page ) {
01346                                         $year   = $params->get( 'year' );
01347                                         $month  = $params->get( 'month' );
01348 
01349                                         if (!$archive) {
01350                                         // used when access via archive module
01351                                                 $pid            = '&amp;id=0';
01352                                                 $module = '&amp;module=1';
01353                                         } else {
01354                                         // used when access via menu item
01355                                                 $pid    = '&amp;id='. $id;
01356                                                 $module = '';
01357                                         }
01358 
01359                                         $link   = 'index.php?option=com_content&amp;task='. $task . $pid . $Itemid_link .'&amp;year='. $year .'&amp;month='. $month . $module;
01360                                 } else {
01361                                         $link   = 'index.php?option=com_content&amp;task='. $task .'&amp;id='. $id . $Itemid_link;
01362                                 }
01363 
01364                                 echo '<tr>';
01365                                 echo '<td valign="top" align="center">';
01366                                 echo $pageNav->writePagesLinks( $link );
01367                                 echo '<br /><br />';
01368                                 echo '</td>';
01369                                 echo '</tr>';
01370 
01371                                 if ( $pagination_results ) {
01372                                         echo '<tr>';
01373                                         echo '<td valign="top" align="center">';
01374                                         echo $pageNav->writePagesCounter();
01375                                         echo '</td>';
01376                                         echo '</tr>';
01377                                 }
01378                         }
01379                 }
01380 
01381                 echo '</table>';
01382 
01383         } else if ( $archive && !$total ) {
01384                 // Search Failure message for Archives
01385                 $msg = sprintf( _ARCHIVE_SEARCH_FAILURE, $params->get( 'month' ), $params->get( 'year' ) );
01386                 echo '<br /><br /><div align="center">'. $msg .'</div><br />';
01387         } else {
01388                 // Generic blog empty display
01389                 echo _EMPTY_BLOG;
01390         }
01391 
01392         // Back Button
01393         $params->set( 'back_button', $back );
01394 
01395         mosHTML::BackButton ( $params );
01396 }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

cancelContent ( &$  access  ) 

Cancels an edit operation

Parameter:
database A database connector object

Definiert in Zeile 2145 der Datei content.php.

Benutzt $access, $database, $Itemid, $my, $query, $row, $task, canEdit, canEditOwn, mosGetParam() und mosRedirect().

02145                                    {
02146         global $database, $my, $task;
02147 
02148         $row = new mosContent( $database );
02149         $row->bind( $_POST );
02150 
02151         if ( $access->canEdit || ( $access->canEditOwn && $row->created_by == $my->id ) ) {
02152                 $row->checkin();
02153         }
02154 
02155         $Itemid         = intval( mosGetParam( $_POST, 'Returnid', '0' ) );
02156 
02157         $referer        = strval( mosGetParam( $_POST, 'referer', '' ) );
02158         $parts          = parse_url( $referer );
02159         parse_str( $parts['query'], $query );
02160 
02161         if ( $task == 'edit' || $task == 'cancel' ) {
02162                 $Itemid  = mosGetParam( $_POST, 'Returnid', '' );
02163                 $referer = 'index.php?option=com_content&task=view&id='. $row->id.'&Itemid='. $Itemid;
02164         }
02165 
02166         if ( $referer && $row->id ) {
02167                 mosRedirect( $referer );
02168         } else {
02169                 mosRedirect( 'index.php' );
02170         }
02171 }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

editItem ( uid,
gid,
&$  access,
sectionid = 0,
task,
Itemid 
)

Definiert in Zeile 1735 der Datei content.php.

Benutzt $access, $database, $images, $Itemid, $link, $mainframe, $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_offset, $my, $nullDate, $pos, $query, $row, $section, $sectionid, $task, canEdit, canEditOwn, HTML_content::editContent(), GetImageFolders(), GetImages(), GetSavedImages(), mosHTML::makeOption(), mosErrorAlert(), mosFormatDate(), mosNotAuth(), ReadImagesX() und mosHTML::selectList().

01735                                                                        {
01736         global $database, $my, $mainframe;
01737         global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_offset;
01738 
01739         $nullDate = $database->getNullDate();
01740         $row = new mosContent( $database );
01741         // load the row from the db table
01742         $row->load( (int)$uid );
01743 
01744         // fail if checked out not by 'me'
01745         if ($row->isCheckedOut( $my->id )) {
01746                 mosErrorAlert( "The module [ ".$row->title." ] is currently being edited by another person.");
01747         }
01748 
01749         if ( $uid ) {
01750                 // existing record
01751                 if ( !( $access->canEdit || ( $access->canEditOwn && $row->created_by == $my->id ) ) ) {
01752                         mosNotAuth();
01753                         return;
01754                 }
01755         } else {
01756                 // new record
01757                 if (!($access->canEdit || $access->canEditOwn)) {
01758                         mosNotAuth();
01759                         return;
01760                 }
01761 
01762                 if ( $Itemid == 0 || $Itemid == 99999999 ) {
01763                         // security check to see if link exists in a menu
01764 
01765                         $link = 'index.php?option=com_content&task=new&sectionid=' . (int) $sectionid;
01766                         $query = "SELECT id"
01767                         . "\n FROM #__menu"
01768                         . "\n WHERE (link LIKE '%$link' OR link LIKE '%$link&%')"
01769                         . "\n AND published = 1"
01770                         ;
01771                         $database->setQuery( $query );
01772                         $exists = $database->loadResult();
01773                         if ( !$exists ) {
01774                                 mosNotAuth();
01775                                 return;
01776                         }
01777                 }
01778         }
01779 
01780         if ( $uid ) {
01781                 $sectionid = $row->sectionid;
01782         }
01783 
01784         $lists = array();
01785 
01786         // get the type name - which is a special category
01787         $query = "SELECT name FROM #__sections"
01788         . "\n WHERE id = " . (int) $sectionid
01789         ;
01790         $database->setQuery( $query );
01791         $section = $database->loadResult();
01792 
01793         if ( $uid == 0 ) {
01794                 $row->catid = 0;
01795         }
01796 
01797         if ( $uid ) {
01798                 $row->checkout( $my->id );
01799 
01800                 if (trim( $row->images )) {
01801                         $row->images = explode( "\n", $row->images );
01802                 } else {
01803                         $row->images = array();
01804                 }
01805 
01806                 $row->created           = mosFormatDate( $row->created, _CURRENT_SERVER_TIME_FORMAT );
01807                 $row->modified          = $row->modified == $nullDate ? '' : mosFormatDate( $row->modified, _CURRENT_SERVER_TIME_FORMAT );
01808                 $row->publish_up        = mosFormatDate( $row->publish_up, _CURRENT_SERVER_TIME_FORMAT );
01809 
01810                 if (trim( $row->publish_down ) == $nullDate || trim( $row->publish_down ) == '' || trim( $row->publish_down ) == '-' ) {
01811                         $row->publish_down = 'Never';
01812                 }
01813                 $row->publish_down      = mosFormatDate( $row->publish_down, _CURRENT_SERVER_TIME_FORMAT );
01814 
01815                 $query = "SELECT name"
01816                 . "\n FROM #__users"
01817                 . "\n WHERE id = " . (int) $row->created_by
01818                 ;
01819                 $database->setQuery( $query     );
01820                 $row->creator = $database->loadResult();
01821 
01822                 // test to reduce unneeded query
01823                 if ( $row->created_by == $row->modified_by ) {
01824                         $row->modifier = $row->creator;
01825                 } else {
01826                         $query = "SELECT name"
01827                         . "\n FROM #__users"
01828                         . "\n WHERE id = " . (int) $row->modified_by
01829                         ;
01830                         $database->setQuery( $query );
01831                         $row->modifier = $database->loadResult();
01832                 }
01833 
01834                 $query = "SELECT content_id"
01835                 . "\n FROM #__content_frontpage"
01836                 . "\n WHERE content_id = " . (int) $row->id
01837                 ;
01838                 $database->setQuery( $query );
01839                 $row->frontpage = $database->loadResult();
01840         } else {
01841                 $row->sectionid         = $sectionid;
01842                 $row->version           = 0;
01843                 $row->state             = 0;
01844                 $row->ordering          = 0;
01845                 $row->images            = array();
01846