[geeklog-cvs] geeklog: Define constants earlier and use them in STORY_renderAr...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Oct 4 12:43:32 EDT 2008
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/578387031535
changeset: 6422:578387031535
user: Dirk Haun <dirk at haun-online.de>
date: Sat Oct 04 18:43:20 2008 +0200
description:
Define constants earlier and use them in STORY_renderArticle
diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
system/lib-story.php | 14 +++++++-------
diffs (38 lines):
diff -r 86e95e048be4 -r 578387031535 system/lib-story.php
--- a/system/lib-story.php Sat Oct 04 17:28:09 2008 +0200
+++ b/system/lib-story.php Sat Oct 04 18:43:20 2008 +0200
@@ -48,6 +48,12 @@
// this must be kept in sync with the actual size of 'sid' in the db ...
define('STORY_MAX_ID_LENGTH', 40);
+
+// Story Record Options for the STATUS Field
+if (!defined ('STORY_ARCHIVE_ON_EXPIRE')) {
+ define ('STORY_ARCHIVE_ON_EXPIRE', '10');
+ define ('STORY_DELETE_ON_EXPIRE', '11');
+}
/**
* Takes an article class and renders HTML in the specified template and style.
@@ -522,7 +528,7 @@
PLG_templateSetVars( 'featuredstorytext', $article );
$article->parse( 'finalstory', 'featuredarticle' );
}
- elseif( $story->DisplayElements('statuscode') == 10 AND $story->DisplayElements('expire') <= time() )
+ elseif( $story->DisplayElements('statuscode') == STORY_ARCHIVE_ON_EXPIRE AND $story->DisplayElements('expire') <= time() )
{
$article->parse( 'story_bodyhtml', 'archivestorybodytext', true );
PLG_templateSetVars( 'archivestorytext', $article );
@@ -536,12 +542,6 @@
}
return $article->finish( $article->get_var( 'finalstory' ));
-}
-
-// Story Record Options for the STATUS Field
-if (!defined ('STORY_ARCHIVE_ON_EXPIRE')) {
- define ('STORY_ARCHIVE_ON_EXPIRE', '10');
- define ('STORY_DELETE_ON_EXPIRE', '11');
}
/**
More information about the geeklog-cvs
mailing list