diff options
| author | lsces <lester@lsces.co.uk> | 2025-08-27 17:01:22 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2025-08-27 17:01:22 +0100 |
| commit | cd65f3b9afa75bc70c95a08949c965bde43d98fd (patch) | |
| tree | 8ff77a7e18fefce950db7bc36bc4671295722f83 /admin | |
| parent | 0ae6ef9faac97b5cdc316d7d701adc05ce651002 (diff) | |
| download | feed-cd65f3b9afa75bc70c95a08949c965bde43d98fd.tar.gz feed-cd65f3b9afa75bc70c95a08949c965bde43d98fd.tar.bz2 feed-cd65f3b9afa75bc70c95a08949c965bde43d98fd.zip | |
updated to PHP8.4 and namespace
Diffstat (limited to 'admin')
| -rwxr-xr-x[-rw-r--r--] | admin/admin_feed_inc.php | 7 | ||||
| -rwxr-xr-x[-rw-r--r--] | admin/schema_inc.php | 24 |
2 files changed, 13 insertions, 18 deletions
diff --git a/admin/admin_feed_inc.php b/admin/admin_feed_inc.php index 86115c1..b3e2512 100644..100755 --- a/admin/admin_feed_inc.php +++ b/admin/admin_feed_inc.php @@ -2,7 +2,6 @@ global $gBitSmarty; - $contentTypes = get_content_types(); if( !empty( $_REQUEST['store_feed'] ) ) { @@ -13,14 +12,14 @@ if( !empty( $_REQUEST['store_feed'] ) ) { foreach ( array_keys( $contentTypes ) as $type ){ if( !empty( $_REQUEST[$type]['conjugation_phrase'] ) || !empty( $_REQUEST[$type]['is_target_linked'] ) ) { $insertSql = "INSERT INTO feed_conjugation (content_type_guid, conjugation_phrase, is_target_linked) VALUES ( ?, ?, ?)"; - $gBitDb->query($insertSql, array( $type, $_REQUEST[$type]['conjugation_phrase'], empty($_REQUEST[$type]['is_target_linked'])?'y' : NULL ) ); + $gBitDb->query($insertSql, array( $type, $_REQUEST[$type]['conjugation_phrase'], empty($_REQUEST[$type]['is_target_linked'])?'y' : null ) ); } } } $contentTypes = get_content_types(); -$gBitSmarty->assignByRef('contentTypes',$contentTypes); +$gBitSmarty->assign('contentTypes',$contentTypes); @@ -31,5 +30,3 @@ function get_content_types(){ return $contentTypes; } - -?> diff --git a/admin/schema_inc.php b/admin/schema_inc.php index d1b38f2..d61d542 100644..100755 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -1,5 +1,5 @@ <?php -$tables = array( +$tables = [ 'feed_conjugation' => " content_type_guid C(16) NOTNULL, conjugation_phrase C(255) NOTNULL, @@ -7,7 +7,7 @@ $tables = array( is_target_linked C(1) " // CONSTRAINT ', CONSTRAINT `feed_conj_content_type_ref` FOREIGN KEY (`content_type_guid`) REFERENCES `".BIT_DB_PREFIX."liberty_content_types` ( `content_type_guid` )' -); +]; global $gBitInstaller; @@ -15,21 +15,19 @@ foreach( array_keys( $tables ) AS $tableName ) { $gBitInstaller->registerSchemaTable( FEED_PKG_NAME, $tableName, $tables[$tableName] ); } -$gBitInstaller->registerSchemaDefault( FEED_PKG_NAME, array( +$gBitInstaller->registerSchemaDefault( FEED_PKG_NAME, [ "INSERT INTO `".BIT_DB_PREFIX."feed_conjugation` (`content_type_guid`, `conjugation_phrase`, `is_target_linked`,`feed_icon_url`) VALUES ('bituser', 'updated their profile', 'y','".FEED_PKG_URL."icons/pixelmixerbasic/user_16.png')", "INSERT INTO `".BIT_DB_PREFIX."feed_conjugation` (`content_type_guid`,`conjugation_phrase`,`is_target_linked`,`feed_icon_url`) VALUES ('bitcomment','commented','y','".FEED_PKG_URL."icons/pixelmixerbasic/bubble_16.png')", -)); +] ); -$gBitInstaller->registerPackageInfo( FEED_PKG_NAME, array( +$gBitInstaller->registerPackageInfo( FEED_PKG_NAME, [ 'description' => "User feed package that makes use of Liberty action log", 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', -) ); +] ); // ### Default UserPermissions -$gBitInstaller->registerUserPermissions( FEED_PKG_NAME, array( - array( 'p_feed_admin', 'Can admin feeds', 'admin', FEED_PKG_NAME ), - array( 'p_feed_master', 'Can view master feed', 'registered', FEED_PKG_NAME ), - array( 'p_feed_view', 'Can view feed', 'basic', FEED_PKG_NAME ), -) ); - -?> +$gBitInstaller->registerUserPermissions( FEED_PKG_NAME, [ + [ 'p_feed_admin', 'Can admin feeds', 'admin', FEED_PKG_NAME ], + [ 'p_feed_master', 'Can view master feed', 'registered', FEED_PKG_NAME ], + [ 'p_feed_view', 'Can view feed', 'basic', FEED_PKG_NAME ], +] ); |
