From 59f4b840506330fd044b0c8e583a428209ab533f Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Thu, 14 May 2026 09:52:56 +0100 Subject: php-cs-fixer tidies to php8.5 standards Co-Authored-By: Claude Sonnet 4.6 --- .htaccess | 0 admin/schema_inc.php | 8 ++--- drop_tags.php | 5 ++- edit.php | 4 +-- icons/pkg_tags.gif | Bin icons/pkg_tags.png | Bin icons/tags.gif | Bin icons/tags.png | Bin includes/bit_setup_inc.php | 18 +++++----- includes/classes/LibertyTag.php | 73 +++++++++++++++++----------------------- index.php | 6 ++-- list.php | 12 +++---- modules/help_mod_tags_cloud.tpl | 0 modules/mod_tags_cloud.tpl | 0 templates/admin_tags.tpl | 0 templates/edit_tag.tpl | 0 templates/list_content.tpl | 0 templates/list_tags.tpl | 0 templates/menu_tags.tpl | 0 templates/menu_tags_admin.tpl | 0 templates/search_inc.tpl | 0 templates/tags.css | 0 templates/tags_cloud.tpl | 0 templates/tags_list.tpl | 0 templates/view_tags_body.tpl | 0 templates/view_tags_nav.tpl | 0 templates/view_tags_view.tpl | 0 27 files changed, 55 insertions(+), 71 deletions(-) mode change 100644 => 100755 .htaccess mode change 100644 => 100755 icons/pkg_tags.gif mode change 100644 => 100755 icons/pkg_tags.png mode change 100644 => 100755 icons/tags.gif mode change 100644 => 100755 icons/tags.png mode change 100644 => 100755 modules/help_mod_tags_cloud.tpl mode change 100644 => 100755 modules/mod_tags_cloud.tpl mode change 100644 => 100755 templates/admin_tags.tpl mode change 100644 => 100755 templates/edit_tag.tpl mode change 100644 => 100755 templates/list_content.tpl mode change 100644 => 100755 templates/list_tags.tpl mode change 100644 => 100755 templates/menu_tags.tpl mode change 100644 => 100755 templates/menu_tags_admin.tpl mode change 100644 => 100755 templates/search_inc.tpl mode change 100644 => 100755 templates/tags.css mode change 100644 => 100755 templates/tags_cloud.tpl mode change 100644 => 100755 templates/tags_list.tpl mode change 100644 => 100755 templates/view_tags_body.tpl mode change 100644 => 100755 templates/view_tags_nav.tpl mode change 100644 => 100755 templates/view_tags_view.tpl diff --git a/.htaccess b/.htaccess old mode 100644 new mode 100755 diff --git a/admin/schema_inc.php b/admin/schema_inc.php index 8b63aa6..7ec0d5e 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -13,7 +13,7 @@ $tables = [ CONSTRAINT ', CONSTRAINT `tags_content_map_tag_ref` FOREIGN KEY (`tag_id`) REFERENCES `".BIT_DB_PREFIX."tags` ( `tag_id` ) , CONSTRAINT `tags_content_map_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` ( `content_id` ) , CONSTRAINT `tags_content_map_tagger_id_ref` FOREIGN KEY (`tagger_id`) REFERENCES `".BIT_DB_PREFIX."users_users` ( `user_id` )' - " + ", ]; global $gBitInstaller; @@ -27,9 +27,8 @@ $gBitInstaller->registerPackageInfo( TAGS_PKG_NAME, [ 'license' => 'LGPL', ] ); - $gBitInstaller->registerPreferences( TAGS_PKG_NAME, [ - [ TAGS_PKG_NAME, 'tags_in_view', 'y' ], + [ TAGS_PKG_NAME, 'tags_in_view', 'y' ], [ TAGS_PKG_NAME, 'tags_list_title', 'y' ], [ TAGS_PKG_NAME, 'tags_list_type', 'y' ], [ TAGS_PKG_NAME, 'tags_list_author', 'y' ], @@ -42,7 +41,6 @@ $sequences = [ ]; $gBitInstaller->registerSchemaSequences( TAGS_PKG_NAME, $sequences ); - // ### Default UserPermissions $gBitInstaller->registerUserPermissions( TAGS_PKG_NAME, [ [ 'p_tags_admin', 'Can admin tags', 'admin', TAGS_PKG_NAME ], @@ -53,5 +51,5 @@ $gBitInstaller->registerUserPermissions( TAGS_PKG_NAME, [ // Requirements $gBitInstaller->registerRequirements( TAGS_PKG_NAME, [ - 'liberty' => [ 'min' => '5.0.0' ], + 'liberty' => [ 'min' => '5.0.0' ], ] ); diff --git a/drop_tags.php b/drop_tags.php index 9b4a1a7..560631e 100755 --- a/drop_tags.php +++ b/drop_tags.php @@ -15,7 +15,6 @@ require_once "../kernel/includes/setup_inc.php"; use Bitweaver\Tags\LibertyTag; use Bitweaver\KernelTools; -use Bitweaver\HttpStatusCodes; $gBitSystem->verifyPackage( 'tags' ); @@ -45,9 +44,9 @@ $formHash['content_id'] = $_REQUEST['content_id']; foreach($_REQUEST['tag_id'] as $id) { $tags[] = $_REQUEST['tag_'.$id]; } -$msgHash = array( +$msgHash = [ 'label' => KernelTools::tra( 'Drop Tags' ), 'confirm_item' => implode("
", $tags), 'warning' => KernelTools::tra( 'These tags will be dropped from this content.
This cannot be undone!' ), - ); + ]; $gBitSystem->confirmDialog( $formHash,$msgHash ); diff --git a/edit.php b/edit.php index 4e6e791..ebdc7a7 100755 --- a/edit.php +++ b/edit.php @@ -25,7 +25,7 @@ if ( !$gBitUser->hasPermission('p_tags_admin') ){ $tag = new LibertyTag(); if ( $tag->loadTag ( $_REQUEST ) ){ - $gBitSmarty->assign( 'tagData', $tag->mInfo ); + $gBitSmarty->assign( 'tagData', $tag->mInfo ); } if( !empty( $_REQUEST["save"] ) ) { @@ -34,4 +34,4 @@ if( !empty( $_REQUEST["save"] ) ) { } } -$gBitSystem->display( 'bitpackage:tags/edit_tag.tpl', KernelTools::tra( "Edit Tag" ) , array( 'display_mode' => 'edit' )); +$gBitSystem->display( 'bitpackage:tags/edit_tag.tpl', KernelTools::tra( "Edit Tag" ) , [ 'display_mode' => 'edit' ]); diff --git a/icons/pkg_tags.gif b/icons/pkg_tags.gif old mode 100644 new mode 100755 diff --git a/icons/pkg_tags.png b/icons/pkg_tags.png old mode 100644 new mode 100755 diff --git a/icons/tags.gif b/icons/tags.gif old mode 100644 new mode 100755 diff --git a/icons/tags.png b/icons/tags.png old mode 100644 new mode 100755 diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php index c4b1dfb..e80e742 100755 --- a/includes/bit_setup_inc.php +++ b/includes/bit_setup_inc.php @@ -14,9 +14,9 @@ $pRegisterHash = [ define( 'TAGS_PKG_NAME', $pRegisterHash['package_name'] ); define( 'TAGS_PKG_URL', BIT_ROOT_URL . basename( $pRegisterHash['package_path'] ) . '/' ); define( 'TAGS_PKG_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/' ); -define( 'TAGS_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/'); +define( 'TAGS_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/'); define( 'TAGS_PKG_CLASS_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/classes/'); -define( 'TAGS_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/'); +define( 'TAGS_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/'); $gBitSystem->registerPackage( $pRegisterHash ); if( $gBitSystem->isPackageActive( 'tags' ) && $gBitUser->hasPermission( 'p_tags_view' )) { @@ -30,9 +30,9 @@ if( $gBitSystem->isPackageActive( 'tags' ) && $gBitUser->hasPermission( 'p_tags_ ]; $gBitSystem->registerAppMenu( $menuHash ); - $gLibertySystem->registerService( - LIBERTY_SERVICE_TAGS, - TAGS_PKG_NAME, + $gLibertySystem->registerService( + LIBERTY_SERVICE_TAGS, + TAGS_PKG_NAME, [ 'content_display_function' => 'tags_content_display', 'content_edit_function' => 'tags_content_edit', @@ -45,10 +45,10 @@ if( $gBitSystem->isPackageActive( 'tags' ) && $gBitUser->hasPermission( 'p_tags_ 'content_nav_tpl' => 'bitpackage:tags/view_tags_nav.tpl', 'content_body_tpl' => 'bitpackage:tags/view_tags_body.tpl', 'users_expunge_function' => 'tags_user_expunge', - 'content_search_tpl' => 'bitpackage:tags/search_inc.tpl' + 'content_search_tpl' => 'bitpackage:tags/search_inc.tpl', + ], + [ + 'description' => KernelTools::tra( 'Enables the addition of tags to any content' ), ], - [ - 'description' => KernelTools::tra( 'Enables the addition of tags to any content' ), - ] ); } diff --git a/includes/classes/LibertyTag.php b/includes/classes/LibertyTag.php index df75c8c..12acd9f 100755 --- a/includes/classes/LibertyTag.php +++ b/includes/classes/LibertyTag.php @@ -12,6 +12,7 @@ * required setup */ namespace Bitweaver\Tags; + use Bitweaver\BitBase; use Bitweaver\Liberty\LibertyContent; @@ -26,7 +27,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { $this->mContentId = $pContentId; } - /* Delete when package complete! -wjames5 * methods needed * @@ -43,7 +43,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { * */ - /** * Load all the tags for a given ContentId * @param array pParamHash be sure to pass by reference in case we need to make modifcations to the hash @@ -57,13 +56,13 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { WHERE tgc.`content_id`=?"; //$this->mInfo = $this->mDb->query( $query, array( $this->mContentId ) ); - $result = $this->mDb->query( $query, array( $this->mContentId ) ); + $result = $this->mDb->query( $query, [ $this->mContentId ] ); if ($result) { $ret = []; while ($res = $result->fetchRow()) { //Add tag urls $res['tag_url'] = LibertyTag::getDisplayUrlWithTag($res['tag']); - + $ret[] = $res; } $this->mInfo['tags'] = $ret; @@ -88,15 +87,13 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { if ( $result = $this->mDb->getRow( $query, $bindVars ) ){ //Add tag url $result['tag_url'] = LibertyTag::getDisplayUrlWithTag($result['tag']); - + $this->mInfo = $result; }; } return count( $this->mInfo ); } - - /** * Make sure the data is safe to store * @param array pParams reference to hash of values that will be used to store the page, they will be modified where necessary @@ -115,7 +112,7 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { // $pParamHash['tag_map_store']['tag_id'] = $pParamHash['tag_id']; $pParamHash['tag_store']['tag_id'] = $pParamHash['tag_id']; } - $pParamHash['tag_map_store']['tagged_on'] = isset( $pParamHash['tagged_on']) ? $pParamHash['tagged_on'] : $gBitSystem->getUTCTime(); + $pParamHash['tag_map_store']['tagged_on'] = $pParamHash['tagged_on'] ?? $gBitSystem->getUTCTime(); if( @$this->verifyId( $pParamHash['content_id']) ){ $pParamHash['tag_map_store']['content_id'] = $pParamHash['content_id']; @@ -131,7 +128,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { return count( $this->mErrors )== 0; } - /* check tag exists */ function verifyTag ( &$pParamHash ){ @@ -163,8 +159,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { return $ret; } - - /** * @param array pParams hash of values that will be used to store the page * @return bool true on success, false if store could not occur. If false, $this->mErrors will have reason why @@ -193,8 +187,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { return count( $this->mErrors )== 0; } - - function storeOneTag( &$pParamHash ) { if( $this->verify( $pParamHash ) ) { $this->mDb->StartTrans(); @@ -203,7 +195,7 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { if( isset($pParamHash['tag_store']['tag_id']) ) { //this is kind of ugly but it works right - $this->mDb->associateUpdate( $tagtable, array("tag" => $pParamHash['tag_store']['tag']), array( "tag_id" => $pParamHash['tag_id'] ) ); + $this->mDb->associateUpdate( $tagtable, ["tag" => $pParamHash['tag_store']['tag']], [ "tag_id" => $pParamHash['tag_id'] ] ); } else { $pParamHash['tag_store']['tag_id'] = $this->mDb->GenID( 'tags_tag_id_seq' ); $this->mDb->associateInsert( $tagtable, $pParamHash['tag_store'] ); @@ -250,14 +242,14 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { $timeStamp = $gBitSystem->getUTCTime(); //need to break up this string - $tagMixed = isset($pParamHash['tags']) ? $pParamHash['tags'] : null; + $tagMixed = $pParamHash['tags'] ?? null; if( !empty( $tagMixed )){ if (!is_array( $tagMixed ) && !is_numeric( $tagMixed ) ){ $tagIds = explode( ",", $tagMixed ); }else if ( is_array( $tagMixed ) ) { $tagIds = $tagMixed; }else if ( is_numeric( $tagMixed ) ) { - $tagIds = array( $tagMixed ); + $tagIds = [ $tagMixed ]; } foreach( $tagIds as $value ) { @@ -266,12 +258,12 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { if( !empty($value) ) { $value = LibertyTag::sanitizeTag($value); if ( !empty($value) ) { - array_push( $pParamHash['tag_map_store'], array( + array_push( $pParamHash['tag_map_store'], [ 'tag' => $value, 'tagged_on' => $timeStamp, 'content_id' => $this->mContentId, 'user_id' => $gBitUser->mUserId, - )); + ]); } else { $this->mErrors[$value] = "Invalid tag."; @@ -283,7 +275,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { return count( $this->mErrors ) == 0; } - /** * @param array pParams hash includes mix of tags that will be storeded and associated with a ContentId used by service * @return bool true on success, false if store could not occur. If false, $this->mErrors will have reason why @@ -302,7 +293,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { return count( $this->mErrors ) == 0; } - /** * check if the mContentId is set and valid */ @@ -322,9 +312,9 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { $query = "DELETE FROM `".BIT_DB_PREFIX."tags` WHERE `tag_id` = ?"; if ( $result = $this->mDb->query( $query, [ $tag_id ] ) ) { $ret = true; - }else{ - //some rollback feature would be nice here } + //some rollback feature would be nice here + } $this->mDb->CompleteTrans(); } @@ -337,7 +327,7 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { if( $this->isValid() ) { $this->mDb->StartTrans(); $query = "DELETE FROM `".BIT_DB_PREFIX."tags_content_map` WHERE `content_id` = ?"; - $result = $this->mDb->query( $query, array( $this->mContentId ) ); + $result = $this->mDb->query( $query, [ $this->mContentId ] ); $this->mDb->CompleteTrans(); } return $ret; @@ -375,14 +365,14 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { $bind = array_merge($bind, $pTagIdArray); $result = $this->mDb->query( $query, $bind ); foreach( $pTagIdArray as $tagId ) { - if( !$this->mDb->getOne( "SELECT COUNT(*) FROM `".BIT_DB_PREFIX."tags_content_map` WHERE `tag_id`=?", array( $tagId ) ) ) { + if( !$this->mDb->getOne( "SELECT COUNT(*) FROM `".BIT_DB_PREFIX."tags_content_map` WHERE `tag_id`=?", [ $tagId ] ) ) { $this->expungeTag( $tagId ); } } $this->mDb->CompleteTrans(); } } - + function getDisplayUriWithTag( $tag ) { return BIT_BASE_URI.$this->getDisplayUrlWithTag( $tag ); } @@ -414,7 +404,7 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { $sort_mode_prefix = 'tg'; //Backward compatability for most popular sort method - + if( empty( $pParamHash['sort_mode'] ) ) { $pParamHash['sort_mode'] = 'tag_asc'; } else { @@ -497,13 +487,12 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { } } - //trim to max popular count if a limit is asked for if ( isset($pParamHash["max_popular"]) && is_numeric($pParamHash["max_popular"])){ $max_popular = $ret; array_multisort($popcant, SORT_DESC, $max_popular); - $max_popular = array_slice($max_popular, 0, $pParamHash["max_popular"]); - // preserve the sort requested by matching to the original list + $max_popular = array_slice($max_popular, 0, $pParamHash["max_popular"]); + // preserve the sort requested by matching to the original list $sorted_popular = []; foreach ( $ret as $retkey => $retrow){ foreach ( $max_popular as $key => $row){ @@ -515,14 +504,13 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { } $ret = $sorted_popular; } - + $pParamHash["data"] = $ret; $pParamHash["cant"] = $cant; - + return $pParamHash; } - /** * This function gets the number of times a tag is used aka Popularity Count **/ @@ -531,7 +519,7 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { SELECT COUNT( * ) FROM `".BIT_DB_PREFIX."tags_content_map` tgc WHERE tgc.`tag_id` = ?"; - $cant = $this->mDb->getOne($queryCount, array($tag_id) ); + $cant = $this->mDb->getOne($queryCount, [$tag_id] ); return $cant; } @@ -559,7 +547,7 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { $gBitSmarty->assign( 'contentTypes', $contentTypes ); $contentListHash['parameters']['content_type_guid'] = $contentSelect; $gBitSmarty->assign( 'listInfo', $contentListHash ); - $gBitSmarty->assign( 'content_type_guids', isset( $pParamHash['content_type_guid'] ) ? $pParamHash['content_type_guid'] : null ); + $gBitSmarty->assign( 'content_type_guids', $pParamHash['content_type_guid'] ?? null ); if ( isset($pParamHash['matchtags']) && $pParamHash['matchtags'] == 'all'){ //need some sort of matching function @@ -572,7 +560,6 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { return $distinctdata; } - /** * Used by getContentList to strip out duplicate records in a list * Lifted from http://us3.php.net/manual/en/function.array-unique.php#57006 @@ -583,8 +570,8 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { * @param $count_key - must be STRING - count the grouped keys */ function array_distinct ($array, $group_keys, $sum_keys = null, $count_key = null){ - if (!is_array ($group_keys)) $group_keys = array ($group_keys); - if (!is_array ($sum_keys)) $sum_keys = array ($sum_keys); + if (!is_array ($group_keys)) $group_keys = [$group_keys]; + if (!is_array ($sum_keys)) $sum_keys = [$sum_keys]; $existing_sub_keys = []; $output = []; @@ -619,7 +606,7 @@ class LibertyTag extends \Bitweaver\Liberty\LibertyBase { /********* SERVICE FUNCTIONS *********/ function tags_content_display( &$pObject ) { global $gBitSystem, $gBitSmarty, $gBitUser; - + if( method_exists( $pObject, 'getContentType' ) && $gBitSystem->isFeatureActive( 'tags_tag_'.$pObject->getContentType()) ){ if ( $gBitSystem->isPackageActive( 'tags' ) ) { if( $gBitUser->hasPermission( 'p_tags_view' ) ) { @@ -645,7 +632,7 @@ function tags_content_list_sql( &$pObject, &$pParamHash = null ) { // $ret['select_sql'] = ", tgc.`tag_id`, tgc.`tagger_id`, tgc.`tagged_on`"; $ret['join_sql'] = " INNER JOIN `".BIT_DB_PREFIX."tags_content_map` tgc ON ( lc.`content_id`=tgc.`content_id` ) INNER JOIN `".BIT_DB_PREFIX."tags` tg ON ( tg.`tag_id`=tgc.`tag_id` )"; - + $tagMixed = $pParamHash['tags']; //need to break up this string if( !empty( $tagMixed )){ if (!is_array( $tagMixed ) && !is_numeric( $tagMixed ) ){ @@ -653,7 +640,7 @@ function tags_content_list_sql( &$pObject, &$pParamHash = null ) { }else if ( is_array( $tagMixed ) ) { $tagIds = $tagMixed; }else if ( is_numeric( $tagMixed ) ) { - $tagIds = array( $tagMixed ); + $tagIds = [ $tagMixed ]; } } @@ -668,7 +655,7 @@ function tags_content_list_sql( &$pObject, &$pParamHash = null ) { } $ret['where_sql'] = ' AND tg.`tag` IN ('.implode( ',', array_fill(0, count( $tags ), '?' ) ).')'; - + $ret['bind_vars'] = $tags; // return the values sent for pagination / url purposes @@ -681,7 +668,7 @@ function tags_content_list_sql( &$pObject, &$pParamHash = null ) { function tags_content_edit( $pObject=null ) { global $gBitSystem, $gBitSmarty, $gBitUser; - + if( method_exists( $pObject, 'getContentType' ) && $gBitSystem->isFeatureActive( 'tags_tag_'.$pObject->getContentType()) ){ if ( $gBitSystem->isPackageActive( 'tags' )) { $tag = new LibertyTag( $pObject->mContentId ); @@ -747,7 +734,7 @@ function tags_content_expunge( &$pObject ) { function tags_user_expunge( &$pObject ) { if( is_a( $pObject, 'BitUser' ) && !empty( $pObject->mUserId ) ) { $pObject->mDb->StartTrans(); - $pObject->mDb->query( "DELETE FROM `".BIT_DB_PREFIX."tags_content_map` WHERE tagger_id=?", array( $pObject->mUserId ) ); + $pObject->mDb->query( "DELETE FROM `".BIT_DB_PREFIX."tags_content_map` WHERE tagger_id=?", [ $pObject->mUserId ] ); $pObject->mDb->CompleteTrans(); } } diff --git a/index.php b/index.php index ac4253a..1a52d22 100755 --- a/index.php +++ b/index.php @@ -26,10 +26,10 @@ if( isset($_REQUEST['tags']) ){ $tagData = $tag->getList( $tagHash ); $gBitSmarty->assign( 'tagData', $tagData["data"] ); $gBitSmarty->assign( 'tagsReq', $_REQUEST['tags'] ); - $gBitSystem->display( 'bitpackage:tags/list_content.tpl', $pageTitle, array( 'display_mode' => 'display' )); + $gBitSystem->display( 'bitpackage:tags/list_content.tpl', $pageTitle, [ 'display_mode' => 'display' ]); }else{ $listData = $tag->getList( $listHash ); $gBitSmarty->assign( 'tagData', $listData["data"] ); - $gBitSystem->display( 'bitpackage:tags/list_tags.tpl', KernelTools::tra( 'Tags' ) , array( 'display_mode' => 'display' )); - + $gBitSystem->display( 'bitpackage:tags/list_tags.tpl', KernelTools::tra( 'Tags' ) , [ 'display_mode' => 'display' ]); + } diff --git a/list.php b/list.php index e20b28a..0950a52 100755 --- a/list.php +++ b/list.php @@ -24,10 +24,10 @@ if( !empty( $_REQUEST['action'] ) ) { if ( !$gBitUser->hasPermission('p_tags_moderate') ){ $gBitSystem->fatalError( KernelTools::tra('You do not have permission to remove tags.') ); } - + $tmpTag = new LibertyTag(); $tmpTag->loadTag($_REQUEST); - + if( isset( $_REQUEST["confirm"] ) ) { if( $tmpTag->expungeTag( $tmpTag->mInfo['tag_id'] ) ) { KernelTools::bit_redirect( TAGS_PKG_URL.'list.php?status_id='.( !empty( $_REQUEST['status_id'] ) ? $_REQUEST['status_id'] : '' ) ); @@ -40,12 +40,12 @@ if( !empty( $_REQUEST['action'] ) ) { $formHash['action'] = 'remove'; $formHash['status_id'] = !empty( $_REQUEST['status_id'] ) ? $_REQUEST['status_id'] : ''; $formHash['tag_id'] = $_REQUEST['tag_id']; - $msgHash = array( + $msgHash = [ 'label' => KernelTools::tra('Remove Tag'), 'confirm_item' => $tmpTag->mInfo['tag'], 'warning' => 'This will remove the above tag.', 'error' => KernelTools::tra('This cannot be undone!'), - ); + ]; $gBitSystem->confirmDialog( $formHash, $msgHash ); } } @@ -66,9 +66,9 @@ if( isset($_REQUEST['tags']) ){ $tagData = $tag->getList( $tagHash ); $gBitSmarty->assign( 'tagData', $tagData["data"] ); $gBitSmarty->assign( 'tagsReq', $_REQUEST['tags'] ); - $gBitSystem->display( 'bitpackage:tags/list_content.tpl', $pageTitle, array( 'display_mode' => 'list' )); + $gBitSystem->display( 'bitpackage:tags/list_content.tpl', $pageTitle, [ 'display_mode' => 'list' ]); }else{ $listData = $tag->getList( $listHash ); $gBitSmarty->assign( 'tagData', $listData["data"] ); - $gBitSystem->display( 'bitpackage:tags/list_tags.tpl', KernelTools::tra( 'Tags' ) , array( 'display_mode' => 'list' )); + $gBitSystem->display( 'bitpackage:tags/list_tags.tpl', KernelTools::tra( 'Tags' ) , [ 'display_mode' => 'list' ]); } diff --git a/modules/help_mod_tags_cloud.tpl b/modules/help_mod_tags_cloud.tpl old mode 100644 new mode 100755 diff --git a/modules/mod_tags_cloud.tpl b/modules/mod_tags_cloud.tpl old mode 100644 new mode 100755 diff --git a/templates/admin_tags.tpl b/templates/admin_tags.tpl old mode 100644 new mode 100755 diff --git a/templates/edit_tag.tpl b/templates/edit_tag.tpl old mode 100644 new mode 100755 diff --git a/templates/list_content.tpl b/templates/list_content.tpl old mode 100644 new mode 100755 diff --git a/templates/list_tags.tpl b/templates/list_tags.tpl old mode 100644 new mode 100755 diff --git a/templates/menu_tags.tpl b/templates/menu_tags.tpl old mode 100644 new mode 100755 diff --git a/templates/menu_tags_admin.tpl b/templates/menu_tags_admin.tpl old mode 100644 new mode 100755 diff --git a/templates/search_inc.tpl b/templates/search_inc.tpl old mode 100644 new mode 100755 diff --git a/templates/tags.css b/templates/tags.css old mode 100644 new mode 100755 diff --git a/templates/tags_cloud.tpl b/templates/tags_cloud.tpl old mode 100644 new mode 100755 diff --git a/templates/tags_list.tpl b/templates/tags_list.tpl old mode 100644 new mode 100755 diff --git a/templates/view_tags_body.tpl b/templates/view_tags_body.tpl old mode 100644 new mode 100755 diff --git a/templates/view_tags_nav.tpl b/templates/view_tags_nav.tpl old mode 100644 new mode 100755 diff --git a/templates/view_tags_view.tpl b/templates/view_tags_view.tpl old mode 100644 new mode 100755 -- cgit v1.3