summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-02-04 19:04:35 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-02-04 19:04:35 +0000
commit9f3cb07ad3776f9a8449cf13d88ad2c4f7674b58 (patch)
tree0cfc36104c896b23703a853c742dfd0795e4ce14
parent503e4e250107a7f049a9dede31da5b94b82d8f14 (diff)
downloadwiki-9f3cb07ad3776f9a8449cf13d88ad2c4f7674b58.tar.gz
wiki-9f3cb07ad3776f9a8449cf13d88ad2c4f7674b58.tar.bz2
wiki-9f3cb07ad3776f9a8449cf13d88ad2c4f7674b58.zip
remove more outdated code: $section and other old template assignments
-rw-r--r--backlinks.php5
-rw-r--r--display_bitpage_inc.php117
-rw-r--r--edit.php5
-rw-r--r--like_pages.php5
-rw-r--r--page.php5
-rw-r--r--page_permissions.php5
-rw-r--r--print.php26
-rw-r--r--rename_page.php7
-rw-r--r--rollback.php5
-rwxr-xr-xslideshow.php14
10 files changed, 73 insertions, 121 deletions
diff --git a/backlinks.php b/backlinks.php
index 673d370..23e45de 100644
--- a/backlinks.php
+++ b/backlinks.php
@@ -3,13 +3,13 @@
* assigned_modules
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package wiki
* @subpackage functions
* @copyright Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
* @license Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
*/
-// $Header: /cvsroot/bitweaver/_bit_wiki/backlinks.php,v 1.4 2006/01/27 21:57:53 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_wiki/backlinks.php,v 1.5 2006/02/04 19:04:34 squareing Exp $
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
/**
@@ -49,5 +49,4 @@ $gBitSmarty->assign_by_ref('backlinks', $backlinks);
// Display the template
$gBitSystem->display( 'bitpackage:wiki/backlinks.tpl');
-$gBitSmarty->assign('show_page_bar', 'y');
?>
diff --git a/display_bitpage_inc.php b/display_bitpage_inc.php
index 69ee3f1..4bb5926 100644
--- a/display_bitpage_inc.php
+++ b/display_bitpage_inc.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/display_bitpage_inc.php,v 1.13 2006/02/03 12:40:22 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/display_bitpage_inc.php,v 1.14 2006/02/04 19:04:34 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: display_bitpage_inc.php,v 1.13 2006/02/03 12:40:22 squareing Exp $
+ * $Id: display_bitpage_inc.php,v 1.14 2006/02/04 19:04:34 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -217,52 +217,51 @@ if( $gBitSystem->isFeatureActive( 'feature_wiki_comments' ) ) {
include_once( LIBERTY_PKG_PATH.'comments_inc.php' );
}
-$section='wiki';
if( $gBitSystem->isFeatureActive( 'feature_wiki_attachments' ) ) {
- if(isset($_REQUEST["removeattach"])) {
+ if(isset($_REQUEST["removeattach"])) {
- $owner = $wikilib->get_attachment_owner($_REQUEST["removeattach"]);
- if( ($user && ($owner == $user) ) || ($gBitUser->hasPermission( 'bit_p_wiki_admin_attachments' )) ) {
- $wikilib->remove_wiki_attachment($_REQUEST["removeattach"]);
- }
- }
- if(isset($_REQUEST["attach"]) && ($gBitUser->hasPermission( 'bit_p_wiki_admin_attachments' ) || $gBitUser->hasPermission( 'bit_p_wiki_attach_files' ))) {
+ $owner = $wikilib->get_attachment_owner($_REQUEST["removeattach"]);
+ if( ($user && ($owner == $user) ) || ($gBitUser->hasPermission( 'bit_p_wiki_admin_attachments' )) ) {
+ $wikilib->remove_wiki_attachment($_REQUEST["removeattach"]);
+ }
+ }
+ if(isset($_REQUEST["attach"]) && ($gBitUser->hasPermission( 'bit_p_wiki_admin_attachments' ) || $gBitUser->hasPermission( 'bit_p_wiki_attach_files' ))) {
- // Process an attachment here
- if(isset($_FILES['userfile1'])&&is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
- $fp = fopen($_FILES['userfile1']['tmp_name'],"rb");
- $data = '';
- $fhash='';
- if($w_use_db == 'n') {
- $fhash = md5($name = $_FILES['userfile1']['name']);
- $fw = fopen($w_use_dir.$fhash,"wb");
- if(!$fw) {
- $gBitSmarty->assign('msg',tra('Cannot write to this file:').$fhash);
- $gBitSystem->display( 'error.tpl' );
- die;
- }
- }
- while(!feof($fp)) {
- if($w_use_db == 'y') {
- $data .= fread($fp,8192*16);
- } else {
- $data = fread($fp,8192*16);
- fwrite($fw,$data);
- }
- }
- fclose($fp);
- if($w_use_db == 'n') {
- fclose($fw);
- $data='';
- }
- $size = $_FILES['userfile1']['size'];
- $name = $_FILES['userfile1']['name'];
- $type = $_FILES['userfile1']['type'];
- $wikilib->wiki_attach_file($gContent->mInfo['title'],$name,$type,$size, $data, $_REQUEST["attach_comment"], $user,$fhash);
- }
- }
- $gBitSmarty->assign('atts',$gContent->mStorage);
- $gBitSmarty->assign('atts_count',count($gContent->mStorage));
+ // Process an attachment here
+ if(isset($_FILES['userfile1'])&&is_uploaded_file($_FILES['userfile1']['tmp_name'])) {
+ $fp = fopen($_FILES['userfile1']['tmp_name'],"rb");
+ $data = '';
+ $fhash='';
+ if($w_use_db == 'n') {
+ $fhash = md5($name = $_FILES['userfile1']['name']);
+ $fw = fopen($w_use_dir.$fhash,"wb");
+ if(!$fw) {
+ $gBitSmarty->assign('msg',tra('Cannot write to this file:').$fhash);
+ $gBitSystem->display( 'error.tpl' );
+ die;
+ }
+ }
+ while(!feof($fp)) {
+ if($w_use_db == 'y') {
+ $data .= fread($fp,8192*16);
+ } else {
+ $data = fread($fp,8192*16);
+ fwrite($fw,$data);
+ }
+ }
+ fclose($fp);
+ if($w_use_db == 'n') {
+ fclose($fw);
+ $data='';
+ }
+ $size = $_FILES['userfile1']['size'];
+ $name = $_FILES['userfile1']['name'];
+ $type = $_FILES['userfile1']['type'];
+ $wikilib->wiki_attach_file($gContent->mInfo['title'],$name,$type,$size, $data, $_REQUEST["attach_comment"], $user,$fhash);
+ }
+ }
+ $gBitSmarty->assign('atts',$gContent->mStorage);
+ $gBitSmarty->assign('atts_count',count($gContent->mStorage));
}
if( $gBitSystem->isFeatureActive( 'feature_wiki_footnotes' ) && $gBitUser->isValid() ) {
@@ -277,7 +276,6 @@ if( $gBitSystem->isFeatureActive( 'wiki_feature_copyrights' ) ) {
$gBitSmarty->assign('pageCopyrights', $copyrights["data"]);
}
-$gBitSmarty->assign('wiki_extras','y');
// Watches
if( $gBitSystem->isFeatureActive( 'feature_user_watches' ) ) {
if( isset( $_REQUEST['watch_event'] ) ) {
@@ -299,35 +297,8 @@ if( $gBitSystem->isFeatureActive( 'feature_user_watches' ) ) {
}
}
$sameurl_elements=Array('title','page');
-//echo $gContent->mInfo["data"];
-if(isset($_REQUEST['mode']) && $_REQUEST['mode']=='mobile') {
-/*
- require_once(HAWHAW_PKG_PATH."hawhaw.inc");
- require_once(HAWHAW_PKG_PATH."hawiki_cfg.inc");
- require_once(HAWHAW_PKG_PATH."hawiki_parser.inc");
- require_once(HAWHAW_PKG_PATH."hawiki.inc");
- error_reporting(E_ALL & ~E_NOTICE);
- $myWiki = new HAWIKI_page($gContent->mInfo["data"], WIKI_PKG_URL."index.php?mode=mobile&page=");
- $myWiki->set_navlink(tra("Home Page"), WIKI_PKG_URL."index.php?mode=mobile", HAWIKI_NAVLINK_TOP | HAWIKI_NAVLINK_BOTTOM);
- $myWiki->set_navlink(tra("Menu"), HAWHAW_PKG_URL."mobile.php", HAWIKI_NAVLINK_TOP | HAWIKI_NAVLINK_BOTTOM);
- $myWiki->set_smiley_dir("img/smiles");
- $myWiki->set_link_jingle(HAWHAW_PKG_PATH."link.wav");
- $myWiki->set_hawimconv(HAWHAW_PKG_PATH."hawimconv.php");
- $myWiki->display();
- die;
- */
- include_once( HAWHAW_PKG_PATH."hawtiki_lib.php" );
- HAWBIT_index($gContent->mInfo);
-}
-
-// Flag for 'page bar' that currently 'Page view' mode active
-// so it is needed to show comments & attachments panels
-$gBitSmarty->assign('show_page','y');
// Display the Index Template
-$gBitSmarty->assign('dblclickedit','y');
-$gBitSmarty->assign('print_page','n');
-$gBitSmarty->assign('show_page_bar','y');
$gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
if( isset( $_REQUEST['s5'] ) ) {
diff --git a/edit.php b/edit.php
index 619fb1b..772275a 100644
--- a/edit.php
+++ b/edit.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/edit.php,v 1.14 2006/02/02 10:32:23 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/edit.php,v 1.15 2006/02/04 19:04:34 squareing Exp $
*
* Copyright( c ) 2004 bitweaver.org
* Copyright( c ) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: edit.php,v 1.14 2006/02/02 10:32:23 squareing Exp $
+ * $Id: edit.php,v 1.15 2006/02/04 19:04:34 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -435,7 +435,6 @@ $formInfo['original_title'] =( !empty( $gContent->mInfo['title'] ) ) ? $gContent
$gBitSmarty->assign_by_ref( 'pageInfo', $formInfo );
$gBitSmarty->assign_by_ref( 'errors', $gContent->mErrors );
-$gBitSmarty->assign( 'show_page_bar', 'y' );
// load the ajax library for this page
$gBitSmarty->assign( 'loadAjax', TRUE );
diff --git a/like_pages.php b/like_pages.php
index 22496f1..b8cffe5 100644
--- a/like_pages.php
+++ b/like_pages.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/like_pages.php,v 1.4 2006/01/27 21:57:53 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/like_pages.php,v 1.5 2006/02/04 19:04:34 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: like_pages.php,v 1.4 2006/01/27 21:57:53 squareing Exp $
+ * $Id: like_pages.php,v 1.5 2006/02/04 19:04:34 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -36,5 +36,4 @@ $gBitSmarty->assign_by_ref('likepages', $likepages);
// Display the template
$gBitSystem->display( 'bitpackage:wiki/like_pages.tpl');
-$gBitSmarty->assign('show_page_bar', 'y');
?>
diff --git a/page.php b/page.php
index 3abc7d2..b78b1a7 100644
--- a/page.php
+++ b/page.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/page.php,v 1.4 2006/01/27 21:57:53 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/page.php,v 1.5 2006/02/04 19:04:34 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: page.php,v 1.4 2006/01/27 21:57:53 squareing Exp $
+ * $Id: page.php,v 1.5 2006/02/04 19:04:34 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -33,7 +33,6 @@ $gBitSmarty->assign('refresh', $page_data["refresh"]);
$gBitSmarty->assign('title', $_REQUEST["title"]);
$parsed = $htmlpageslib->parse_html_page($_REQUEST["title"], $page_data["content"]);
$gBitSmarty->assign_by_ref('parsed', $parsed);
-$section = 'html_pages';
// Display the template
$gBitSystem->display( 'bitpackage:wiki/page.tpl');
diff --git a/page_permissions.php b/page_permissions.php
index e279845..084c4ed 100644
--- a/page_permissions.php
+++ b/page_permissions.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/page_permissions.php,v 1.4 2006/01/27 21:57:53 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/page_permissions.php,v 1.5 2006/02/04 19:04:35 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: page_permissions.php,v 1.4 2006/01/27 21:57:53 squareing Exp $
+ * $Id: page_permissions.php,v 1.5 2006/02/04 19:04:35 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -97,6 +97,5 @@ $gBitSmarty->assign_by_ref('perms', $perms);
$gBitSmarty->assign( (!empty( $_REQUEST['tab'] ) ? $_REQUEST['tab'] : 'permissions').'TabSelect', 'tdefault' );
-$gBitSmarty->assign('show_page_bar', 'y');
$gBitSystem->display( 'bitpackage:wiki/page_permissions.tpl');
?>
diff --git a/print.php b/print.php
index e891b81..e923d93 100644
--- a/print.php
+++ b/print.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/print.php,v 1.6 2006/01/27 23:01:24 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/print.php,v 1.7 2006/02/04 19:04:35 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: print.php,v 1.6 2006/01/27 23:01:24 squareing Exp $
+ * $Id: print.php,v 1.7 2006/02/04 19:04:35 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -66,17 +66,17 @@ if ($info["flag"] == 'L') {
$gBitSmarty->assign('cached_page','n');
if(isset($gContent->mInfo['wiki_cache']) && $gContent->mInfo['wiki_cache']>0) {$wiki_cache=$gContent->mInfo['wiki_cache'];}
if($wiki_cache>0) {
- $cache_info = $wikilib->get_cache_info($page);
- $now = $gBitSystem->getUTCTime();
- if($cache_info['cache_timestamp']+$wiki_cache > $now) {
- $pdata = $cache_info['cache'];
- $gBitSmarty->assign('cached_page','y');
- } else {
- $pdata = $gContent->parseData();
- $wikilib->update_cache($page,$pdata);
- }
+ $cache_info = $wikilib->get_cache_info($page);
+ $now = $gBitSystem->getUTCTime();
+ if($cache_info['cache_timestamp']+$wiki_cache > $now) {
+ $pdata = $cache_info['cache'];
+ $gBitSmarty->assign('cached_page','y');
+ } else {
+ $pdata = $gContent->parseData();
+ $wikilib->update_cache($page,$pdata);
+ }
} else {
- $pdata = $gContent->parseData();
+ $pdata = $gContent->parseData();
}
$gBitSmarty->assign_by_ref('parsed', $pdata);
$gBitSmarty->assign_by_ref('last_modified', $info["last_modified"]);
@@ -98,8 +98,6 @@ if ($http_domain) {
// Display the Index Template
$gBitSmarty->assign('print_page','y');
-$gBitSystem->display( 'bitpackage:wiki/show_page.tpl');
$gBitSmarty->assign('show_page_bar', 'n');
-$gBitSmarty->assign('print_page', 'y');
$gBitSmarty->display("bitpackage:wiki/print.tpl");
?>
diff --git a/rename_page.php b/rename_page.php
index 95abaaa..5b4c8f2 100644
--- a/rename_page.php
+++ b/rename_page.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/rename_page.php,v 1.3 2005/08/01 18:42:04 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/rename_page.php,v 1.4 2006/02/04 19:04:35 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: rename_page.php,v 1.3 2005/08/01 18:42:04 squareing Exp $
+ * $Id: rename_page.php,v 1.4 2006/02/04 19:04:35 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -43,7 +43,7 @@ if (!$wikilib->pageExists($page,true)) { // true: casesensitive check here
die;
}
if (isset($_REQUEST["rename"])) {
-
+
if (!$wikilib->wiki_rename_page($_REQUEST['oldpage'], $_REQUEST['newpage'])) {
$gBitSmarty->assign('msg', tra("Cannot rename page maybe new page already exists"));
$gBitSystem->display( 'error.tpl' );
@@ -54,5 +54,4 @@ if (isset($_REQUEST["rename"])) {
}
$gBitSystem->display( 'bitpackage:wiki/rename_page.tpl');
-$gBitSmarty->assign('show_page_bar', 'y');
?>
diff --git a/rollback.php b/rollback.php
index e385245..b2af872 100644
--- a/rollback.php
+++ b/rollback.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/rollback.php,v 1.4 2005/08/01 18:42:04 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/rollback.php,v 1.5 2006/02/04 19:04:35 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: rollback.php,v 1.4 2005/08/01 18:42:04 squareing Exp $
+ * $Id: rollback.php,v 1.5 2006/02/04 19:04:35 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -57,5 +57,4 @@ if (isset($_REQUEST["rollback"])) {
}
}
$gBitSystem->display( 'bitpackage:wiki/rollback.tpl');
-$gBitSmarty->assign('show_page_bar', 'y');
?>
diff --git a/slideshow.php b/slideshow.php
index 4d21af3..32e9b12 100755
--- a/slideshow.php
+++ b/slideshow.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/slideshow.php,v 1.5 2005/08/30 22:40:17 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/slideshow.php,v 1.6 2006/02/04 19:04:35 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* 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: slideshow.php,v 1.5 2005/08/30 22:40:17 squareing Exp $
+ * $Id: slideshow.php,v 1.6 2006/02/04 19:04:35 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -186,15 +186,5 @@ if (empty($info["user"])) {
}
$gBitSmarty->assign_by_ref('lastUser', $info["user"]);
-
-$section = 'wiki';
-
-$gBitSmarty->assign('wiki_extras', 'y');
-
-
-
-// Display the Index Template
-$gBitSmarty->assign('show_page_bar', 'y');
$gBitSmarty->display("bitpackage:wiki/slideshow.tpl");
-
?>