summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--].htaccess0
-rwxr-xr-xadmin/admin_pigeonholes_inc.php2
-rwxr-xr-xadmin/schema_inc.php6
-rwxr-xr-xassign_content.php22
-rwxr-xr-xedit_pigeonholes.php23
-rwxr-xr-xedit_structure.php2
-rwxr-xr-x[-rw-r--r--]icons/pkg_pigeonholes.gifbin2034 -> 2034 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_pigeonholes.pngbin3825 -> 3825 bytes
-rwxr-xr-xincludes/bit_setup_inc.php4
-rwxr-xr-xincludes/classes/Pigeonholes.php51
-rwxr-xr-xlist.php2
-rwxr-xr-x[-rw-r--r--]modules/help_mod_category_menu.tpl0
-rwxr-xr-x[-rw-r--r--]modules/help_mod_category_suckerfish.tpl0
-rwxr-xr-x[-rw-r--r--]modules/help_mod_last_changes.tpl0
-rwxr-xr-x[-rw-r--r--]modules/help_mod_whats_related.tpl0
-rw-r--r--modules/index.php2
-rwxr-xr-xmodules/mod_category_suckerfish.php10
-rwxr-xr-x[-rw-r--r--]modules/mod_category_suckerfish.tpl0
-rwxr-xr-x[-rw-r--r--]modules/mod_whats_related.tpl0
-rwxr-xr-x[-rw-r--r--]templates/admin_pigeonholes.tpl0
-rwxr-xr-x[-rw-r--r--]templates/edit_structure.tpl0
-rwxr-xr-x[-rw-r--r--]templates/menu_pigeonholes_admin.tpl0
-rwxr-xr-x[-rw-r--r--]templates/service_list_options_inc.tpl0
-rwxr-xr-x[-rw-r--r--]templates/view_structure.tpl0
-rwxr-xr-x[-rw-r--r--]templates/view_structure_inc.tpl0
-rwxr-xr-xview.php8
26 files changed, 65 insertions, 67 deletions
diff --git a/.htaccess b/.htaccess
index d74204e..d74204e 100644..100755
--- a/.htaccess
+++ b/.htaccess
diff --git a/admin/admin_pigeonholes_inc.php b/admin/admin_pigeonholes_inc.php
index 48087a0..9313f23 100755
--- a/admin/admin_pigeonholes_inc.php
+++ b/admin/admin_pigeonholes_inc.php
@@ -52,7 +52,7 @@ $pigeonholeEditSettings = [
],
'pigeonholes_allow_forbid_insertion' => [
'label' => 'Allow Forbid Insertion',
- 'note' => 'Allows pigeonholes to be set to forbid insertion of new members. This is good for heirarchical categories where only leaf categories should have members.'
+ 'note' => 'Allows pigeonholes to be set to forbid insertion of new members. This is good for heirarchical categories where only leaf categories should have members.',
],
];
$gBitSmarty->assign( 'pigeonholeEditSettings', $pigeonholeEditSettings );
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 48dae8c..6c0d815 100755
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -13,7 +13,7 @@ $tables = [
CONSTRAINT '
, CONSTRAINT `pigeonhole_members_parent_ref` FOREIGN KEY (`parent_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )
, CONSTRAINT `pigeonhole_members_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )'
- "
+ ",
];
global $gBitInstaller;
@@ -29,7 +29,7 @@ $gBitInstaller->registerPackageInfo( PIGEONHOLES_PKG_NAME, [
// ### Sequences
$sequences = [
- 'pigeonholes_id_seq' => [ 'start' => 1 ]
+ 'pigeonholes_id_seq' => [ 'start' => 1 ],
];
$gBitInstaller->registerSchemaSequences( PIGEONHOLES_PKG_NAME, $sequences );
@@ -52,6 +52,6 @@ $gBitInstaller->registerUserPermissions( PIGEONHOLES_PKG_NAME, [
// Requirements
$gBitInstaller->registerRequirements( PIGEONHOLES_PKG_NAME, [
- 'liberty' => [ 'min' => '5.0.0' ],
+ 'liberty' => [ 'min' => '5.0.0' ],
] );
diff --git a/assign_content.php b/assign_content.php
index b49ef34..d8ef5d0 100755
--- a/assign_content.php
+++ b/assign_content.php
@@ -26,7 +26,7 @@ include_once( PIGEONHOLES_PKG_INCLUDE_PATH.'lookup_pigeonholes_inc.php' );
$feedback = '';
$gBitSmarty->assign( 'feedback', $feedback );
-$contentTypes = array( '' => tra( 'All Content' ) );
+$contentTypes = [ '' => tra( 'All Content' ) ];
foreach( $gLibertySystem->mContentTypes as $cType ) {
if( $cType['content_type_guid'] != PIGEONHOLES_CONTENT_TYPE_GUID ) {
$contentTypes[$cType['content_type_guid']] = $gLibertySystem->getContentTypeName( $cType['content_type_guid'] );
@@ -35,13 +35,13 @@ foreach( $gLibertySystem->mContentTypes as $cType ) {
$gBitSmarty->assign( 'contentTypes', $contentTypes );
$gBitSmarty->assign( 'contentSelect', $contentSelect = !isset( $_REQUEST['content_type'] ) ? null : $_REQUEST['content_type'] );
-$listHash = array(
+$listHash = [
'find' => ( empty( $_REQUEST['find'] ) ? null : $_REQUEST['find'] ),
'sort_mode' => ( empty( $_REQUEST['sort_mode'] ) ? null : $_REQUEST['sort_mode'] ),
'max_records' => ( BitBase::verifyId( $_REQUEST['max_records'] ) ) ? $_REQUEST['max_records'] : 10,
'include_members' => ( ( !empty( $_REQUEST['include'] ) && $_REQUEST['include'] == 'members' ) ? true : false ),
'content_type' => $contentSelect,
-);
+];
// We need to handle insert and next where we are NOT actually doing an insert
if( !empty( $_REQUEST['insert_content'] ) || !empty( $_REQUEST['insert_content_and_next'] )) {
@@ -67,15 +67,15 @@ if(( !empty( $_REQUEST['insert_content'] ) || !empty( $_REQUEST['insert_content_
foreach( $assignableContent as $item ) {
if( !empty( $_REQUEST['pigeonhole'][$item['content_id']] ) ) {
foreach( $_REQUEST['pigeonhole'][$item['content_id']] as $parent_id ) {
- $memberHash[$parent_id][] = array(
+ $memberHash[$parent_id][] = [
'parent_id' => $parent_id,
'content_id' => $item['content_id'],
- );
+ ];
}
}
if( !empty( $_REQUEST['include'] ) && $_REQUEST['include'] == 'members' ) {
- if( !empty( $item['content_id'] ) && !$gContent->expungePigeonholeMember( array( 'member_id' => $item['content_id'], 'deletables' => $deletableParentIds ) ) ) {
+ if( !empty( $item['content_id'] ) && !$gContent->expungePigeonholeMember( [ 'member_id' => $item['content_id'], 'deletables' => $deletableParentIds ] ) ) {
$feedback['error'] = 'The content could not be deleted before insertion.';
}
}
@@ -103,11 +103,11 @@ if(( !empty( $_REQUEST['insert_content'] ) || !empty( $_REQUEST['insert_content_
$gBitSmarty->assign( 'listInfo', $listHash['listInfo'] );
-$listHash = array(
+$listHash = [
'load_only_root' => true,
'max_records' => -1,
'parse_data' => true,
-);
+];
$pigeonRootData = $gContent->getList( $listHash );
$pigeonRoots[0] = 'All';
foreach( $pigeonRootData as $root ) {
@@ -115,13 +115,13 @@ foreach( $pigeonRootData as $root ) {
}
$gBitSmarty->assign( 'pigeonRoots', !empty( $pigeonRoots ) ? $pigeonRoots : null );
-$listHash = array(
+$listHash = [
'root_structure_id' => ( !empty( $_REQUEST['root_structure_id'] ) ? $_REQUEST['root_structure_id'] : null ),
'force_extras' => true,
'max_records' => -1,
'sort_mode' => 'ls.`parent_id_asc`',
'parse_data' => true,
-);
+];
if( $gBitSystem->isFeatureActive( 'pigeonholes_allow_forbid_insertion' )) {
$listHash['insertable'] = true;
@@ -134,5 +134,5 @@ $gBitSmarty->assign( 'assignableContent', $assignableContent );
$gBitSmarty->assign( 'contentCount', count( $assignableContent ) );
// Display the template
-$gBitSystem->display( 'bitpackage:pigeonholes/assign_content.tpl', tra( 'Assign Content to Categories' ) , array( 'display_mode' => 'display' ));
+$gBitSystem->display( 'bitpackage:pigeonholes/assign_content.tpl', tra( 'Assign Content to Categories' ) , [ 'display_mode' => 'display' ]);
?>
diff --git a/edit_pigeonholes.php b/edit_pigeonholes.php
index 2439ef2..71dfd47 100755
--- a/edit_pigeonholes.php
+++ b/edit_pigeonholes.php
@@ -22,7 +22,6 @@ $gBitSystem->verifyPackage( 'pigeonholes' );
$gBitSystem->verifyPermission( 'p_pigeonholes_create' );
use Bitweaver\Pigeonholes\Pigeonholes;
-use Bitweaver\Liberty\LibertyStructure;
include_once PIGEONHOLES_PKG_INCLUDE_PATH.'lookup_pigeonholes_inc.php';
// include edit structure file only when structure_id is known
@@ -80,16 +79,16 @@ if( !empty( $_REQUEST['action'] ) || isset( $_REQUEST["confirm"] ) ) {
$formHash['remove'] = true;
$formHash['structure_id'] = $_REQUEST['structure_id'];
$formHash['action'] = 'remove';
- $msgHash = array(
+ $msgHash = [
'label' => 'Remove Pigeonhole',
'confirm_item' => $gContent->mInfo['title'].'<br />'.tra( 'and any subcategories' ),
'warning' => 'This will remove the pigeonhole but will <strong>not</strong> modify or remove the content itself.',
- );
+ ];
$gBitSystem->confirmDialog( $formHash, $msgHash );
}
if( $_REQUEST['action'] == 'dismember' && !empty( $_REQUEST['pigeonhole_content_id'] ) && !empty( $_REQUEST['parent_id'] ) ) {
- if( $gContent->expungePigeonholeMember( array( 'parent_id' => $_REQUEST['parent_id'], 'member_id' => $_REQUEST['pigeonhole_content_id'] ) ) ) {
+ if( $gContent->expungePigeonholeMember( [ 'parent_id' => $_REQUEST['parent_id'], 'member_id' => $_REQUEST['pigeonhole_content_id'] ] ) ) {
$feedback['success'] = tra( 'The item was successfully removed' );
} else {
$feedback['error'] = tra( 'The item could not be removed' );
@@ -120,10 +119,10 @@ if ( $gBitSystem->isFeatureActive( 'pigeonholes_permissions' ) ) {
// get available groups ready that we can assign the pigoenhole to one of them
if ( $gBitSystem->isFeatureActive( 'pigeonholes_groups' ) ) {
- $listHash = array(
+ $listHash = [
'only_root_groups' => true,
- 'sort_mode' => !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : 'group_name_asc'
- );
+ 'sort_mode' => !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : 'group_name_asc',
+ ];
$allGroups = $gBitUser->getAllGroups( $listHash );
// create a usable array for group selection
@@ -134,11 +133,11 @@ if ( $gBitSystem->isFeatureActive( 'pigeonholes_groups' ) ) {
$gBitSmarty->assign( 'groups', $groups );
}
-$listHash = array(
+$listHash = [
'root_structure_id' => !empty( $gContent->mInfo['root_structure_id'] ) ? $gContent->mInfo['root_structure_id'] : null,
'force_extras' => true,
- 'max_records' => -1
-);
+ 'max_records' => -1,
+];
$pigeonList = $gContent->getList( $listHash );
$gBitSmarty->assign( 'pigeonList', $pigeonList );
$gBitSmarty->assign( 'feedback', !empty( $feedback ) ? $feedback : null );
@@ -151,7 +150,7 @@ if ( $gBitSystem->isFeatureActive( 'pigeonholes_themes' ) ) {
// Display the template
if ( !empty( $gStructure ) ) {
- $gBitSystem->display( 'bitpackage:pigeonholes/edit_pigeonholes.tpl', !empty( $gStructure->mInfo['title'] ) ? tra( 'Edit Pigeonhole' ).': '.$gStructure->mInfo["title"] : tra( 'Create Pigeonhole' ) , array( 'display_mode' => 'edit' ));
+ $gBitSystem->display( 'bitpackage:pigeonholes/edit_pigeonholes.tpl', !empty( $gStructure->mInfo['title'] ) ? tra( 'Edit Pigeonhole' ).': '.$gStructure->mInfo["title"] : tra( 'Create Pigeonhole' ) , [ 'display_mode' => 'edit' ]);
} else {
- $gBitSystem->display( 'bitpackage:pigeonholes/edit_pigeonholes.tpl', tra( 'Create Pigeonhole' ) , array( 'display_mode' => 'edit' ));
+ $gBitSystem->display( 'bitpackage:pigeonholes/edit_pigeonholes.tpl', tra( 'Create Pigeonhole' ) , [ 'display_mode' => 'edit' ]);
}
diff --git a/edit_structure.php b/edit_structure.php
index 4c37108..b818cf9 100755
--- a/edit_structure.php
+++ b/edit_structure.php
@@ -31,4 +31,4 @@ $verifyStructurePermission = 'p_pigeonholes_create';
include_once LIBERTY_PKG_INCLUDE_PATH.'structure_edit_inc.php';
// Display the template
-$gBitSystem->display( 'bitpackage:pigeonholes/edit_structure.tpl', $gStructure->mInfo["title"] , array( 'display_mode' => 'edit' )); \ No newline at end of file
+$gBitSystem->display( 'bitpackage:pigeonholes/edit_structure.tpl', $gStructure->mInfo["title"] , [ 'display_mode' => 'edit' ]); \ No newline at end of file
diff --git a/icons/pkg_pigeonholes.gif b/icons/pkg_pigeonholes.gif
index 2fa9802..2fa9802 100644..100755
--- a/icons/pkg_pigeonholes.gif
+++ b/icons/pkg_pigeonholes.gif
Binary files differ
diff --git a/icons/pkg_pigeonholes.png b/icons/pkg_pigeonholes.png
index 184e920..184e920 100644..100755
--- a/icons/pkg_pigeonholes.png
+++ b/icons/pkg_pigeonholes.png
Binary files differ
diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php
index 1fd129b..3769eee 100755
--- a/includes/bit_setup_inc.php
+++ b/includes/bit_setup_inc.php
@@ -17,9 +17,9 @@ $pRegisterHash = [
define( 'PIGEONHOLES_PKG_NAME', $pRegisterHash['package_name'] );
define( 'PIGEONHOLES_PKG_URL', BIT_ROOT_URL . basename( $pRegisterHash['package_path'] ) . '/' );
define( 'PIGEONHOLES_PKG_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/' );
-define( 'PIGEONHOLES_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/');
+define( 'PIGEONHOLES_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/');
define( 'PIGEONHOLES_PKG_CLASS_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/classes/');
-define( 'PIGEONHOLES_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/');
+define( 'PIGEONHOLES_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/');
$gBitSystem->registerPackage( $pRegisterHash );
diff --git a/includes/classes/Pigeonholes.php b/includes/classes/Pigeonholes.php
index 7fec30e..09b9e8d 100755
--- a/includes/classes/Pigeonholes.php
+++ b/includes/classes/Pigeonholes.php
@@ -25,6 +25,7 @@
* required setup
*/
namespace Bitweaver\Pigeonholes;
+
use Bitweaver\BitBase;
use Bitweaver\KernelTools;
use Bitweaver\Liberty\LibertyContent;
@@ -50,14 +51,14 @@ class Pigeonholes extends LibertyMime {
public function __construct( $pStructureId=0, $pContentId=0, $pMemberList=null ) {
parent::__construct();
- $this->registerContentType( PIGEONHOLES_CONTENT_TYPE_GUID, array(
+ $this->registerContentType( PIGEONHOLES_CONTENT_TYPE_GUID, [
'content_type_guid' => PIGEONHOLES_CONTENT_TYPE_GUID,
'content_name' => 'Pigeonhole',
'handler_class' => 'Pigeonholes',
'handler_package' => 'pigeonholes',
'handler_file' => 'Pigeonholes.php',
- 'maintainer_url' => 'https://www.bitweaver.org'
- ) );
+ 'maintainer_url' => 'https://www.bitweaver.org',
+ ] );
$this->mContentId = $pContentId;
$this->mStructureId = $pStructureId;
$this->mContentTypeGuid = PIGEONHOLES_CONTENT_TYPE_GUID;
@@ -94,16 +95,16 @@ class Pigeonholes extends LibertyMime {
LEFT JOIN `".BIT_DB_PREFIX."users_users` uue ON ( uue.`user_id` = lc.`modifier_user_id` )
LEFT JOIN `".BIT_DB_PREFIX."users_users` uuc ON ( uuc.`user_id` = lc.`user_id` )
WHERE $lookupColumn=?";
- $result = $this->mDb->query( $query, array( $lookupId ) );
+ $result = $this->mDb->query( $query, [ $lookupId ] );
if( $result && $row = $result->fetchRow() ) {
$this->mInfo = $row;
$this->mContentId = $row['content_id'];
$this->mStructureId = $row['structure_id'];
$this->mInfo['user'] = $row['creator_user'];
- $this->mInfo['real_name'] = isset( $row['creator_real_name'] ) ? $row['creator_real_name'] : $row['creator_user'];
+ $this->mInfo['real_name'] = $row['creator_real_name'] ?? $row['creator_user'];
$this->mInfo['display_name'] = RoleUser::getTitleFromHash( $this->mInfo );
- $this->mInfo['editor'] = isset( $row['modifier_real_name'] ) ? $row['modifier_real_name'] : $row['modifier_user'];
+ $this->mInfo['editor'] = $row['modifier_real_name'] ?? $row['modifier_user'];
$this->mInfo['display_link'] = $this->getDisplayLink();
$this->mInfo['display_url'] = $this->getDisplayUrl();
$this->parseData();
@@ -117,7 +118,7 @@ class Pigeonholes extends LibertyMime {
if( $pExtras ) {
$this->mInfo['path'] = $this->getPigeonholePath();
$this->mInfo['display_path'] = $this->getDisplayPath( $this->mInfo['path'] );
- $memberHash = array( 'max_records' => -1 );
+ $memberHash = [ 'max_records' => -1 ];
$this->mInfo['members'] = $this->getMemberList( $memberHash );
$this->mInfo['members_count'] = count( $this->mInfo['members'] );
}
@@ -171,7 +172,6 @@ class Pigeonholes extends LibertyMime {
$where .= $this->mMemberList['Where'];
}
-
$ret = [];
$query = "
SELECT pigm.*,
@@ -522,13 +522,13 @@ class Pigeonholes extends LibertyMime {
while( $aux = $result->fetchRow() ) {
//$content_ids[] = $aux['content_id'];
$aux['user'] = $aux['creator_user'];
- $aux['real_name'] = isset( $aux['creator_real_name'] ) ? $aux['creator_real_name'] : $aux['creator_user'];
+ $aux['real_name'] = $aux['creator_real_name'] ?? $aux['creator_user'];
$aux['display_name'] = RoleUser::getDisplayNameFromHash( $aux );
- $aux['editor'] = isset( $aux['modifier_real_name'] ) ? $aux['modifier_real_name'] : $aux['modifier_user'];
+ $aux['editor'] = $aux['modifier_real_name'] ?? $aux['modifier_user'];
$aux['display_link'] = Pigeonholes::getDisplayLink( $aux['title'], $aux );
// get member count for mysql - haha
if( $gBitDbType == 'mysql' ) {
- $aux['members_count'] = $this->mDb->getOne( "SELECT COUNT( pm.`content_id` ) FROM `".BIT_DB_PREFIX."pigeonhole_members` pm WHERE pm.`parent_id`=?", array( $aux['content_id'] ));
+ $aux['members_count'] = $this->mDb->getOne( "SELECT COUNT( pm.`content_id` ) FROM `".BIT_DB_PREFIX."pigeonhole_members` pm WHERE pm.`parent_id`=?", [ $aux['content_id'] ]);
}
if( !empty( $pListHash['parse_data'] ) && !empty( $aux['data'] )) {
@@ -640,7 +640,7 @@ class Pigeonholes extends LibertyMime {
// probably has to do with not null default nextval('public.liberty_structures_id_seq'::text)
if( !empty( $pParamHash['update'] ) ) {
if( !empty( $pParamHash['pigeonhole_store'] ) ) {
- $result = $this->mDb->associateUpdate( $table, $pParamHash['pigeonhole_store'], array("content_id" => $this->mContentId ) );
+ $result = $this->mDb->associateUpdate( $table, $pParamHash['pigeonhole_store'], ["content_id" => $this->mContentId ] );
}
$pParamHash['structure_location_id'] = $this->mStructureId;
} else {
@@ -665,7 +665,7 @@ class Pigeonholes extends LibertyMime {
// store content items
if( !empty( $pParamHash['pigeonhole_members_store'] ) ) {
// remove items first
- $this->expungePigeonholeMember( array( 'parent_id' => $this->mContentId ) );
+ $this->expungePigeonholeMember( [ 'parent_id' => $this->mContentId ] );
if( !$this->insertPigeonholeMember( $pParamHash['pigeonhole_members_store'] ) ) {
$this->mErrors['store'] = 'The content could not be inserted into the respective categories.';
}
@@ -809,7 +809,7 @@ class Pigeonholes extends LibertyMime {
* @return bool true on success, false if store could not occur. If false, $this->mErrors will have reason why
**/
public function expungePigeonholeMember( $pParamHash ) {
- if( BitBase::verifyId( $pParamHash['parent_id'] ) || BitBase::verifyId( $pParamHash['member_id'] ?? 0 ) ) {
+ if( BitBase::verifyId( $pParamHash['parent_id'] ) || BitBase::verifyId( $pParamHash['member_id'] ?? 0 ) ) {
$where = '';
$bindVars = [];
@@ -871,9 +871,9 @@ class Pigeonholes extends LibertyMime {
foreach( $contentIds as $id ) {
// now we have the content ids - let the nuking begin
$query = "DELETE FROM `".BIT_DB_PREFIX."pigeonholes` WHERE `content_id` = ?";
- $result = $this->mDb->query( $query, array( $id['content_id'] ) );
+ $result = $this->mDb->query( $query, [ $id['content_id'] ] );
$query = "DELETE FROM `".BIT_DB_PREFIX."pigeonhole_members` WHERE `parent_id` = ?";
- $result = $this->mDb->query( $query, array( $id['content_id'] ) );
+ $result = $this->mDb->query( $query, [ $id['content_id'] ] );
// remove all entries from content tables
$this->mContentId = $id['content_id'];
@@ -992,7 +992,6 @@ function pigeonholes_pathlist_sorter( $aa, $ab ) {
}
}
-
// ============= SERVICE FUNCTIONS =============
/**
@@ -1159,9 +1158,9 @@ function pigeonholes_content_store( $pObject, $pParamHash ) {
if( $pigeonholes->expungePigeonholeMember( [ 'member_id' => $pParamHash['content_id'] ] ) && !empty( $pParamHash['pigeonholes'] ) ) {
// insert the content into the desired pigeonholes
foreach( $pParamHash['pigeonholes']['pigeonhole'] as $p_id ) {
- $memberHash[] = [
+ $memberHash[] = [
'parent_id' => $p_id,
- 'content_id' => $pParamHash['content_id']
+ 'content_id' => $pParamHash['content_id'],
];
}
@@ -1188,12 +1187,12 @@ function pigeonholes_content_list( &$pObject, $pParamHash = null ) {
global $gBitSystem, $gBitSmarty;
if( $gBitSystem->isFeatureActive( 'pigeonholes_list_filter' )) {
$pigeonholes = new Pigeonholes();
- $listHash = array(
- 'sort_mode' => array(
- 'root_structure_id_asc', 'title_asc'
- ),
+ $listHash = [
+ 'sort_mode' => [
+ 'root_structure_id_asc', 'title_asc',
+ ],
'insertable' => true,
- );
+ ];
$pigeonList = $pigeonholes->getList( $listHash );
$list = [];
foreach( $pigeonList as $pigeon ) {
@@ -1220,7 +1219,7 @@ function pigeonholes_content_list_sql( &$pObject, $pParamHash = null ) {
if( !empty( $pParamHash['liberty_categories'] )) {
if( !is_array( $pParamHash['liberty_categories'] )) {
- $pParamHash['liberty_categories'] = array( $pParamHash['liberty_categories'] );
+ $pParamHash['liberty_categories'] = [ $pParamHash['liberty_categories'] ];
}
// if we want to allow items in subcategories, we get those and include them in the query
@@ -1247,7 +1246,7 @@ function pigeonholes_content_list_sql( &$pObject, $pParamHash = null ) {
if( !empty( $pParamHash['liberty_root_categories'] )) {
if( !is_array( $pParamHash['liberty_root_categories'] )) {
- $pParamHash['liberty_root_categories'] = array( $pParamHash['liberty_root_categories'] );
+ $pParamHash['liberty_root_categories'] = [ $pParamHash['liberty_root_categories'] ];
}
// if we want to allow items in subcategories, we get those and include them in the query
diff --git a/list.php b/list.php
index 9612650..5ba6908 100755
--- a/list.php
+++ b/list.php
@@ -40,5 +40,5 @@ if( !empty( $pigeonList ) ) {
}
$gBitSmarty->assign( 'listInfo', $listHash['listInfo'] );
-$gBitSystem->display( 'bitpackage:pigeonholes/list.tpl', tra( 'List Categories' ) , array( 'display_mode' => 'list' ));
+$gBitSystem->display( 'bitpackage:pigeonholes/list.tpl', tra( 'List Categories' ) , [ 'display_mode' => 'list' ]);
?>
diff --git a/modules/help_mod_category_menu.tpl b/modules/help_mod_category_menu.tpl
index 9e6db5d..9e6db5d 100644..100755
--- a/modules/help_mod_category_menu.tpl
+++ b/modules/help_mod_category_menu.tpl
diff --git a/modules/help_mod_category_suckerfish.tpl b/modules/help_mod_category_suckerfish.tpl
index 6440599..6440599 100644..100755
--- a/modules/help_mod_category_suckerfish.tpl
+++ b/modules/help_mod_category_suckerfish.tpl
diff --git a/modules/help_mod_last_changes.tpl b/modules/help_mod_last_changes.tpl
index 8ea7630..8ea7630 100644..100755
--- a/modules/help_mod_last_changes.tpl
+++ b/modules/help_mod_last_changes.tpl
diff --git a/modules/help_mod_whats_related.tpl b/modules/help_mod_whats_related.tpl
index 9e6db5d..9e6db5d 100644..100755
--- a/modules/help_mod_whats_related.tpl
+++ b/modules/help_mod_whats_related.tpl
diff --git a/modules/index.php b/modules/index.php
index 3e305fe..c0437d0 100644
--- a/modules/index.php
+++ b/modules/index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
// This is not a package.
header ("location: ../index.php");
diff --git a/modules/mod_category_suckerfish.php b/modules/mod_category_suckerfish.php
index 23acc5b..0e533f5 100755
--- a/modules/mod_category_suckerfish.php
+++ b/modules/mod_category_suckerfish.php
@@ -30,12 +30,12 @@ if($gBitSystem->isPackageActive('pigeonholes')) {
$s = new LibertyStructure();
// Prep get list screws with us.
- $listHash = array('load_only_root'=> true, 'sort_mode' => 'lc.title_asc', 'offset' => 0, 'max_records' => '999999', 'find' => '');
+ $listHash = ['load_only_root'=> true, 'sort_mode' => 'lc.title_asc', 'offset' => 0, 'max_records' => '999999', 'find' => ''];
if (!empty($module_params['root_structure_id'])) {
$listHash['root_structure_id'] = $module_params['root_structure_id'];
}
if (!empty($module_params['structure_id'])) {
- $l = array(array('structure_id' => $module_params['structure_id']));
+ $l = [['structure_id' => $module_params['structure_id']]];
}
else {
$l = $p->getList($listHash);
@@ -97,7 +97,7 @@ if (!defined('MENU_LEVELS_DEFINED')) {
$ret .= '</li>';
}
$ret .= '</ul>';
-
+
return $ret;
}
define('MENU_LEVELS_DEFINED', 1);
@@ -105,10 +105,10 @@ if (!defined('MENU_LEVELS_DEFINED')) {
if (!empty($module_params['expand_root']) && $module_params['expand_root']) {
if (isset($ns[0]) && !empty($ns[0]['children'])) {
- $gBitSmarty->assign( 'pigeonMenu', menuLevels($ns[0]['children'], 0));
+ $gBitSmarty->assign( 'pigeonMenu', menuLevels($ns[0]['children'], 0));
}
else if (!empty($ns[0]['children'])) {
- $gBitSmarty->assign( 'pigeonMenu', menuLevels($ns['children'], 0));
+ $gBitSmarty->assign( 'pigeonMenu', menuLevels($ns['children'], 0));
}
}
else {
diff --git a/modules/mod_category_suckerfish.tpl b/modules/mod_category_suckerfish.tpl
index 22b717f..22b717f 100644..100755
--- a/modules/mod_category_suckerfish.tpl
+++ b/modules/mod_category_suckerfish.tpl
diff --git a/modules/mod_whats_related.tpl b/modules/mod_whats_related.tpl
index 7329849..7329849 100644..100755
--- a/modules/mod_whats_related.tpl
+++ b/modules/mod_whats_related.tpl
diff --git a/templates/admin_pigeonholes.tpl b/templates/admin_pigeonholes.tpl
index 3d516bc..3d516bc 100644..100755
--- a/templates/admin_pigeonholes.tpl
+++ b/templates/admin_pigeonholes.tpl
diff --git a/templates/edit_structure.tpl b/templates/edit_structure.tpl
index eae10b8..eae10b8 100644..100755
--- a/templates/edit_structure.tpl
+++ b/templates/edit_structure.tpl
diff --git a/templates/menu_pigeonholes_admin.tpl b/templates/menu_pigeonholes_admin.tpl
index 8ca6e2d..8ca6e2d 100644..100755
--- a/templates/menu_pigeonholes_admin.tpl
+++ b/templates/menu_pigeonholes_admin.tpl
diff --git a/templates/service_list_options_inc.tpl b/templates/service_list_options_inc.tpl
index cf1df71..cf1df71 100644..100755
--- a/templates/service_list_options_inc.tpl
+++ b/templates/service_list_options_inc.tpl
diff --git a/templates/view_structure.tpl b/templates/view_structure.tpl
index 656e30b..656e30b 100644..100755
--- a/templates/view_structure.tpl
+++ b/templates/view_structure.tpl
diff --git a/templates/view_structure_inc.tpl b/templates/view_structure_inc.tpl
index 003a02f..003a02f 100644..100755
--- a/templates/view_structure_inc.tpl
+++ b/templates/view_structure_inc.tpl
diff --git a/view.php b/view.php
index 2651575..6013fa2 100755
--- a/view.php
+++ b/view.php
@@ -42,7 +42,7 @@ $gStructure->load();
// expunge request
if( !empty( $_REQUEST['action'] ) ) {
if( $_REQUEST['action'] == 'dismember' && !empty( $_REQUEST['content_id'] ) && !empty( $_REQUEST['parent_id'] ) && $gContent->verifyUpdatePermission() ) {
- if( $gContent->expungePigeonholeMember( array( 'parent_id' => $_REQUEST['content_id'], 'member_id' => $_REQUEST['parent_id'] ) ) ) {
+ if( $gContent->expungePigeonholeMember( [ 'parent_id' => $_REQUEST['content_id'], 'member_id' => $_REQUEST['parent_id'] ] ) ) {
$feedback['success'] = tra( 'The item was successfully removed' );
} else {
$feedback['error'] = tra( 'The item could not be removed' );
@@ -60,14 +60,14 @@ $gBitSmarty->assign( 'structureInfo', $gStructure->mInfo );
$gBitSmarty->assign( 'subtree', $gStructure->getSubTree( $gStructure->mStructureId ) );
if( $gContent->checkPathPermissions( $gContent->getField( 'path' ) ) ) {
- $listHash = array(
+ $listHash = [
'root_structure_id' => $gContent->mInfo['root_structure_id'],
'structure_id' => $gContent->mInfo['structure_id'],
'parse_data' => true,
'max_records' => -1,
'load_extras' => true,
'members_max_records' => -1,
- );
+ ];
$pigeonList = $gContent->getList( $listHash );
$gBitSmarty->assign( 'pigeonList', $pigeonList );
} else {
@@ -76,5 +76,5 @@ if( $gContent->checkPathPermissions( $gContent->getField( 'path' ) ) ) {
$gContent->addHit();
// Display the template
-$gBitSystem->display( 'bitpackage:pigeonholes/view_structure.tpl', tra( 'View Pigeonhole' ) , array( 'display_mode' => 'display' ));
+$gBitSystem->display( 'bitpackage:pigeonholes/view_structure.tpl', tra( 'View Pigeonhole' ) , [ 'display_mode' => 'display' ]);
?>