diff options
| -rw-r--r-- | includes/classes/LibertyContent.php | 4 | ||||
| -rw-r--r-- | includes/liberty_lib.php | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/includes/classes/LibertyContent.php b/includes/classes/LibertyContent.php index 4da4f1b..4c148df 100644 --- a/includes/classes/LibertyContent.php +++ b/includes/classes/LibertyContent.php @@ -1163,7 +1163,7 @@ class LibertyContent extends LibertyBase implements BitCacheable { * Set up SQL strings for services used by the object * TODO: set this function deprecated and eventually nuke it */ - function getServicesSql( $pServiceFunction, &$pSelectSql, &$pJoinSql, &$pWhereSql, &$pBindVars, $pObject = NULL, &$pParamHash = NULL ) { + static protected function getServicesSql( $pServiceFunction, &$pSelectSql, &$pJoinSql, &$pWhereSql, &$pBindVars, $pObject = NULL, &$pParamHash = NULL ) { //deprecated( 'You package is calling the deprecated LibertyContent::getServicesSql() method. Please update your code to use LibertyContent::getLibertySql' ); global $gLibertySystem; if( $loadFuncs = $gLibertySystem->getServiceValues( $pServiceFunction ) ) { @@ -1172,7 +1172,7 @@ class LibertyContent extends LibertyBase implements BitCacheable { if( !empty( $pObject ) && is_object( $pObject ) ) { $loadHash = $func( $pObject, $pParamHash ); } else { - $loadHash = $func( $this, $pParamHash ); + $loadHash = $func( (!empty( $pObject ) ? $this : NULL), $pParamHash ); } if( !empty( $loadHash['select_sql'] ) ) { $pSelectSql .= $loadHash['select_sql']; diff --git a/includes/liberty_lib.php b/includes/liberty_lib.php index 4c6f125..6d1c7cc 100644 --- a/includes/liberty_lib.php +++ b/includes/liberty_lib.php @@ -276,7 +276,7 @@ function liberty_plugins_wrapper_style( $pParamHash ) { * @access public * @return content load sql */ -function liberty_content_load_sql( &$pObject, $pParamHash=NULL ) { +function liberty_content_load_sql( $pObject, $pParamHash=NULL ) { global $gBitSystem, $gBitUser; $ret = array(); @@ -314,7 +314,7 @@ function liberty_content_load_sql( &$pObject, $pParamHash=NULL ) { * @access public * @return content list sql */ -function liberty_content_list_sql( &$pObject, $pParamHash=NULL ) { +function liberty_content_list_sql( $pObject, $pParamHash=NULL ) { global $gBitSystem, $gBitUser; $ret = array(); @@ -363,7 +363,7 @@ function liberty_content_list_sql( &$pObject, $pParamHash=NULL ) { * @access public * @return void */ -function liberty_content_preview( &$pObject ) { +function liberty_content_preview( $pObject ) { global $gBitSystem, $gBitUser; if( $gBitSystem->isFeatureActive( 'liberty_display_status' ) && ( $gBitUser->hasPermission( 'p_liberty_edit_content_status' ) || $gBitUser->hasPermission( 'p_libert_edit_all_status' )) @@ -386,7 +386,7 @@ function liberty_content_preview( &$pObject ) { * @access public * @return void */ -function liberty_content_display( &$pObject, &$pParamHash ) { +function liberty_content_display( $pObject, &$pParamHash ) { if( $pObject->isValid() ) { global $gBitUser, $gBitSystem; @@ -405,9 +405,9 @@ function liberty_content_display( &$pObject, &$pParamHash ) { * @access public * @return void */ -function liberty_content_edit( &$pObject ) { - include_once( LIBERTY_PKG_INCLUDE_PATH.'edit_help_inc.php' ); - include_once( LIBERTY_PKG_INCLUDE_PATH.'edit_storage_inc.php' ); +function liberty_content_edit( $pObject ) { + include_once( LIBERTY_PKG_PATH.'edit_help_inc.php' ); + include_once( LIBERTY_PKG_PATH."edit_storage_inc.php" ); } |
