summaryrefslogtreecommitdiff
path: root/lookup_page_inc.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2008-10-18 17:11:14 +0000
committerMax Kremmel <xing@synapse.plus.com>2008-10-18 17:11:14 +0000
commit1321e4b99240703e80391bad8ddf8b612a1111f8 (patch)
tree3c74b4e9dd77c6eae4e922451359d6bc7f2f3dc4 /lookup_page_inc.php
parente09f2dedd9e1e026a96eb73c8bd09ba1e20326d2 (diff)
downloadwiki-1321e4b99240703e80391bad8ddf8b612a1111f8.tar.gz
wiki-1321e4b99240703e80391bad8ddf8b612a1111f8.tar.bz2
wiki-1321e4b99240703e80391bad8ddf8b612a1111f8.zip
remove mostly broken semaphore code. we have a semaphore package to take care of this feature now.pre_update_permission
Diffstat (limited to 'lookup_page_inc.php')
-rw-r--r--lookup_page_inc.php58
1 files changed, 2 insertions, 56 deletions
diff --git a/lookup_page_inc.php b/lookup_page_inc.php
index 734f34b..cc329e9 100644
--- a/lookup_page_inc.php
+++ b/lookup_page_inc.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/lookup_page_inc.php,v 1.25 2008/06/25 22:21:29 spiderr Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/lookup_page_inc.php,v 1.26 2008/10/18 17:11:14 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: lookup_page_inc.php,v 1.25 2008/06/25 22:21:29 spiderr Exp $
+ * $Id: lookup_page_inc.php,v 1.26 2008/10/18 17:11:14 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -85,60 +85,6 @@ if( $gContent->isValid() && $gBitSystem->isPackageActive( 'stickies' ) ) {
$gBitSmarty->assign_by_ref( 'stickyInfo', $gNote->mInfo );
}
-// if we are looking up a page
-if( $gBitSystem->isFeatureActive( 'warn_on_edit' ) && $gContent->isValid() ) {
- // Notice if a page is being edited or if it was being edited and not anymore
- // print($GLOBALS["HTTP_REFERER"]);
- // IF isset the referer and if the referer is editpage then unset taking the pagename from the
- // query or homepage if not query
- if (isset($_SERVER['HTTP_REFERER']) && (strstr($_SERVER['HTTP_REFERER'], WIKI_PKG_URL.'edit') ) ) {
- $purl = parse_url($_SERVER['HTTP_REFERER']);
-
- if (!isset($purl["query"])) {
- $purl["query"] = '';
- }
-
- parse_str($purl["query"], $purlquery);
-
- if (!isset($purlquery["page"])) {
- $purlquery["page"] = $gBitSystem->getConfig( 'wiki_home_page' );
- }
-
- if (isset($_SESSION["edit_lock"])) {
- // TODO - find out if this function is supposed to exist - wolff_borg
- //$gBitUser->expungeSemaphore($purlquery["page"], $_SESSION["edit_lock"]);
- }
- }
-
- if (strstr($_SERVER['REQUEST_URI'], WIKI_PKG_URL . 'edit')) {
- $purl = parse_url($_SERVER['REQUEST_URI']);
-
- if (!isset($purl["query"])) {
- $purl["query"] = '';
- }
-
- parse_str($purl["query"], $purlquery);
-
- // When WIKI_PKG_URL.'edit.php' is loading, check to see if there is an editing conflict
- if( $gBitUser->hasSemaphoreConflict( $gContent->mContentId, $gBitSystem->getConfig( 'wiki_warn_on_edit_time' ) * 60 ) ) {
- $gBitSmarty->assign('editpageconflict', 'y');
- } else {
- if (!(isset($lookupHash['save'])) && $gContent->isValid() ) {
- $_SESSION["edit_lock"] = $gBitUser->storeSemaphore( $gContent->mContentId );
- $gBitSmarty->assign('editpageconflict', 'n');
- }
- }
- }
-
- if( $semUser = $gBitUser->hasSemaphoreConflict( $gContent->mContentId, $gBitSystem->getConfig( 'wiki_warn_on_edit_time' ) * 60 ) ) {
- $gContent->mErrors['edit_conflict'] = 'This page is being edited by '.$gBitUser->getDisplayName( TRUE, $semUser ).'. Proceed at your own peril';
- $gBitSmarty->assign( 'semUser', $semUser );
- $beingedited = 'y';
- } else {
- $beingedited = 'n';
- }
- $gBitSmarty->assign('beingEdited', $beingedited);
-}
$gBitSmarty->clear_assign( 'gContent' );
$gBitSmarty->assign_by_ref( 'gContent', $gContent );
?>