summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-01-10 21:19:20 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-01-10 21:19:20 +0000
commitab2efc4600d5f1c61ebf30a05c0bb0ee09ccc5cc (patch)
tree760ed8925d6bbed30eca9069904fcef6a722124e
parente142f1af7040016c0d076ba7b7d659b8ec2485f3 (diff)
downloadwiki-ab2efc4600d5f1c61ebf30a05c0bb0ee09ccc5cc.tar.gz
wiki-ab2efc4600d5f1c61ebf30a05c0bb0ee09ccc5cc.tar.bz2
wiki-ab2efc4600d5f1c61ebf30a05c0bb0ee09ccc5cc.zip
merge recent changes into HEAD
-rw-r--r--BitPage.php10
-rw-r--r--admin/schema_inc.php6
-rw-r--r--admin/upgrade_inc.php9
-rw-r--r--edit_book.php8
-rw-r--r--lookup_page_inc.php15
-rw-r--r--templates/center_wiki_page.php15
-rw-r--r--templates/center_wiki_page.tpl2
-rw-r--r--templates/edit_page.tpl4
-rw-r--r--templates/s5.tpl8
9 files changed, 34 insertions, 43 deletions
diff --git a/BitPage.php b/BitPage.php
index 4fef787..7677ee6 100644
--- a/BitPage.php
+++ b/BitPage.php
@@ -1,11 +1,11 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_wiki/BitPage.php,v 1.14 2005/12/26 12:27:43 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_wiki/BitPage.php,v 1.15 2006/01/10 21:19:20 squareing Exp $
* @package wiki
*
* @author spider <spider@steelsun.com>
*
- * @version $Revision: 1.14 $ $Date: 2005/12/26 12:27:43 $ $Author: squareing $
+ * @version $Revision: 1.15 $ $Date: 2006/01/10 21:19:20 $ $Author: squareing $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -13,7 +13,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: BitPage.php,v 1.14 2005/12/26 12:27:43 squareing Exp $
+ * $Id: BitPage.php,v 1.15 2006/01/10 21:19:20 squareing Exp $
*/
/**
@@ -473,10 +473,10 @@ class BitPage extends LibertyAttachable {
if( is_array( $pExistsHash ) ) {
if( is_array( current( $pExistsHash ) ) ) {
$exists = $pExistsHash[0];
- $multiple = true;
+ $multiple = false;
} else {
$exists = $pExistsHash;
- $multiple = false;
+ $multiple = true;
}
// we have a multi-demensional array (likely returned from LibertyContent::pageExists() ) - meaning we potentially have multiple pages with the same name
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index b4eb20b..4210e86 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -88,12 +88,6 @@ $tables = array(
flag C(1)
",
-'tiki_semaphores' => "
- sem_name C(250) PRIMARY,
- user_id I4 NOTNULL,
- created I8
-",
-
'tiki_extwiki' => "
extwiki_id I4 AUTO PRIMARY,
name C(200) NOTNULL,
diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php
index 7bd6369..0ae13a5 100644
--- a/admin/upgrade_inc.php
+++ b/admin/upgrade_inc.php
@@ -33,8 +33,6 @@ array( 'RENAMECOLUMN' => array(
'tiki_history' => array( '`lastModif`' => '`last_modified` I8' ),
'tiki_copyrights' => array( '`copyrightId`' => '`copyright_id` I4 AUTO' ),
'tiki_extwiki' => array( '`extwikiId`' => '`extwiki_id` I4 AUTO' ),
- 'tiki_semaphores' => array( '`semName`' => '`sem_name` C(250)',
- '`timestamp`' => '`created` I8' ),
'tiki_tags' => array( '`tagName`' => '`tag_name` C(80)',
'`pageName`' => '`page_name` C(160)',
'`lastModif`' => '`last_modified` I8' ),
@@ -64,9 +62,6 @@ array( 'ALTER' => array(
'from_content_id' => array( '`from_content_id`', 'I4' ), // , 'NOTNULL' ),
'to_content_id' => array( '`to_content_id`', 'I4' ), // , 'NOTNULL' ),
),
- 'tiki_semaphores' => array(
- 'user_id' => array( '`user_id`', 'I4' ), // , 'NOTNULL' ),
- ),
)),
)),
@@ -122,8 +117,6 @@ array( 'QUERY' =>
"UPDATE `".BIT_DB_PREFIX."tiki_history` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_history`.`user`)",
"UPDATE `".BIT_DB_PREFIX."tiki_history` SET `user_id`=".ROOT_USER_ID." WHERE `user_id` IS NULL",
"UPDATE `".BIT_DB_PREFIX."tiki_structures` SET `content_id`= (SELECT `content_id` FROM `".BIT_DB_PREFIX."tiki_pages` tp WHERE tp.`page_id`=`".BIT_DB_PREFIX."tiki_structures`.`page_id`)",
- "UPDATE `".BIT_DB_PREFIX."tiki_semaphores` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_semaphores`.`user`)",
- "UPDATE `".BIT_DB_PREFIX."tiki_semaphores` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_semaphores`.`user`)",
"UPDATE `".BIT_DB_PREFIX."tiki_copyrights` SET `page_id`= (SELECT `page_id` FROM `".BIT_DB_PREFIX."tiki_pages` tp WHERE tp.`pageName`=`".BIT_DB_PREFIX."tiki_copyrights`.`page`)",
"UPDATE `".BIT_DB_PREFIX."tiki_copyrights` SET `user_id`=(SELECT `user_id` FROM `".BIT_DB_PREFIX."users_users` WHERE `".BIT_DB_PREFIX."users_users`.`login`=`".BIT_DB_PREFIX."tiki_copyrights`.`userName`)",
"UPDATE `".BIT_DB_PREFIX."tiki_copyrights` SET `user_id`=".ROOT_USER_ID." WHERE `user_id` IS NULL",
@@ -234,7 +227,6 @@ array( 'PHP' => '
array( 'DATADICT' => array(
array( 'DROPCOLUMN' => array(
'tiki_pages' => array( '`lastModif`', '`data`', '`pageName`', '`ip`', '`hits`', '`user`', '`creator`' ),
- 'tiki_semaphores' => array( '`user`' ),
'tiki_copyrights' => array( '`userName`', '`page`' ),
'tiki_page_footnotes' => array( '`user`', '`pageName`' ),
'tiki_actionlog' => array( '`user`', '`pageName`' ),
@@ -260,7 +252,6 @@ array( 'CREATEINDEX' => array(
'tiki_links_to_idx' => array( 'tiki_links', '`to_content_id`', array() ),
'tiki_links_ft_idx' => array( 'tiki_links', '`from_content_id`,`to_content_id`', array( 'UNIQUE' ) ),
'tiki_pages_content_idx' => array( 'tiki_pages', '`content_id`', array( 'UNIQUE' ) ),
- 'tiki_sema_user_idx' => array( 'tiki_semaphores', '`user_id`', array() ),
)),
)),
diff --git a/edit_book.php b/edit_book.php
index d17c914..8a83b86 100644
--- a/edit_book.php
+++ b/edit_book.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/edit_book.php,v 1.6 2005/12/26 12:27:43 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/edit_book.php,v 1.7 2006/01/10 21:19:20 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_book.php,v 1.6 2005/12/26 12:27:43 squareing Exp $
+ * $Id: edit_book.php,v 1.7 2006/01/10 21:19:20 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -97,6 +97,9 @@ if( isset($_REQUEST["createstructure"]) ) {
$_REQUEST['content_type'] = !isset( $_REQUEST['content_type'] ) ? 'bitpage' : $_REQUEST['content_type'];
// verify the book permission on structure load
$verifyStructurePermission = 'bit_p_admin_books';
+ // load the javascript dynamic tree
+ $gBitSmarty->assign( "loadDynamicTree", TRUE );
+ // set the correct display template
$mid = 'bitpackage:wiki/edit_book.tpl';
include_once( LIBERTY_PKG_PATH.'edit_structure_inc.php');
} else {
@@ -106,5 +109,4 @@ if( isset($_REQUEST["createstructure"]) ) {
$gBitSystem->setBrowserTitle( !empty($gStructure) ? 'Edit Wiki Book:'.$gStructure->mInfo["title"] : NULL );
// Display the template
$gBitSystem->display( $mid );
-
?>
diff --git a/lookup_page_inc.php b/lookup_page_inc.php
index b97cc4d..532f896 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.5 2005/12/26 12:27:43 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/lookup_page_inc.php,v 1.6 2006/01/10 21:19:20 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.5 2005/12/26 12:27:43 squareing Exp $
+ * $Id: lookup_page_inc.php,v 1.6 2006/01/10 21:19:20 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -22,7 +22,7 @@
include_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' );
// if we already have a gContent, we assume someone else created it for us, and has properly loaded everything up.
- if( empty( $gContent ) || !is_object( $gContent ) ) {
+// if( empty( $gContent ) || !is_object( $gContent ) || !$gContent->isValid() ) {
$gContent = new BitPage( @BitBase::verifyId( $_REQUEST['page_id'] ) ? $_REQUEST['page_id'] : NULL, @BitBase::verifyId( $_REQUEST['content_id'] ) ? $_REQUEST['content_id'] : NULL );
$loadPage = (!empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : NULL);
@@ -46,9 +46,7 @@
if( !$gContent->load() && $loadPage ) {
$gContent->mInfo['title'] = $loadPage;
}
- $gBitSmarty->assign_by_ref( 'gContent', $gContent );
- $gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
- }
+// }
// we weren't passed a structure, but maybe this page belongs to one. let's check...
if( empty( $gStructure ) ) {
@@ -132,5 +130,8 @@
$beingedited = 'n';
}
$gBitSmarty->assign('beingEdited', $beingedited);
- }
+ }
+ $gBitSmarty->clear_assign( 'gContent' );
+ $gBitSmarty->assign( 'gContent', $gContent );
+ $gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
?>
diff --git a/templates/center_wiki_page.php b/templates/center_wiki_page.php
index c8a5be0..c275ded 100644
--- a/templates/center_wiki_page.php
+++ b/templates/center_wiki_page.php
@@ -1,5 +1,5 @@
<?php
-global $modlib, $gQueryUserId, $gBitSmarty, $fHomepage;
+global $modlib, $gQueryUserId, $gBitSmarty, $fHomepage, $gBitSystem, $module_params, $module_rows;
$errors = array();
$success = array();
@@ -17,13 +17,16 @@ if (!empty($_REQUEST['fSubmitCenterWikiPageSettings'])) {
}
// Get Parameters Assigned to this module
-$modParams = $modlib->get_module_params('bitpackage:wiki/center_wiki_page.tpl', $gQueryUserId);
-$gBitSmarty->assign_by_ref('modParams', $modParams);
+if( !empty( $gQueryUserId ) ) {
+ $module_params = $modlib->get_module_params('bitpackage:wiki/center_wiki_page.tpl', $gQueryUserId);
+} else {
+}
+$gBitSmarty->assign_by_ref('modParams', $module_params);
// Load up the correct wiki page
-$_REQUEST['page_id'] = ( !empty( $modParams['page_id'] ) ? $modParams['page_id'] : NULL );
-$_REQUEST['content_id'] = ( !empty( $modParams['content_id'] ) ? $modParams['content_id'] : NULL );
-$_REQUEST['page'] = ( !empty( $modParams['page'] ) ? $modParams['page'] : 'HomePage' );
+$_REQUEST['page_id'] = ( !empty( $module_params['page_id'] ) ? $module_params['page_id'] : NULL );
+$_REQUEST['content_id'] = ( !empty( $module_params['content_id'] ) ? $module_params['content_id'] : NULL );
+$_REQUEST['page'] = ( !empty( $module_params['page'] ) ? $module_params['page'] : 'HomePage' );
include_once( WIKI_PKG_PATH."lookup_page_inc.php" );
// Parse the wiki page data (This should be done by BitPage->load shouldn't it?)
diff --git a/templates/center_wiki_page.tpl b/templates/center_wiki_page.tpl
index e4bee91..b9cf229 100644
--- a/templates/center_wiki_page.tpl
+++ b/templates/center_wiki_page.tpl
@@ -34,7 +34,7 @@
{/if}
<div class="display wikipage">
- {if $modParams.display_title}
+ {if $gContent->mInfo.title}
<div class="header"><h1>{$gContent->mInfo.title}</h1></div>
{/if}
<div class="content">
diff --git a/templates/edit_page.tpl b/templates/edit_page.tpl
index 252b2c8..6fbadf9 100644
--- a/templates/edit_page.tpl
+++ b/templates/edit_page.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/edit_page.tpl,v 1.12 2005/12/05 23:56:06 squareing Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_wiki/templates/edit_page.tpl,v 1.13 2006/01/10 21:19:20 squareing Exp $ *}
<div class="floaticon">{bithelp}</div>
<div class="edit wiki">
@@ -74,7 +74,7 @@
<div class="row">
{formlabel label="Description" for="description"}
{forminput}
- <input size="50" type="text" maxlength="200" name="description" id="description" value="{$pageInfo.description}" />
+ <input size="50" type="text" maxlength="200" name="description" id="description" value="{$pageInfo.description|escape:html}" />
{formhelp note="Brief description of the page. This is visible when you hover over a link to this page and just below the title of the wiki page."}
{/forminput}
</div>
diff --git a/templates/s5.tpl b/templates/s5.tpl
index 61bc60f..afb88f4 100644
--- a/templates/s5.tpl
+++ b/templates/s5.tpl
@@ -9,10 +9,10 @@
<meta name="presdate" content="20041007" />
<meta name="author" content="{displayname user_id=`$gContent->mInfo.user_id` nolink='yes'}" />
<meta name="company" content="" />
- <link rel="stylesheet" href="{$smarty.const.THEMES_PKG_URL}s5/i18n/slides.css" type="text/css" media="projection" id="slideProj" />
- <link rel="stylesheet" href="{$smarty.const.THEMES_PKG_URL}s5/i18n/print.css" type="text/css" media="print" id="slidePrint" />
- <link rel="stylesheet" href="{$smarty.const.THEMES_PKG_URL}s5/opera.css" type="text/css" media="projection" id="operaFix" />
- <script src="{$smarty.const.THEMES_PKG_URL}s5/slides.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="{$smarty.const.UTIL_PKG_URL}s5/i18n/slides.css" type="text/css" media="projection" id="slideProj" />
+ <link rel="stylesheet" href="{$smarty.const.UTIL_PKG_URL}s5/i18n/print.css" type="text/css" media="print" id="slidePrint" />
+ <link rel="stylesheet" href="{$smarty.const.UTIL_PKG_URL}s5/opera.css" type="text/css" media="projection" id="operaFix" />
+ <script src="{$smarty.const.UTIL_PKG_URL}s5/slides.js" type="text/javascript"></script>
</head>
<body>
<div class="layout">