summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitBlog.php4
-rw-r--r--BitBlogPost.php44
-rw-r--r--edit.php16
-rw-r--r--index.php26
-rw-r--r--lookup_post_inc.php14
-rw-r--r--post.php4
-rw-r--r--print_blog_post.php12
-rw-r--r--send_post.php4
-rw-r--r--view_post.php26
9 files changed, 9 insertions, 141 deletions
diff --git a/BitBlog.php b/BitBlog.php
index 532378d..5654625 100644
--- a/BitBlog.php
+++ b/BitBlog.php
@@ -126,8 +126,6 @@ class BitBlog extends LibertyContent {
$pParamHash['blog_store']['use_title'] = isset( $pParamHash['use_title'] ) ? 'y' : 'n';
$pParamHash['blog_store']['allow_comments'] = isset( $pParamHash['allow_comments'] ) ? 'y' : 'n';
$pParamHash['blog_store']['use_find'] = isset( $pParamHash['use_find'] ) ? 'y' : 'n';
- // DEPRECATED - Slated for removal -wjames5
- //$pParamHash['blog_store']['is_public'] = $gBitUser->hasPermission('p_blogs_create_is_public') && isset( $pParamHash['public'] ) ? $pParamHash['public'] : NULL;
return( count( $this->mErrors ) == 0 );
}
@@ -138,8 +136,6 @@ class BitBlog extends LibertyContent {
$table = BIT_DB_PREFIX."blogs";
$this->mDb->StartTrans();
if( $this->isValid() ) {
- // DEPRECATED - this looks stupid -wjames5
- //$pParamHash['blog_store']['posts'] = $this->mDb->getOne( "SELECT COUNT(`blog_id`) FROM `".BIT_DB_PREFIX."blog_posts` WHERE blog_id=?", array( $pParamHash['blog_id'] ) );
$result = $this->mDb->associateUpdate( $table, $pParamHash['blog_store'], array( "blog_id" => $pParamHash['blog_id'] ) );
} else {
// DEPRECATED - this looks stupid -wjames5
diff --git a/BitBlogPost.php b/BitBlogPost.php
index ce2cfee..240edd5 100644
--- a/BitBlogPost.php
+++ b/BitBlogPost.php
@@ -1,12 +1,12 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_blogs/BitBlogPost.php,v 1.67 2007/05/16 13:23:22 wjames5 Exp $
+ * $Header: /cvsroot/bitweaver/_bit_blogs/BitBlogPost.php,v 1.68 2007/05/16 16:47:06 wjames5 Exp $
*
* Copyright (c) 2004 bitweaver.org
* 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: BitBlogPost.php,v 1.67 2007/05/16 13:23:22 wjames5 Exp $
+ * $Id: BitBlogPost.php,v 1.68 2007/05/16 16:47:06 wjames5 Exp $
*
* Virtual base class (as much as one can have such things in PHP) for all
* derived tikiwiki classes that require database access.
@@ -16,7 +16,7 @@
*
* @author drewslater <andrew@andrewslater.com>, spiderr <spider@steelsun.com>
*
- * @version $Revision: 1.67 $ $Date: 2007/05/16 13:23:22 $ $Author: wjames5 $
+ * @version $Revision: 1.68 $ $Date: 2007/05/16 16:47:06 $ $Author: wjames5 $
*/
/**
@@ -64,21 +64,6 @@ class BitBlogPost extends LibertyAttachable {
array_push( $bindVars, $lookupId );
$this->getServicesSql( 'content_load_sql_function', $selectSql, $joinSql, $whereSql, $bindVars );
-/* DEPRICATED - Slated for removal
- $query = "SELECT bp.*, lc.*, blc.`title` as `blogtitle`, b.`allow_comments`,b.`allow_comments`, b.`use_title`, buu.`user_id` AS `blog_user_id`, uu.`login`, uu.`real_name`, lf.`storage_path` as avatar $selectSql
- FROM `".BIT_DB_PREFIX."blog_posts` bp
- INNER JOIN `".BIT_DB_PREFIX."liberty_content` lc ON (lc.`content_id` = bp.`content_id`)
- INNER JOIN `".BIT_DB_PREFIX."users_users` uu ON( uu.`user_id` = lc.`user_id` )
- INNER JOIN `".BIT_DB_PREFIX."blogs` b ON (b.`blog_id` = bp.`blog_id`)
- INNER JOIN `".BIT_DB_PREFIX."liberty_content` blc ON (blc.`content_id` = b.`content_id`)
- INNER JOIN `".BIT_DB_PREFIX."users_users` buu ON( buu.`user_id` = blc.`user_id` ) $joinSql
- LEFT OUTER JOIN `".BIT_DB_PREFIX."liberty_attachments` a ON (uu.`user_id` = a.`user_id` AND uu.`avatar_attachment_id`=a.`attachment_id`)
- LEFT OUTER JOIN `".BIT_DB_PREFIX."liberty_files` lf ON (lf.`file_id` = a.`foreign_id`)
- WHERE bp.`$lookupColumn`=? $whereSql ";
- // this was the last line in the query - tiki_user_preferences is DEAD DEAD DEAD!!!
-// LEFT OUTER JOIN `".BIT_DB_PREFIX."tiki_user_preferences` tup ON ( uu.`user_id`=tup.`user_id` AND tup.`pref_name`='theme' )
-*/
-
$query = "
SELECT bp.*, lc.*, uu.`login`, uu.`real_name`, lf.`storage_path` as avatar
$selectSql
@@ -789,29 +774,6 @@ class BitBlogPost extends LibertyAttachable {
$accessError = $this->invokeServices( 'content_verify_access', $res, FALSE );
if( empty( $accessError ) ) {
- //"DEPRECATED - Slated for removal
- /*
- if ( $gBitSystem->isPackageActive( 'categories' ) ) {
- global $categlib;
- require_once( CATEGORIES_PKG_PATH.'categ_lib.php' );
- $res['categs'] = $categlib->get_object_categories( BITBLOGPOST_CONTENT_TYPE_GUID, $res["content_id"] );
- }
- */
-
- // DEPRECATED - more complex comments retrieval - Slated for removal
- /*
- if ( $pListHash['load_num_comments'] || $pListHash['load_comments'] ) {
- $comment = new LibertyComment();
- $res['num_comments'] = $comment->getNumComments($res['content_id']);
- if( $pListHash['load_comments'] ) {
- // Get the comments associated with this post
- $res['comments'] = $comment->getComments($res['content_id'], $gBitSystem->getConfig( 'comments_per_page', 10 ) );
- }
- } else {
- $res['comments'] = NULL;
- }
- */
-
$res['avatar'] = (!empty($res['avatar']) ? BIT_ROOT_URL.dirname($res['avatar']).'/avatar.jpg' : NULL);
$res['num_comments'] = $comment->getNumComments( $res['content_id'] );
$res['post_url'] = BitBlogPost::getDisplayUrl( $res['content_id'] );
diff --git a/edit.php b/edit.php
index fb1a4a5..6859d21 100644
--- a/edit.php
+++ b/edit.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/edit.php,v 1.26 2007/04/20 11:03:11 nickpalmer Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/edit.php,v 1.27 2007/05/16 16:47:06 wjames5 Exp $
* @package blogs
* @subpackage functions
*/
@@ -31,16 +31,6 @@ if (!isset($last_modified)) {
$gBitSmarty->assign_by_ref('heading', $heading);
-/* DEPRECATED slated for removal -wjames5
-if( $gBlog->isValid() ) {
- $gContent = &$gContent; // make a reference so services work correctly
- $_REQUEST['content_id'] = $gBlog->mContentId;
- if( !$gBlog->hasEditPermission() ) {
- $gBitSystem->verifyPermission( 'p_blogs_admin', "Permission denied you cannot edit this blog" );
- }
-}
-*/
-
if( $gContent->isValid() ) {
$_REQUEST['content_id'] = $gContent->mContentId;
if( !$gContent->hasEditPermission() ) {
@@ -61,10 +51,6 @@ if (isset($_REQUEST['preview'])) {
$gBitSmarty->assign('parsed', $gContent->parseData( $_REQUEST["edit"], $_REQUEST["format_guid"]));
$gBitSmarty->assign('user_name', $gBitUser->getDisplayName());
$gBitSmarty->assign('created', $gBitSystem->getUTCTime());
-
-//DEPRECATED - slated for removal
-// $gBitSmarty->assign('public_blog', isset($_REQUEST["public_blog"]) ? 'y' : 'n');
-
$gBitSmarty->assign('use_find', isset($_REQUEST["use_find"]) ? 'y' : 'n');
$gBitSmarty->assign('use_title', isset($_REQUEST["use_title"]) ? 'y' : 'n');
$gBitSmarty->assign('allow_comments', isset($_REQUEST["allow_comments"]) ? 'y' : 'n');
diff --git a/index.php b/index.php
index 821f89b..64a9fe2 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/index.php,v 1.7 2007/03/18 18:49:58 wjames5 Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/index.php,v 1.8 2007/05/16 16:47:07 wjames5 Exp $
* @package blogss
* @subpackage functions
@@ -15,33 +15,9 @@
require_once( '../bit_setup_inc.php' );
require_once( BLOGS_PKG_PATH.'lookup_blog_inc.php');
-//"DEPRECATED - Slated for removal
-/*
-if (defined("CATEGORIES_PKG_PATH")) {
- include_once( CATEGORIES_PKG_PATH.'categ_lib.php');
-}
-*/
-
$gBitSystem->verifyPackage( 'blogs' );
$gBitSystem->verifyPermission( 'p_blogs_view' );
-//"DEPRECATED - Slated for removal
-/*
-if ($gBitSystem->isPackageActive( 'categories' )) {
- if (isset($_REQUEST['addcateg']) and $_REQUEST['addcateg'] and isset($_REQUEST['post_id']) and $_REQUEST['post_id']) {
- $categlib->categorize_blog_post($_REQUEST['post_id'],$_REQUEST['addcateg'],true);
- } elseif (isset($_REQUEST['delcategs']) and isset($_REQUEST['post_id']) and $_REQUEST['post_id']) {
- $categlib->uncategorize('blogpost',$_REQUEST['post_id']);
- }
-
- $categs = $categlib->list_all_categories(0, -1, 'name_asc', '', '', 0);
- $gBitSmarty->assign('categs',$categs['data']);
- $gBitSmarty->assign('page','index.php');
- $choosecateg = str_replace('"',"'",$gBitSmarty->fetch('bitpackage:blogs/popup_categs.tpl'));
- $gBitSmarty->assign('choosecateg',$choosecateg);
-}
-*/
-
$gBitSmarty->assign( 'showEmpty', TRUE );
$gDefaultCenter = 'bitpackage:blogs/center_list_blog_posts.tpl';
$gBitSmarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter );
diff --git a/lookup_post_inc.php b/lookup_post_inc.php
index 0f14e68..5ddd3d1 100644
--- a/lookup_post_inc.php
+++ b/lookup_post_inc.php
@@ -26,20 +26,6 @@
-/* OLD WAY OF WRITING THE ABOVE - DELETE - wjames5
-if( empty( $gContent ) || !is_object( $gContent ) || !$gContent->isValid() ) {
- $postId = !empty( $_REQUEST['post_id'] ) ? $_REQUEST['post_id'] : NULL;
- $conId = !empty( $_REQUEST['content_id'] ) ? $_REQUEST['content_id'] : NULL;
- $gContent = new BitBlogPost( $postId, $conId );
- $gContent->load();
- $comments_return_url = $_SERVER['PHP_SELF']."?post_id=$postId";
- $gBitSmarty->assign_by_ref( 'gContent', $gContent );
-}
-*/
-
-
-
-
// MOVE THIS TO display_bitblogpost_inc.php -wjames5
/*
global $gContent_previous;
diff --git a/post.php b/post.php
index 33bfdce..41868fd 100644
--- a/post.php
+++ b/post.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/post.php,v 1.41 2007/05/16 13:23:22 wjames5 Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/post.php,v 1.42 2007/05/16 16:47:07 wjames5 Exp $
* @package blogs
* @subpackage functions
@@ -18,8 +18,6 @@ require_once( '../bit_setup_inc.php' );
$gBitSystem->verifyPackage( 'blogs' );
$gBitSystem->verifyPermission( 'p_blogs_post' );
-//DEPRECATED -wjames5
-//require_once( BLOGS_PKG_PATH.'lookup_blog_inc.php');
require_once( BLOGS_PKG_PATH.'lookup_post_inc.php' );
require_once( BLOGS_PKG_PATH.'BitBlog.php');
$gBlog = new BitBlog();
diff --git a/print_blog_post.php b/print_blog_post.php
index 91cf351..40d1855 100644
--- a/print_blog_post.php
+++ b/print_blog_post.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/print_blog_post.php,v 1.15 2007/04/23 09:36:30 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/print_blog_post.php,v 1.16 2007/05/16 16:47:07 wjames5 Exp $
* @package blogs
* @subpackage functions
@@ -14,8 +14,6 @@
*/
require_once( '../bit_setup_inc.php' );
-//DEPRICATED - we do everything by post id without blog reference now - see URI note below if wanting to add option in -wjames5
-//include_once( BLOGS_PKG_PATH.'BitBlog.php' );
include_once( BLOGS_PKG_PATH.'BitBlogPost.php' );
$gBitSystem->verifyPackage( 'blogs' );
@@ -59,14 +57,6 @@ $gBitSmarty->assign( 'parsed_data', $gContent->parseData() );
$gBitSystem->verifyPermission( 'p_blogs_view' );
-/*DEPRECATED - blog_user_id does not exist ownsblog is not even used in print_blog_post.tpl
-$ownsblog = 'n';
-if ($gBitUser->mUserId && $gBitUser->mUserId == $gContent->mInfo['blog_user_id'] ) {
- $ownsblog = 'y';
-}
-$gBitSmarty->assign('ownsblog', $ownsblog);
-*/
-
if ($gBitSystem->isFeatureActive( 'blog_posts_comments' )) {
$comments_return_url = $_SERVER['PHP_SELF']."?post_id=".$gContent->getField( 'post_id' );
$commentsParentId = $gContent->mContentId;
diff --git a/send_post.php b/send_post.php
index 59ab98d..5f61cc8 100644
--- a/send_post.php
+++ b/send_post.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/send_post.php,v 1.19 2007/04/23 09:36:30 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/send_post.php,v 1.20 2007/05/16 16:47:07 wjames5 Exp $
* @package blogs
* @subpackage functions
@@ -15,8 +15,6 @@
*/
require_once( '../bit_setup_inc.php' );
-//DEPRICATED - we do everything by post id without blog reference now -wjames5
-//include_once( BLOGS_PKG_PATH.'BitBlog.php' );
include_once( BLOGS_PKG_PATH.'BitBlogPost.php' );
$gBitSystem->verifyPermission( 'p_blogs_send_post' );
diff --git a/view_post.php b/view_post.php
index 5477632..48e0f14 100644
--- a/view_post.php
+++ b/view_post.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_blogs/view_post.php,v 1.8 2007/05/05 19:14:20 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_blogs/view_post.php,v 1.9 2007/05/16 16:47:07 wjames5 Exp $
* @package blogs
* @subpackage functions
@@ -36,28 +36,4 @@ include_once( BLOGS_PKG_PATH.'display_bitblogpost_inc.php' );
if( $gContent->isValid() ) {
$gContent->addHit();
}
-
-
-// This is what Articles would do instead of calling display_bitblogpost_inc -wjames5
-/*
-//$gBitSmarty->assign_by_ref( 'post_info', $gContent->mInfo );
-
-// get all the services that want to display something on this page
-$displayHash = array( 'perm_name' => 'p_blogs_view' );
-$gContent->invokeServices( 'content_display_function', $displayHash );
-
-// Comments engine!
-if( @$gContent->mInfo['allow_comments'] == 'y' ) {
- $comments_vars = Array( 'post' );
- $comments_prefix_var='post:';
- $comments_object_var='post';
- $commentsParentId = $gContent->mContentId;
- $comments_return_url = $_SERVER['PHP_SELF']."?post_id=".$_REQUEST['post_id'];
- include_once( LIBERTY_PKG_PATH.'comments_inc.php' );
-}
-
-// Display the Index Template
-$gBitSystem->display( 'bitpackage:blogs/view_blog_post.tpl', @$gContent->mInfo['title'] );
-*/
-
?>