summaryrefslogtreecommitdiff
path: root/admin/schema_inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/schema_inc.php')
-rw-r--r--admin/schema_inc.php54
1 files changed, 27 insertions, 27 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 8d26111..55a4522 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -1,6 +1,6 @@
<?php
-$tables = array(
+$tables = [
'search_index' => "
searchword C(80) PRIMARY,
@@ -25,7 +25,7 @@ $tables = array(
hits I4
"
-) ;
+] ;
global $gBitInstaller;
@@ -34,44 +34,44 @@ foreach( array_keys( $tables ) AS $tableName ) {
$gBitInstaller->registerSchemaTable( SEARCH_PKG_NAME, $tableName, $tables[$tableName] );
}
-$indices = array (
- 'searchidx_last_update_idx' => array( 'table' => 'search_index', 'cols' => 'last_update', 'opts' => NULL ),
- 'searchidx_word_idx' => array( 'table' => 'search_index', 'cols' => 'searchword', 'opts' => NULL ),
- 'searchidx_con_idx' => array( 'table' => 'search_index', 'cols' => 'content_id', 'opts' => NULL ),
- 'searchsyl_last_used_idx' => array( 'table' => 'search_syllable', 'cols' => 'last_used', 'opts' => NULL )
-);
+$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 ]
+];
$gBitInstaller->registerSchemaIndexes( SEARCH_PKG_NAME, $indices );
-$gBitInstaller->registerPackageInfo( SEARCH_PKG_NAME, array(
+$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
-// array(SEARCH_PKG_NAME, 'search_fulltext','y'),
-$gBitInstaller->registerPreferences( SEARCH_PKG_NAME, array(
- array(SEARCH_PKG_NAME, 'search_stats','n'),
- array(SEARCH_PKG_NAME, 'search_index_on_submit','n'),
- array(SEARCH_PKG_NAME, 'search_refresh_rate','5'),
- array(SEARCH_PKG_NAME, 'search_min_wordlength','3'),
- array(SEARCH_PKG_NAME, 'search_max_syllwords','100'),
- array(SEARCH_PKG_NAME, 'search_lru_purge_rate','5'),
- array(SEARCH_PKG_NAME, 'search_lru_length','100'),
- array(SEARCH_PKG_NAME, 'search_syll_age','48')
-) );
+// [ SEARCH_PKG_NAME, 'search_fulltext','y' ],
+$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' ],
+ [ SEARCH_PKG_NAME, 'search_min_wordlength','3' ],
+ [ 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' ]
+] );
-$moduleHash = array(
- 'mod_package_search' => array(
+$moduleHash = [
+ 'mod_package_search' => [
'title' => 'Search',
'ord' => 3,
'pos' => 'r',
'module_rsrc' => 'bitpackage:search/mod_package_search.tpl'
-) );
+] ];
$gBitInstaller->registerModules( $moduleHash );
// Requirements
-$gBitInstaller->registerRequirements( SEARCH_PKG_NAME, array(
- 'liberty' => array( 'min' => '2.1.4' ),
-));
+$gBitInstaller->registerRequirements( SEARCH_PKG_NAME, [
+ 'liberty' => [ 'min' => '5.0.0' ],
+] );