summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitArticle.php26
-rw-r--r--articles_rss.php6
-rw-r--r--index.php4
-rw-r--r--modules/mod_articles.php4
4 files changed, 11 insertions, 29 deletions
diff --git a/BitArticle.php b/BitArticle.php
index a55fc25..1d02495 100644
--- a/BitArticle.php
+++ b/BitArticle.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_articles/BitArticle.php,v 1.56 2006/02/08 23:24:23 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/BitArticle.php,v 1.57 2006/02/09 10:30:36 squareing Exp $
* @package article
*
* Copyright( c )2004 bitweaver.org
@@ -9,14 +9,14 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitArticle.php,v 1.56 2006/02/08 23:24:23 spiderr Exp $
+ * $Id: BitArticle.php,v 1.57 2006/02/09 10:30:36 squareing Exp $
*
* Article class is used when accessing BitArticles. It is based on TikiSample
* and builds on core bitweaver functionality, such as the Liberty CMS engine.
*
* created 2004/8/15
* @author wolffy <wolff_borg@yahoo.com.au>
- * @version $Revision: 1.56 $ $Date: 2006/02/08 23:24:23 $ $Author: spiderr $
+ * @version $Revision: 1.57 $ $Date: 2006/02/09 10:30:36 $ $Author: squareing $
*/
/**
@@ -122,24 +122,6 @@ class BitArticle extends LibertyAttachable {
/* get the "ago" time */
$this->mInfo['time_difference'] = BitDate::calculateTimeDifference( $this->mInfo['publish_date'], NULL, $gBitSystem->getPreference( 'article_date_display_format' ) );
- /* i think we don't need to parse the description when we load the full article.
- if( preg_match( ARTICLE_SPLIT_REGEX, $this->mInfo['data'] ) ) {
- $parts = preg_split( ARTICLE_SPLIT_REGEX, $this->mInfo['data'] );
- $this->mInfo['parsed_description'] = $this->parseData( $parts[0] );
- } else {
- $this->mInfo['parsed_description'] = $this->parseData( substr( $this->mInfo['data'], 0, $gBitSystem->mPrefs['article_description_length'] ) );
- }
-
- if( strlen( $this->mInfo['parsed_description'] ) != strlen( $this->mInfo['parsed_data'] ) ) {
- $this->mInfo['parsed_description'] .= ' <a href="'.$this->getDisplayUrl().'" title="'.$this->getTitle().'">$hellip;</a>';
- }
- */
-
- if( $gBitSystem->isPackageActive( 'categories' ) ) {
- /*global $categlib;
- $this->mInfo['categs'] = $categlib->get_object_categories_details( 'blogpost',$this->mInfo['post_id'] );*/
- }
-
$comment = &new LibertyComment();
$this->mInfo['num_comments'] = $comment->getNumComments( $this->mInfo['content_id'] );
LibertyAttachable::load();
@@ -669,7 +651,7 @@ class BitArticle extends LibertyAttachable {
$parts = preg_split( ARTICLE_SPLIT_REGEX, $res['data'] );
$res['parsed_description'] = $this->parseData( $parts[0], $res['format_guid'] );
} else {
- $res['parsed_description'] = $this->parseData( substr( $res['data'], 0, $gBitSystem->mPrefs['article_description_length'] ), $res['format_guid'] );
+ $res['parsed_description'] = $this->parseData( substr( $res['data'], 0, $gBitSystem->getPreference( 'article_description_length' ) ), $res['format_guid'] );
}
$res['parsed_data'] = $this->parseData( preg_replace( ARTICLE_SPLIT_REGEX, "", $res['data'] ), $res['format_guid'] );
diff --git a/articles_rss.php b/articles_rss.php
index 1c61fb8..577a93e 100644
--- a/articles_rss.php
+++ b/articles_rss.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_articles/articles_rss.php,v 1.9 2006/02/06 00:05:46 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/articles_rss.php,v 1.10 2006/02/09 10:30:36 squareing Exp $
* @package article
* @subpackage functions
*/
@@ -15,8 +15,8 @@ require_once( ARTICLES_PKG_PATH."BitArticle.php" );
$gBitSystem->verifyPackage( 'articles' );
$gBitSystem->verifyPackage( 'rss' );
-$rss->title = $gBitSystem->getPreference( 'title_rss_articles', $gBitSystem->mPrefs['site_title'].' - '.tra( 'Articles' ) );
-$rss->description = $gBitSystem->getPreference( 'desc_rss_articles', $gBitSystem->mPrefs['site_title'].' - '.tra( 'RSS Feed' ) );
+$rss->title = $gBitSystem->getPreference( 'title_rss_articles', $gBitSystem->getPreference( 'site_title' ).' - '.tra( 'Articles' ) );
+$rss->description = $gBitSystem->getPreference( 'desc_rss_articles', $gBitSystem->getPreference( 'site_title' ).' - '.tra( 'RSS Feed' ) );
// check permission to view articles
if( !$gBitUser->hasPermission( 'bit_p_read_article' ) ) {
diff --git a/index.php b/index.php
index 8c1f274..55eaad2 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.11 2006/02/08 21:51:12 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.12 2006/02/09 10:30:36 squareing Exp $
// Copyright( c )2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
@@ -27,7 +27,7 @@ if( $gBitUser->isAdmin() || $gBitUser->hasPermission( 'bit_p_admin_cms' ) ) {
$_REQUEST['type_id'] = !empty( $_REQUEST['type_id'] ) ? $_REQUEST['type_id'] : NULL;
} else {
$_REQUEST['status_id'] = ARTICLE_STATUS_APPROVED;
- $_REQUEST['max_records'] = $gBitSystem->mPrefs['max_articles'];
+ $_REQUEST['max_records'] = $gBitSystem->getPreference( 'max_articles' );
}
$articles = $gContent->getList( $_REQUEST );
$gBitSmarty->assign( 'articles', $articles['data'] );
diff --git a/modules/mod_articles.php b/modules/mod_articles.php
index 86e2cf2..3c04288 100644
--- a/modules/mod_articles.php
+++ b/modules/mod_articles.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.php,v 1.7 2005/10/30 19:48:40 lsces Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.php,v 1.8 2006/02/09 10:30:36 squareing Exp $
* @package article
* @subpackage modules
*/
@@ -33,7 +33,7 @@ if( !empty( $module_params['sort_mode'] ) && in_array( $module_params['sort_mode
$getHash['status_id'] = $status_id;
$getHash['sort_mode'] = $sort_mode;
-$getHash['max_records'] = !empty( $module_rows ) ? $module_rows : $gBitSystem->mPrefs['max_articles'];
+$getHash['max_records'] = !empty( $module_rows ) ? $module_rows : $gBitSystem->getPreference( 'max_articles' );
$getHash['topic'] = !empty( $module_params['topic'] ) ? $module_params['topic'] : NULL;
$articles = $articles->getList( $getHash );