summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 09:52:56 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 09:52:56 +0100
commited7ded38465662eabdd1b16dd9cd4008d6c5528f (patch)
tree7c3ebe7246ac47f6b7bbca3419f22be3718892f6 /admin
parent758faa3c26c4756874616e87e0433691e8393b6e (diff)
downloadsearch-ed7ded38465662eabdd1b16dd9cd4008d6c5528f.tar.gz
search-ed7ded38465662eabdd1b16dd9cd4008d6c5528f.tar.bz2
search-ed7ded38465662eabdd1b16dd9cd4008d6c5528f.zip
php-cs-fixer tidies to php8.5 standards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'admin')
-rw-r--r--admin/admin_search_inc.php1
-rw-r--r--admin/index.php2
-rw-r--r--admin/schema_inc.php27
3 files changed, 15 insertions, 15 deletions
diff --git a/admin/admin_search_inc.php b/admin/admin_search_inc.php
index 4db321e..b290efa 100644
--- a/admin/admin_search_inc.php
+++ b/admin/admin_search_inc.php
@@ -1,5 +1,6 @@
<?php
namespace Bitweaver\Search;
+
use Bitweaver\KernelTools;
// $Header$
diff --git a/admin/index.php b/admin/index.php
index 3e305fe..c0437d0 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
// This is not a package.
header ("location: ../index.php");
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 55a4522..60ece95 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -1,6 +1,6 @@
<?php
-$tables = [
+$tables = [
'search_index' => "
searchword C(80) PRIMARY,
@@ -23,34 +23,33 @@ $tables = [
'search_stats' => "
term C(50) PRIMARY,
hits I4
-"
+",
] ;
-
global $gBitInstaller;
foreach( array_keys( $tables ) AS $tableName ) {
$gBitInstaller->registerSchemaTable( SEARCH_PKG_NAME, $tableName, $tables[$tableName] );
}
-$indices = [
+$indices = [
'searchidx_last_update_idx' => [ 'table' => 'search_index', 'cols' => 'last_update', 'opts' => null ],
'searchidx_word_idx' => [ 'table' => 'search_index', 'cols' => 'searchword', 'opts' => null ],
'searchidx_con_idx' => [ 'table' => 'search_index', 'cols' => 'content_id', 'opts' => null ],
- 'searchsyl_last_used_idx' => [ 'table' => 'search_syllable', 'cols' => 'last_used', 'opts' => null ]
+ 'searchsyl_last_used_idx' => [ 'table' => 'search_syllable', 'cols' => 'last_used', 'opts' => null ],
];
$gBitInstaller->registerSchemaIndexes( SEARCH_PKG_NAME, $indices );
-$gBitInstaller->registerPackageInfo( SEARCH_PKG_NAME, [
+$gBitInstaller->registerPackageInfo( SEARCH_PKG_NAME, [
'description' => "This package makes any content on your site searchable.",
'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>',
] );
// ### Default Preferences
// [ SEARCH_PKG_NAME, 'search_fulltext','y' ],
-$gBitInstaller->registerPreferences( SEARCH_PKG_NAME, [
+$gBitInstaller->registerPreferences( SEARCH_PKG_NAME, [
[ SEARCH_PKG_NAME, 'search_stats','n' ],
[ SEARCH_PKG_NAME, 'search_index_on_submit','n' ],
[ SEARCH_PKG_NAME, 'search_refresh_rate','5' ],
@@ -58,20 +57,20 @@ $gBitInstaller->registerPreferences( SEARCH_PKG_NAME, [
[ SEARCH_PKG_NAME, 'search_max_syllwords','100' ],
[ SEARCH_PKG_NAME, 'search_lru_purge_rate','5' ],
[ SEARCH_PKG_NAME, 'search_lru_length','100' ],
- [ SEARCH_PKG_NAME, 'search_syll_age','48' ]
+ [ SEARCH_PKG_NAME, 'search_syll_age','48' ],
] );
-$moduleHash = [
- 'mod_package_search' => [
+$moduleHash = [
+ 'mod_package_search' => [
'title' => 'Search',
'ord' => 3,
'pos' => 'r',
- 'module_rsrc' => 'bitpackage:search/mod_package_search.tpl'
-] ];
+ 'module_rsrc' => 'bitpackage:search/mod_package_search.tpl',
+], ];
$gBitInstaller->registerModules( $moduleHash );
// Requirements
-$gBitInstaller->registerRequirements( SEARCH_PKG_NAME, [
- 'liberty' => [ 'min' => '5.0.0' ],
+$gBitInstaller->registerRequirements( SEARCH_PKG_NAME, [
+ 'liberty' => [ 'min' => '5.0.0' ],
] );