summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-04-11 13:07:42 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-04-11 13:07:42 +0000
commit7bac05e60af272c8a945fa1e46eef69e19af9c17 (patch)
tree39010551a793831b806d03fc8095375d924fca1d
parent69c48ce3e78df188ae3eab99b0471a88e6ad92f4 (diff)
downloadpigeonholes-7bac05e60af272c8a945fa1e46eef69e19af9c17.tar.gz
pigeonholes-7bac05e60af272c8a945fa1e46eef69e19af9c17.tar.bz2
pigeonholes-7bac05e60af272c8a945fa1e46eef69e19af9c17.zip
rename permissions to new standard using: p_<package>_<verb>_[<noun>]
-rw-r--r--Pigeonholes.php12
-rw-r--r--admin/schema_inc.php6
-rw-r--r--assign_content.php6
-rw-r--r--bit_setup_inc.php4
-rw-r--r--edit_pigeonholes.php8
-rw-r--r--edit_structure.php8
-rw-r--r--list.php4
-rw-r--r--modules/mod_category_menu.php2
-rw-r--r--modules/mod_whats_related.php6
-rw-r--r--templates/list.tpl2
-rw-r--r--templates/menu_pigeonholes.tpl6
-rw-r--r--view.php8
12 files changed, 36 insertions, 36 deletions
diff --git a/Pigeonholes.php b/Pigeonholes.php
index 35fb92f..b35fc11 100644
--- a/Pigeonholes.php
+++ b/Pigeonholes.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.49 2006/03/01 20:16:23 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_pigeonholes/Pigeonholes.php,v 1.50 2006/04/11 13:07:41 squareing Exp $
*
* +----------------------------------------------------------------------+
* | Copyright ( c ) 2004, bitweaver.org
@@ -17,7 +17,7 @@
* Pigeonholes class
*
* @author xing <xing@synapse.plus.com>
- * @version $Revision: 1.49 $
+ * @version $Revision: 1.50 $
* @package pigeonholes
*/
@@ -803,7 +803,7 @@ function pigeonholes_content_display( &$pObject ) {
global $gBitSystem, $gBitSmarty, $gBitUser, $gPreviewStyle;
if( $gBitSystem->isFeatureActive( 'display_pigeonhole_members' ) || $gBitSystem->isFeatureActive( 'display_pigeonhole_path' ) ) {
$pigeonholes = new Pigeonholes();
- if( $gBitUser->hasPermission( 'bit_p_view_pigeonholes' ) ) {
+ if( $gBitUser->hasPermission( 'p_pigeonholes_view' ) ) {
if( $pigeons = $pigeonholes->getPigeonholesFromContentId( $pObject->mContentId ) ) {
foreach( $pigeons as $pigeon ) {
$pigeonholes->mContentId = $pigeon['content_id'];
@@ -829,7 +829,7 @@ function pigeonholes_content_edit( $pObject=NULL ) {
global $gBitSmarty, $gBitUser;
$pigeonPathList = array();
- if( $gBitUser->hasPermission( 'bit_p_insert_pigeonhole_member' ) ) {
+ if( $gBitUser->hasPermission( 'p_pigeonholes_insert_member' ) ) {
$pigeonholes = new Pigeonholes();
// get pigeonholes path list
@@ -848,7 +848,7 @@ function pigeonholes_content_preview() {
global $gBitSmarty, $gBitUser;
$pigeonPathList = array();
- if( $gBitUser->hasPermission( 'bit_p_insert_pigeonhole_member' ) ) {
+ if( $gBitUser->hasPermission( 'p_pigeonholes_insert_member' ) ) {
$pigeonholes = new Pigeonholes();
// get pigeonholes path list
@@ -867,7 +867,7 @@ function pigeonholes_content_preview() {
function pigeonholes_content_store( $pObject, $pParamHash ) {
global $gBitSmarty, $gBitUser;
- if( $gBitUser->hasPermission( 'bit_p_insert_pigeonhole_member' ) ) {
+ if( $gBitUser->hasPermission( 'p_pigeonholes_insert_member' ) ) {
if( !empty( $pParamHash['content_id'] ) ) {
if( is_object( $pObject ) && empty( $pParamHash['content_id'] ) ) {
$pParamHash['content_id'] = $pObject->mContentId;
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index f448715..84c6804 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -50,9 +50,9 @@ $gBitInstaller->registerPreferences( PIGEONHOLES_PKG_NAME, array(
// ### Default UserPermissions
$gBitInstaller->registerUserPermissions( PIGEONHOLES_PKG_NAME, array(
- array( 'bit_p_view_pigeonholes', 'Can view pigeonholes', 'basic', PIGEONHOLES_PKG_NAME ),
- array( 'bit_p_insert_pigeonhole_member', 'Can insert content into an existing pigeonhole', 'registered', PIGEONHOLES_PKG_NAME ),
- array( 'bit_p_edit_pigeonholes', 'Can edit pigeonholes', 'editors', PIGEONHOLES_PKG_NAME ),
+ array( 'p_pigeonholes_view', 'Can view pigeonholes', 'basic', PIGEONHOLES_PKG_NAME ),
+ array( 'p_pigeonholes_insert_member', 'Can insert content into an existing pigeonhole', 'registered', PIGEONHOLES_PKG_NAME ),
+ array( 'p_pigeonholes_edit', 'Can edit pigeonholes', 'editors', PIGEONHOLES_PKG_NAME ),
) );
?>
diff --git a/assign_content.php b/assign_content.php
index 62dd7cf..8c5d449 100644
--- a/assign_content.php
+++ b/assign_content.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_pigeonholes/assign_content.php,v 1.2 2006/02/04 12:18:31 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_pigeonholes/assign_content.php,v 1.3 2006/04/11 13:07:41 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: assign_content.php,v 1.2 2006/02/04 12:18:31 squareing Exp $
+ * $Id: assign_content.php,v 1.3 2006/04/11 13:07:41 squareing Exp $
* @package pigeonholes
* @subpackage functions
*/
@@ -19,7 +19,7 @@
require_once( '../bit_setup_inc.php' );
$gBitSystem->verifyPackage( 'pigeonholes' );
-$gBitSystem->verifyPermission( 'bit_p_insert_pigeonhole_member' );
+$gBitSystem->verifyPermission( 'p_pigeonholes_insert_member' );
include_once( PIGEONHOLES_PKG_PATH.'lookup_pigeonholes_inc.php' );
diff --git a/bit_setup_inc.php b/bit_setup_inc.php
index e61769b..5551eb2 100644
--- a/bit_setup_inc.php
+++ b/bit_setup_inc.php
@@ -1,7 +1,7 @@
<?php
/**
* @author xing <xing@synapse.plus.com>
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
* @package Pigeonholes
* @subpackage functions
*/
@@ -31,7 +31,7 @@ if( $gBitSystem->isPackageActive( 'pigeonholes' ) ) {
'content_nav_tpl' => 'bitpackage:pigeonholes/display_paths.tpl',
) );
- if( $gBitUser->hasPermission( 'bit_p_view_pigeonholes' ) ) {
+ if( $gBitUser->hasPermission( 'p_pigeonholes_view' ) ) {
$gBitSystem->registerAppMenu( PIGEONHOLES_PKG_DIR, 'Categories', PIGEONHOLES_PKG_URL.'index.php', 'bitpackage:pigeonholes/menu_pigeonholes.tpl', 'Pigeonholes' );
}
}
diff --git a/edit_pigeonholes.php b/edit_pigeonholes.php
index 65108a5..cb30965 100644
--- a/edit_pigeonholes.php
+++ b/edit_pigeonholes.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_pigeonholes/edit_pigeonholes.php,v 1.18 2006/02/24 12:06:07 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_pigeonholes/edit_pigeonholes.php,v 1.19 2006/04/11 13:07:41 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_pigeonholes.php,v 1.18 2006/02/24 12:06:07 squareing Exp $
+ * $Id: edit_pigeonholes.php,v 1.19 2006/04/11 13:07:41 squareing Exp $
* @package pigeonholes
* @subpackage functions
*/
@@ -19,14 +19,14 @@
require_once( '../bit_setup_inc.php' );
$gBitSystem->verifyPackage( 'pigeonholes' );
-$gBitSystem->verifyPermission( 'bit_p_edit_pigeonholes' );
+$gBitSystem->verifyPermission( 'p_pigeonholes_edit' );
include_once( LIBERTY_PKG_PATH.'LibertyStructure.php' );
include_once( PIGEONHOLES_PKG_PATH.'lookup_pigeonholes_inc.php' );
// include edit structure file only when structure_id is known
if( !empty( $_REQUEST["structure_id"] ) && ( empty( $_REQUEST['action'] ) || $_REQUEST['action'] != 'remove' ) ) {
- $verifyStructurePermission = 'bit_p_edit_pigeonholes';
+ $verifyStructurePermission = 'p_pigeonholes_edit';
include_once( LIBERTY_PKG_PATH.'edit_structure_inc.php' );
// get all the nodes in this structure
diff --git a/edit_structure.php b/edit_structure.php
index 5f89686..a458c52 100644
--- a/edit_structure.php
+++ b/edit_structure.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_pigeonholes/edit_structure.php,v 1.2 2006/01/14 19:55:18 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_pigeonholes/edit_structure.php,v 1.3 2006/04/11 13:07:41 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_structure.php,v 1.2 2006/01/14 19:55:18 squareing Exp $
+ * $Id: edit_structure.php,v 1.3 2006/04/11 13:07:41 squareing Exp $
* @package pigeonholes
* @subpackage functions
*/
@@ -19,12 +19,12 @@
require_once( '../bit_setup_inc.php' );
$gBitSystem->verifyPackage( 'pigeonholes' );
-$gBitSystem->verifyPermission( 'bit_p_edit_pigeonholes' );
+$gBitSystem->verifyPermission( 'p_pigeonholes_edit' );
$gBitSmarty->assign( 'loadDynamicTree', TRUE );
include_once( PIGEONHOLES_PKG_PATH.'lookup_pigeonholes_inc.php' );
-$verifyStructurePermission = 'bit_p_edit_pigeonholes';
+$verifyStructurePermission = 'p_pigeonholes_edit';
include_once( LIBERTY_PKG_PATH.'edit_structure_inc.php' );
// Display the template
diff --git a/list.php b/list.php
index e2e8716..eb65de6 100644
--- a/list.php
+++ b/list.php
@@ -3,7 +3,7 @@
* $Header
*
* @author xing <xing@synapse.plus.com>
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
* @package pigeonholes
* @subpackage functions
*/
@@ -14,7 +14,7 @@
require_once("../bit_setup_inc.php");
$gBitSystem->verifyPackage( 'pigeonholes' );
-$gBitSystem->verifyPermission( 'bit_p_view_pigeonholes' );
+$gBitSystem->verifyPermission( 'p_pigeonholes_view' );
include_once( PIGEONHOLES_PKG_PATH.'lookup_pigeonholes_inc.php' );
diff --git a/modules/mod_category_menu.php b/modules/mod_category_menu.php
index 746d5e6..b4eef3c 100644
--- a/modules/mod_category_menu.php
+++ b/modules/mod_category_menu.php
@@ -1,7 +1,7 @@
<?php
global $gContent;
if( !empty( $gContent->mContentId ) ) {
- if( $gBitUser->hasPermission( 'bit_p_view_pigeonholes' ) ) {
+ if( $gBitUser->hasPermission( 'p_pigeonholes_view' ) ) {
$pigeonholes = new Pigeonholes();
if( empty( $gStructure ) ) {
diff --git a/modules/mod_whats_related.php b/modules/mod_whats_related.php
index e333c7c..9487255 100644
--- a/modules/mod_whats_related.php
+++ b/modules/mod_whats_related.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_pigeonholes/modules/mod_whats_related.php,v 1.5 2006/02/24 12:06:08 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_pigeonholes/modules/mod_whats_related.php,v 1.6 2006/04/11 13:07:42 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,14 +8,14 @@
* 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: mod_whats_related.php,v 1.5 2006/02/24 12:06:08 squareing Exp $
+ * $Id: mod_whats_related.php,v 1.6 2006/04/11 13:07:42 squareing Exp $
* @package categories
* @subpackage modules
*/
global $gContent;
if( !empty( $gContent->mContentId ) ) {
- if( $gBitUser->hasPermission( 'bit_p_view_pigeonholes' ) ) {
+ if( $gBitUser->hasPermission( 'p_pigeonholes_view' ) ) {
$pigeonholes = new Pigeonholes();
if( $pigeons = $pigeonholes->getPigeonholesFromContentId( $gContent->mContentId ) ) {
diff --git a/templates/list.tpl b/templates/list.tpl
index c6b82fa..ce6f4a5 100644
--- a/templates/list.tpl
+++ b/templates/list.tpl
@@ -27,7 +27,7 @@
<h1>{tr}Categories{/tr} <span class="total">[ {$listInfo.total_records|default:0} ]</span></h1>
{foreach from=$pigeonList item=item}
- {if $gBitUser->hasPermission( 'bit_p_edit_pigeonholes' )}
+ {if $gBitUser->hasPermission( 'p_pigeonholes_edit' )}
<div class="floaticon">
{smartlink ititle="Insert new Category" ifile="edit_pigeonholes.php" ibiticon="liberty/new" structure_id=`$item.structure_id` action=create}
{smartlink ititle="Edit Category" ifile="edit_pigeonholes.php" ibiticon="liberty/edit" structure_id=`$item.structure_id`}
diff --git a/templates/menu_pigeonholes.tpl b/templates/menu_pigeonholes.tpl
index a2708d5..0536627 100644
--- a/templates/menu_pigeonholes.tpl
+++ b/templates/menu_pigeonholes.tpl
@@ -1,14 +1,14 @@
{strip}
<ul>
- {if $gBitUser->hasPermission( 'bit_p_edit_pigeonholes' )}
+ {if $gBitUser->hasPermission( 'p_pigeonholes_edit' )}
<li><a class="item" href="{$smarty.const.PIGEONHOLES_PKG_URL}edit_pigeonholes.php?action=create">{biticon ipackage=liberty iname=new iexplain="Create Category" iforce="icon"} {tr}Create Category{/tr}</a></li>
{/if}
- {if $gBitUser->hasPermission( 'bit_p_view_pigeonholes' )}
+ {if $gBitUser->hasPermission( 'p_pigeonholes_view' )}
<li><a class="item" href="{$smarty.const.PIGEONHOLES_PKG_URL}list.php">{biticon ipackage=liberty iname=list iexplain="List Categories" iforce="icon"} {tr}List Categories{/tr}</a></li>
{if $gContent->mStructureId}
<li><a class="item" href="{$smarty.const.PIGEONHOLES_PKG_URL}view.php?structure_id={$gContent->mStructureId}">{biticon ipackage=liberty iname=spacer iexplain="" iforce="icon"} {tr}View Category{/tr}</a></li>
- {if $gBitUser->hasPermission( 'bit_p_edit_pigeonholes' ) and $gContent->mStructureId}
+ {if $gBitUser->hasPermission( 'p_pigeonholes_edit' ) and $gContent->mStructureId}
<li><a class="head" href="{$smarty.const.PIGEONHOLES_PKG_URL}edit_pigeonholes.php?structure_id={$gContent->mInfo.structure_id}">{biticon ipackage=liberty iname=edit iexplain="Edit Category" iforce="icon"} {tr}Edit Category{/tr}</a>
<ul>
<li><a class="item" href="{$smarty.const.PIGEONHOLES_PKG_URL}edit_pigeonholes.php?structure_id={$gContent->mInfo.root_structure_id}&amp;action=create">{biticon ipackage=liberty iname=new iexplain="Insert Category" iforce="icon"} {tr}Insert Category{/tr}</a></li>
diff --git a/view.php b/view.php
index e4ad517..0a486e3 100644
--- a/view.php
+++ b/view.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_pigeonholes/view.php,v 1.11 2006/02/23 15:12:56 bitweaver Exp $
+ * $Header: /cvsroot/bitweaver/_bit_pigeonholes/view.php,v 1.12 2006/04/11 13:07:41 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: view.php,v 1.11 2006/02/23 15:12:56 bitweaver Exp $
+ * $Id: view.php,v 1.12 2006/04/11 13:07:41 squareing Exp $
* @package pigeonholes
* @subpackage functions
*/
@@ -19,7 +19,7 @@
require_once( '../bit_setup_inc.php' );
$gBitSystem->verifyPackage( 'pigeonholes' );
-$gBitSystem->verifyPermission( 'bit_p_view_pigeonholes' );
+$gBitSystem->verifyPermission( 'p_pigeonholes_view' );
include_once( PIGEONHOLES_PKG_PATH.'lookup_pigeonholes_inc.php' );
@@ -35,7 +35,7 @@ $gStructure = new LibertyStructure( $gContent->mInfo['root_structure_id'] );
$gStructure->load();
if( !empty( $_REQUEST['action'] ) ) {
- if( $_REQUEST['action'] == 'dismember' && !empty( $_REQUEST['content_id'] ) && !empty( $_REQUEST['parent_id'] ) && $gBitUser->hasPermission( 'bit_p_edit_pigeonholes' ) ) {
+ if( $_REQUEST['action'] == 'dismember' && !empty( $_REQUEST['content_id'] ) && !empty( $_REQUEST['parent_id'] ) && $gBitUser->hasPermission( 'p_pigeonholes_edit' ) ) {
if( $gContent->expungePigeonholeMember( array( 'parent_id' => $_REQUEST['content_id'], 'member_id' => $_REQUEST['parent_id'] ) ) ) {
$feedback['success'] = tra( 'The item was successfully removed' );
} else {