public/wordpress/wp-content/plugins/backupbuddy/destinations/live/live_periodic.php
/* _load_catalog()
	 *
	 * Loads the catalog into a class variable for usage by functions.
	 *
	 */
_load_catalog()
Loads the catalog into a class variable for usage by functions.
_load_catalog () Loads the catalog into a class variable for usage by functions .
private static function _load_catalog( $force_reload = false, $get_contents_only = false ) {
		if ( is_object( self::$_catalogObj ) && ( true !== $force_reload ) ) {
			return self::$_catalogObj;
		}
		if ( true === $force_reload ) {
			unset( self::$_catalogObj );
		}
		$read_only = false;
		$ignore_lock = self::_fileoptions_lock_ignore_timeout_value();
		if ( true === $get_contents_only ) {
			$read_only = true;
			$ignore_lock = true;
		}
		require_once( pb_backupbuddy::plugin_path() . '/classes/fileoptions.php' );
		$catalogObj = new pb_backupbuddy_fileoptions( backupbuddy_core::getLogDirectory() . 'live/catalog-' . pb_backupbuddy::$options['log_serial'] . '.txt', $read_only, $ignore_lock, $create_file = true, $live_mode = true );
		if ( true !== ( $result = $catalogObj->is_ok() ) ) {
			pb_backupbuddy::status( 'error', 'Error #239239034. Fatal error. Unable to create or access CATALOG fileoptions file. Details: `' . $result . '`. Waiting a moment before ending. Read only: `' . $read_only . '`, ignore lock: `' . $ignore_lock . '`, contents only: `' . $get_contents_only . '`. Caller: `' . backupbuddy_core::getCallingFunctionName() . '`.' );
			sleep( 3 ); 
			return false;
		}
		if ( ! is_array( $catalogObj->options ) ) {
			$catalogObj->options = array();
		}
		if ( true === $get_contents_only ) {
			return $catalogObj->options;
		}
		self::$_catalogObj = &$catalogObj;
		self::$_catalog = &$catalogObj->options;
		return true;
	}
private static function _load_catalog ( $ force_reload = false , $ get_contents_only = false ) { if ( is_object ( self :: $ _catalogObj ) && ( true !== $ force_reload ) ) { return self :: $ _catalogObj ; } if ( true === $ force_reload ) { unset ( self :: $ _catalogObj ) ; } $ read_only = false ; $ ignore_lock = self :: _fileoptions_lock_ignore_timeout_value ( ) ; if ( true === $ get_contents_only ) { $ read_only = true ; $ ignore_lock = true ; } require_once ( pb_backupbuddy :: plugin_path ( ) . '/classes/fileoptions.php' ) ; $ catalogObj = new pb_backupbuddy_fileoptions ( backupbuddy_core :: getLogDirectory ( ) . 'live/catalog-' . pb_backupbuddy :: $ options [ 'log_serial' ] . '.txt' , $ read_only , $ ignore_lock , $ create_file = true , $ live_mode = true ) ; if ( true !== ( $ result = $ catalogObj -> is_ok ( ) ) ) { pb_backupbuddy :: status ( 'error' , 'Error #239239034. Fatal error. Unable to create or access CATALOG fileoptions file. Details: `' . $ result . '`. Waiting a moment before ending. Read only: `' . $ read_only . '`, ignore lock: `' . $ ignore_lock . '`, contents only: `' . $ get_contents_only . '`. Caller: `' . backupbuddy_core :: getCallingFunctionName ( ) . '`.' ) ; sleep ( 3 ) ; return false ; } if ( ! is_array ( $ catalogObj -> options ) ) { $ catalogObj -> options = array ( ) ; } if ( true === $ get_contents_only ) { return $ catalogObj -> options ; } self :: $ _catalogObj = & $ catalogObj ; self :: $ _catalog = & $ catalogObj -> options ; return true ; }
_load_catalog()
 Loads the catalog into a class variable for usage by functions.
_load_catalog () Loads the catalog into a class variable for usage by functions .
// Wait a moment to give time for temporary issues to resolve. // Set defaults. //$catalogObj->options = array_merge( self::$_catalogDefaults, $catalogObj->options ); // Getting contents only. // Set class variables with references to object and options within.