From 6405d64233f5508bde52d0288ed70dbb8d616ae6 Mon Sep 17 00:00:00 2001 From: spiderr Date: Sat, 13 Feb 2021 22:02:06 -0500 Subject: update package_path in bit_setup_inc --- bit_setup_inc.php | 66 ---------------------------------------------- includes/bit_setup_inc.php | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-) delete mode 100644 bit_setup_inc.php create mode 100644 includes/bit_setup_inc.php diff --git a/bit_setup_inc.php b/bit_setup_inc.php deleted file mode 100644 index e7fc6d3..0000000 --- a/bit_setup_inc.php +++ /dev/null @@ -1,66 +0,0 @@ - - * @version $Revision$ - * @package liberty - * @subpackage functions - */ - -$registerHash = array( - 'package_name' => 'liberty', - 'package_path' => dirname( __FILE__ ).'/', - 'required_package'=> TRUE, -); -$gBitSystem->registerPackage( $registerHash ); - -// initiate LibertySystem -require_once( LIBERTY_PKG_CLASS_PATH.'LibertySystem.php' ); -LibertySystem::loadSingleton(); -$gBitSmarty->assignByRef( 'gLibertySystem', $gLibertySystem ); - -// We can't load this in liberty/bit_setup_inc.php becuase it's too soon in the process. -// packages haven't been scanned yet making things like _PKG_URL and similar -// unavailable to the plugins that are kept in /liberty_plugins/ -$current_default_format_guid = $gBitSystem->getConfig( 'default_format' ); -if( $gLibertySystem->mDb->isValid() ) { // install condition check - $plugin_status = $gBitSystem->getConfig( 'liberty_plugin_status_'.$current_default_format_guid ); - if( empty( $current_default_format_guid ) || empty( $plugin_status ) || $plugin_status != 'y' ) { - $gLibertySystem->scanAllPlugins(); - } else { - $gLibertySystem->loadActivePlugins(); - } -} - -$gLibertySystem->registerService( 'liberty', - LIBERTY_PKG_NAME, - array( - 'content_edit_mini_tpl' => 'bitpackage:liberty/service_content_edit_mini_inc.tpl', - 'content_edit_tab_tpl' => 'bitpackage:liberty/service_content_edit_tab_inc.tpl', - 'content_icon_tpl' => 'bitpackage:liberty/service_content_icon_inc.tpl', - 'content_body_tpl' => 'bitpackage:liberty/service_content_body_inc.tpl', - 'content_display_function' => 'liberty_content_display', - //'content_load_function' => 'liberty_content_load', - 'content_edit_function' => 'liberty_content_edit', - //'content_store_function' => 'liberty_content_store', - 'content_load_sql_function' => 'liberty_content_load_sql', - 'content_list_sql_function' => 'liberty_content_list_sql', - 'content_preview_function' => 'liberty_content_preview', - ), - array( - 'description' => tra( 'Provides core functionality, including enforcing some access control and dynamic layout components.' ), - 'required' => TRUE, - ) -); - -// delete cache file if requested -if( !empty( $_REQUEST['refresh_liberty_cache'] ) && BitBase::verifyId( $_REQUEST['refresh_liberty_cache'] )) { - require_once( LIBERTY_PKG_CLASS_PATH.'LibertyContent.php' ); - LibertyContent::expungeCacheFile( $_REQUEST['refresh_liberty_cache'] ); -} - -// make thumbnail sizes available to smarty -global $gThumbSizes; -$gBitSmarty->assignByRef( 'gThumbSizes', $gThumbSizes ); -?> diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php new file mode 100644 index 0000000..88238c7 --- /dev/null +++ b/includes/bit_setup_inc.php @@ -0,0 +1,66 @@ + + * @version $Revision$ + * @package liberty + * @subpackage functions + */ + +$registerHash = array( + 'package_name' => 'liberty', + 'package_path' => dirname( dirname( __FILE__ ) ).'/', + 'required_package'=> TRUE, +); +$gBitSystem->registerPackage( $registerHash ); + +// initiate LibertySystem +require_once( LIBERTY_PKG_CLASS_PATH.'LibertySystem.php' ); +LibertySystem::loadSingleton(); +$gBitSmarty->assignByRef( 'gLibertySystem', $gLibertySystem ); + +// We can't load this in liberty/bit_setup_inc.php becuase it's too soon in the process. +// packages haven't been scanned yet making things like _PKG_URL and similar +// unavailable to the plugins that are kept in /liberty_plugins/ +$current_default_format_guid = $gBitSystem->getConfig( 'default_format' ); +if( $gLibertySystem->mDb->isValid() ) { // install condition check + $plugin_status = $gBitSystem->getConfig( 'liberty_plugin_status_'.$current_default_format_guid ); + if( empty( $current_default_format_guid ) || empty( $plugin_status ) || $plugin_status != 'y' ) { + $gLibertySystem->scanAllPlugins(); + } else { + $gLibertySystem->loadActivePlugins(); + } +} + +$gLibertySystem->registerService( 'liberty', + LIBERTY_PKG_NAME, + array( + 'content_edit_mini_tpl' => 'bitpackage:liberty/service_content_edit_mini_inc.tpl', + 'content_edit_tab_tpl' => 'bitpackage:liberty/service_content_edit_tab_inc.tpl', + 'content_icon_tpl' => 'bitpackage:liberty/service_content_icon_inc.tpl', + 'content_body_tpl' => 'bitpackage:liberty/service_content_body_inc.tpl', + 'content_display_function' => 'liberty_content_display', + //'content_load_function' => 'liberty_content_load', + 'content_edit_function' => 'liberty_content_edit', + //'content_store_function' => 'liberty_content_store', + 'content_load_sql_function' => 'liberty_content_load_sql', + 'content_list_sql_function' => 'liberty_content_list_sql', + 'content_preview_function' => 'liberty_content_preview', + ), + array( + 'description' => tra( 'Provides core functionality, including enforcing some access control and dynamic layout components.' ), + 'required' => TRUE, + ) +); + +// delete cache file if requested +if( !empty( $_REQUEST['refresh_liberty_cache'] ) && BitBase::verifyId( $_REQUEST['refresh_liberty_cache'] )) { + require_once( LIBERTY_PKG_CLASS_PATH.'LibertyContent.php' ); + LibertyContent::expungeCacheFile( $_REQUEST['refresh_liberty_cache'] ); +} + +// make thumbnail sizes available to smarty +global $gThumbSizes; +$gBitSmarty->assignByRef( 'gThumbSizes', $gThumbSizes ); +?> -- cgit v1.3