summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2016-02-07 16:48:21 +0000
committerlsces <lester@lsces.co.uk>2016-02-07 16:48:21 +0000
commit56b66c1c1e6645e7574eea55bc4ff0ff65ae931f (patch)
tree8d988e3ed5a9ea84c53a4101949ad8670368e9ad
parent1d7716a2e6fc0980d151e6c849a985d9e5400a2b (diff)
downloadarticles-56b66c1c1e6645e7574eea55bc4ff0ff65ae931f.tar.gz
articles-56b66c1c1e6645e7574eea55bc4ff0ff65ae931f.tar.bz2
articles-56b66c1c1e6645e7574eea55bc4ff0ff65ae931f.zip
Move from Smarty2 to Smarty3 function style
-rw-r--r--admin/admin_topics.php2
-rw-r--r--article_history.php6
-rw-r--r--display_article_inc.php4
-rw-r--r--edit.php12
-rw-r--r--edit_topic.php2
-rw-r--r--index.php4
-rw-r--r--lookup_article_inc.php2
-rw-r--r--lookup_article_topic_inc.php2
-rw-r--r--read.php4
9 files changed, 19 insertions, 19 deletions
diff --git a/admin/admin_topics.php b/admin/admin_topics.php
index 12e92ef..3f09654 100644
--- a/admin/admin_topics.php
+++ b/admin/admin_topics.php
@@ -12,7 +12,7 @@ $gBitSystem->verifyPermission( 'p_articles_admin' );
if( isset( $_REQUEST["fSubmitAddTopic"] ) ) {
$gContent->storeTopic( $_REQUEST );
if ( !empty( $gContent->mErrors ) ) {
- $gBitSmarty->assign_by_ref('errors', $gContent->mErrors );
+ $gBitSmarty->assignByRef('errors', $gContent->mErrors );
}
} elseif( !empty( $_REQUEST['fActivateTopic'] )&& $gContent ) {
$gContent->activateTopic();
diff --git a/article_history.php b/article_history.php
index 4a8d525..8e236d3 100644
--- a/article_history.php
+++ b/article_history.php
@@ -47,8 +47,8 @@ include_once( LIBERTY_PKG_PATH.'content_history_inc.php' );
$gBitSmarty->assign( 'page', $page = !empty( $_REQUEST['list_page'] ) ? $_REQUEST['list_page'] : 1 );
$offset = ( $page - 1 ) * $gBitSystem->getConfig( 'max_records' );
$history = $gContent->getHistory( NULL, NULL, $offset, $gBitSystem->getConfig( 'max_records' ) );
-$gBitSmarty->assign_by_ref( 'data', $history['data'] );
-$gBitSmarty->assign_by_ref( 'listInfo', $history['listInfo'] );
+$gBitSmarty->assignByRef( 'data', $history['data'] );
+$gBitSmarty->assignByRef( 'listInfo', $history['listInfo'] );
//vd($gContent->getHistoryCount());
@@ -57,5 +57,5 @@ $numPages = ceil( $gContent->getHistoryCount() / $gBitSystem->getConfig('max_rec
$gBitSmarty->assign( 'numPages', $numPages );
// Display the template
-$gBitSmarty->assign_by_ref( 'gContent', $gContent );
+$gBitSmarty->assignByRef( 'gContent', $gContent );
$gBitSystem->display( 'bitpackage:articles/article_history.tpl', NULL, array( 'display_mode' => 'display' ));
diff --git a/display_article_inc.php b/display_article_inc.php
index e722a97..f33270a 100644
--- a/display_article_inc.php
+++ b/display_article_inc.php
@@ -8,14 +8,14 @@
/**
* Initialization
*/
-$gBitSmarty->assign_by_ref( 'article', $gContent->mInfo );
+$gBitSmarty->assignByRef( 'article', $gContent->mInfo );
// get all the services that want to display something on this page
$displayHash = array( 'perm_name' => 'p_articles_read' );
$gContent->invokeServices( 'content_display_function', $displayHash );
$topics = BitArticleTopic::getTopicList();
-$gBitSmarty->assign_by_ref( 'topics', $topics );
+$gBitSmarty->assignByRef( 'topics', $topics );
// Comments engine!
if( @$gContent->mInfo['allow_comments'] == 'y' ) {
diff --git a/edit.php b/edit.php
index d2fa014..376d547 100644
--- a/edit.php
+++ b/edit.php
@@ -47,13 +47,13 @@ if( !empty( $_REQUEST['preview'] ) ) {
$article = $gContent->preparePreview( $_REQUEST );
$gBitSmarty->assign( 'preview', TRUE );
$gContent->invokeServices( 'content_preview_function', $_REQUEST );
- $gBitSmarty->assign_by_ref( 'article', $article );
+ $gBitSmarty->assignByRef( 'article', $article );
} else {
$gContent->invokeServices( 'content_edit_function' );
if( empty( $gContent->mInfo['author_name'] ) ) {
$gContent->mInfo['author_name'] = $gBitUser->getDisplayName();
}
- $gBitSmarty->assign_by_ref('article', $gContent->mInfo);
+ $gBitSmarty->assignByRef('article', $gContent->mInfo);
}
// If the article was saved, show feedback or show result
@@ -71,20 +71,20 @@ if( !empty( $_REQUEST['save'] ) ) {
// Get a topic list
$topics = BitArticleTopic::getTopicList( array( 'active_topic' => TRUE ) );
-$gBitSmarty->assign_by_ref( 'topics', $topics );
+$gBitSmarty->assignByRef( 'topics', $topics );
if ( !empty( $_REQUEST['topic'] ) ) {
$gBitSmarty->assign( 'topic', $_REQUEST['topic'] );
}
// get list of valid types
$types = BitArticleType::getTypeList();
-$gBitSmarty->assign_by_ref( 'types', $types );
+$gBitSmarty->assignByRef( 'types', $types );
if ( !empty( $gContent->mErrors ) || !empty( $feedback ) ) {
$article = $gContent->preparePreview( $_REQUEST );
- $gBitSmarty->assign_by_ref( 'article', $article );
+ $gBitSmarty->assignByRef( 'article', $article );
}
-$gBitSmarty->assign_by_ref( 'errors', $gContent->mErrors );
+$gBitSmarty->assignByRef( 'errors', $gContent->mErrors );
$gBitSmarty->assign( 'feedback', ( !empty( $feedback ) ? $feedback : NULL ) );
// Display the Index Template
diff --git a/edit_topic.php b/edit_topic.php
index 5795097..b027716 100644
--- a/edit_topic.php
+++ b/edit_topic.php
@@ -25,7 +25,7 @@ if( !$gContent->isValid() ) {
die;
}
-$gBitSmarty->assign_by_ref( 'topic_info', $gContent->mInfo);
+$gBitSmarty->assignByRef( 'topic_info', $gContent->mInfo);
if( isset( $_REQUEST["fSubmitSaveTopic"] ) ) {
$gContent->storeTopic( $_REQUEST );
diff --git a/index.php b/index.php
index c0f46b9..dff3e67 100644
--- a/index.php
+++ b/index.php
@@ -20,8 +20,8 @@ if ( !empty( $_REQUEST['article_id'] ) ) {
}
// Display the template
-$gDefaultCenter = 'bitpackage:articles/center_list_articles.tpl';
-$gBitSmarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter );
+$gDefaultCenter = 'bitpackage:articles/center_display_articles.tpl';
+$gBitSmarty->assignByRef( 'gDefaultCenter', $gDefaultCenter );
// Display the template
$gBitSystem->display( 'bitpackage:kernel/dynamic.tpl', tra( 'Articles' ) , array( 'display_mode' => 'display' ));
diff --git a/lookup_article_inc.php b/lookup_article_inc.php
index c3dc8b7..16141bf 100644
--- a/lookup_article_inc.php
+++ b/lookup_article_inc.php
@@ -27,6 +27,6 @@ if( empty( $gContent ) || !is_object( $gContent ) ) {
} else {
$gContent->load();
}
- $gBitSmarty->clear_assign( 'gContent' );
+ $gBitSmarty->clearAssign( 'gContent' );
$gBitSmarty->assign( 'gContent', $gContent );
}
diff --git a/lookup_article_topic_inc.php b/lookup_article_topic_inc.php
index e294722..b6619ba 100644
--- a/lookup_article_topic_inc.php
+++ b/lookup_article_topic_inc.php
@@ -24,5 +24,5 @@
} else {
$gContent->loadTopic();
}
- $gBitSmarty->assign_by_ref( 'gContent', $gContent );
+ $gBitSmarty->assignByRef( 'gContent', $gContent );
}
diff --git a/read.php b/read.php
index aa3c0b3..3992222 100644
--- a/read.php
+++ b/read.php
@@ -41,14 +41,14 @@ if ( ($gContent->mInfo['publish_date'] > $timestamp) && !$gContent->hasUpdatePer
}
$gContent->addHit();
-$gBitSmarty->assign_by_ref( 'article', $gContent->mInfo );
+$gBitSmarty->assignByRef( 'article', $gContent->mInfo );
// get all the services that want to display something on this page
$displayHash = array( 'perm_name' => 'p_articles_read' );
$gContent->invokeServices( 'content_display_function', $displayHash );
$topics = BitArticleTopic::getTopicList();
-$gBitSmarty->assign_by_ref( 'topics', $topics );
+$gBitSmarty->assignByRef( 'topics', $topics );
// Comments engine!
if( @$gContent->mInfo['allow_comments'] == 'y' ) {