Beispiel #1
0
function snapshot_utility_consume_archive_manifest($manifestFile) {

	$snapshot_manifest = array();
	$manifest_array = file($manifestFile);
	if ($manifest_array) {

		foreach($manifest_array as $file_line) {
			list($key, $value) = explode(':', $file_line, 2);
			$key = trim($key);

			if ($key == "TABLES") {
				if (is_serialized_snapshot($value)) {
					$value = maybe_unserialize_snapshot($value);
				} else {
					$table_values = explode(',', $value);

					foreach($table_values as $idx => $table_name) {
						$table_values[$idx] = trim($table_name);
					}

					$value = $table_values;
				}
			} else if (($key == "TABLES-DATA") || ($key == "ITEM") || ($key == "FILES-DATA")) {
				$value = maybe_unserialize_snapshot($value);
			} else {
				$value = trim($value);
			}

			$snapshot_manifest[$key] = $value;
		}
		//echo "snapshot_manifest<pre>"; print_r($snapshot_manifest); echo "</pre>";

		if (isset($snapshot_manifest['VERSION'])) {
			if (($snapshot_manifest['VERSION'] == "1.0") && (!isset($snapshot_manifest['TABLES-DATA']))) {

				$backupFile = trailingslashit_snapshot($sessionRestoreFolder) . 'snapshot_backups.sql';
				$table_segments = snapshot_utility_get_table_segments_from_single($backupFile);

				if ($table_segments) {
					$snapshot_manifest['TABLES-DATA'] = $table_segments;
					unlink($backupFile);
				}
			}
		}
		return $snapshot_manifest;
	}
}
function snapshot_utility_consume_archive_manifest($manifestFile) {

	$snapshot_manifest = array();
	$manifest_array = file($manifestFile);
	if ($manifest_array) {

		foreach($manifest_array as $file_line) {
			list($key, $value) = explode(':', $file_line, 2);
			$key = trim($key);

			if ($key == "TABLES") {
				if (is_serialized($value)) {
					$value = maybe_unserialize($value);
				} else {
					$table_values = explode(',', $value);

					foreach($table_values as $idx => $table_name) {
						$table_values[$idx] = trim($table_name);
					}

					$value = $table_values;
				}
			} else if (($key == "TABLES-DATA") || ($key == "ITEM") || ($key == "FILES-DATA") || ($key == 'WP_UPLOAD_URLS')) {
                if ( is_serialized( $value ) ){
                    $value = maybe_unserialize($value);
                } else {
                    $value = trim($value);
                }
			} else {
				$value = trim($value);
			}

			$snapshot_manifest[$key] = $value;
		}
		//echo "snapshot_manifest<pre>"; print_r($snapshot_manifest); echo "</pre>";
		//die();

		if (!isset($snapshot_manifest['SNAPSHOT_VERSION'])) {
			if (isset($snapshot_manifest['VERSION'])) {
				$snapshot_manifest['SNAPSHOT_VERSION'] = $snapshot_manifest['VERSION'];
				unset($snapshot_manifest['VERSION']);
			}
		}

		if (!isset($snapshot_manifest['WP_BLOG_ID'])) {
			if (isset($snapshot_manifest['BLOG-ID'])) {
				$snapshot_manifest['WP_BLOG_ID'] = $snapshot_manifest['BLOG-ID'];
				unset($snapshot_manifest['BLOG-ID']);
			}
		}
		if (!isset($snapshot_manifest['WP_DB_NAME'])) {
			if (isset($snapshot_manifest['DB_NAME'])) {
				$snapshot_manifest['WP_DB_NAME'] = $snapshot_manifest['DB_NAME'];
				unset($snapshot_manifest['DB_NAME']);
			}
		}
		if (!isset($snapshot_manifest['WP_DB_BASE_PREFIX'])) {
			if (isset($snapshot_manifest['BASE_PREFIX'])) {
				$snapshot_manifest['WP_DB_BASE_PREFIX'] = $snapshot_manifest['BASE_PREFIX'];
				unset($snapshot_manifest['BASE_PREFIX']);
			}
		}
		if (!isset($snapshot_manifest['WP_DB_PREFIX'])) {
			if (isset($snapshot_manifest['PREFIX'])) {
				$snapshot_manifest['WP_DB_PREFIX'] = $snapshot_manifest['PREFIX'];
				unset($snapshot_manifest['PREFIX']);
			}
		}
		if (!isset($snapshot_manifest['WP_UPLOAD_PATH'])) {
			if (isset($snapshot_manifest['UPLOAD_PATH'])) {
				$snapshot_manifest['WP_UPLOAD_PATH'] = $snapshot_manifest['UPLOAD_PATH'];
				unset($snapshot_manifest['UPLOAD_PATH']);
			}
		}
		if (!isset($snapshot_manifest['WP_HOME'])) {
			if (isset($snapshot_manifest['HOME'])) {
				$snapshot_manifest['WP_HOME'] = $snapshot_manifest['HOME'];
				unset($snapshot_manifest['HOME']);
			}
		}
		if (!isset($snapshot_manifest['WP_SITEURL'])) {
			if (isset($snapshot_manifest['SITEURL'])) {
				$snapshot_manifest['WP_SITEURL'] = $snapshot_manifest['SITEURL'];
				unset($snapshot_manifest['SITEURL']);
			}
		}

		if (!isset($snapshot_manifest['WP_BLOG_NAME'])) {
			$snapshot_manifest['WP_BLOG_NAME'] = '';
		}

		if (!isset($snapshot_manifest['WP_BLOG_DOMAIN'])) {
			if (isset($snapshot_manifest['WP_SITEURL'])) {
				$snapshot_manifest['WP_BLOG_DOMAIN'] = parse_url($snapshot_manifest['WP_SITEURL'], PHP_URL_HOST);
			}
		}

		if (!isset($snapshot_manifest['WP_BLOG_PATH'])) {
			if (isset($snapshot_manifest['WP_SITEURL'])) {
				$snapshot_manifest['WP_BLOG_PATH'] = parse_url($snapshot_manifest['WP_SITEURL'], PHP_URL_PATH);
			}
		}


		if (isset($snapshot_manifest['SNAPSHOT_VERSION'])) {
			if (($snapshot_manifest['SNAPSHOT_VERSION'] == "1.0") && (!isset($snapshot_manifest['TABLES-DATA']))) {

				$backupFile = trailingslashit($sessionRestoreFolder) . 'snapshot_backups.sql';
				$table_segments = snapshot_utility_get_table_segments_from_single($backupFile);

				if ($table_segments) {
					$snapshot_manifest['TABLES-DATA'] = $table_segments;
					unlink($backupFile);
				}
			}
		}
		//echo "snapshot_manifest<pre>"; print_r($snapshot_manifest); echo "</pre>";

		return $snapshot_manifest;
	}
}
 /**
  * AJAX callback function from the snapshot restore form. This is the first
  * step of the restore. This step will unzip the archive and retrieve the
  * the MANIFEST file content.
  *
  * @since 1.0.2
  * @see
  *
  * @param none
  * @return JSON formatted array status.
  */
 function snapshot_ajax_restore_init($item)
 {
     global $wpdb, $current_blog;
     $error_status = array();
     $error_status['errorStatus'] = false;
     $error_status['errorText'] = "";
     $error_status['responseText'] = "";
     $home_path = apply_filters('snapshot_home_path', get_home_path());
     if (!isset($_POST['item_data'])) {
         $error_status['errorStatus'] = true;
         $error_status['errorText'] = "<p>" . __("ERROR: The Snapshot missing 'item_data' key", SNAPSHOT_I18N_DOMAIN) . "</p>";
         return $error_status;
     }
     $item_data = intval($_POST['item_data']);
     if (!isset($item['data'][$item_data])) {
         $error_status['errorStatus'] = true;
         $error_status['errorText'] = "<p>" . __("ERROR: The Snapshot incorrect 'item_data' [" . $data_item . "] key", SNAPSHOT_I18N_DOMAIN) . "</p>";
         return $error_status;
     }
     //$error_status['data'] = $item['data'];
     $data_item = $item['data'][$item_data];
     //echo "data_item<pre>"; print_r($data_item); echo "</pre>";
     $backupZipFolder = $this->snapshot_get_item_destination_path($item, $data_item, false);
     //echo "backupZipFolder[". $backupZipFolder ."]<br />";
     //die();
     $restoreFile = trailingslashit($backupZipFolder) . $data_item['filename'];
     $error_status['restoreFile'] = $restoreFile;
     if (!file_exists($restoreFile)) {
         $error_status_errorText = "<p>" . __("ERROR: The Snapshot file not found:", SNAPSHOT_I18N_DOMAIN) . " " . $restoreFile . "</p>";
         $restoreFile = trailingslashit($this->_settings['backupBaseFolderFull']) . $data_item['filename'];
         $error_status['restoreFile'] = $restoreFile;
         if (!file_exists($restoreFile)) {
             $error_status['errorStatus'] = true;
             $error_status['errorText'] = $error_status_errorText . "<p>" . __("ERROR: The Snapshot file not found:", SNAPSHOT_I18N_DOMAIN) . " " . $restoreFile . "</p>";
             return $error_status;
         }
     }
     // Create a unique folder for our restore processing. Will later need to remove it.
     $sessionRestoreFolder = trailingslashit($this->_settings['backupRestoreFolderFull']);
     wp_mkdir_p($sessionRestoreFolder);
     if (!is_writable($sessionRestoreFolder)) {
         $error_status['errorStatus'] = true;
         $error_status['errorText'] = "<p>" . __("ERROR: The Snapshot folder is not writeable. Check the settings", SNAPSHOT_I18N_DOMAIN) . " " . $sessionRestoreFolder . "</p>";
         return $error_status;
     }
     // Cleanup any files from a previous restore attempt
     if ($dh = opendir($sessionRestoreFolder)) {
         while (($file = readdir($dh)) !== false) {
             if ($file == '.' || $file == '..') {
                 continue;
             }
             snapshot_utility_recursive_rmdir($sessionRestoreFolder . $file);
         }
         closedir($dh);
     }
     if ($this->config_data['config']['zipLibrary'] == "PclZip") {
         if (!defined('PCLZIP_TEMPORARY_DIR')) {
             define('PCLZIP_TEMPORARY_DIR', trailingslashit($this->_settings['backupBackupFolderFull']) . $item['timestamp'] . "/");
         }
         if (!class_exists('class PclZip')) {
             require_once ABSPATH . '/wp-admin/includes/class-pclzip.php';
         }
         $zipArchive = new PclZip($restoreFile);
         $zip_contents = $zipArchive->listContent();
         if ($zip_contents) {
             $extract_files = $zipArchive->extract(PCLZIP_OPT_PATH, $sessionRestoreFolder);
             if ($extract_files) {
                 $this->_session->data['restoreFolder'] = $sessionRestoreFolder;
             }
         }
     } else {
         $zip = new ZipArchive();
         $res = $zip->open($restoreFile);
         if ($res === TRUE) {
             $extract_ret = $zip->extractTo($sessionRestoreFolder);
             if ($extract_ret !== false) {
                 $this->_session->data['restoreFolder'] = $sessionRestoreFolder;
             }
         }
     }
     $error_status['MANIFEST'] = array();
     $snapshot_manifest_file = trailingslashit($sessionRestoreFolder) . 'snapshot_manifest.txt';
     if (file_exists($snapshot_manifest_file)) {
         $error_status['MANIFEST'] = snapshot_utility_consume_archive_manifest($snapshot_manifest_file);
         //unlink($snapshot_manifest_file);
     }
     if (isset($error_status['MANIFEST']['SNAPSHOT_VERSION'])) {
         if ($error_status['MANIFEST']['SNAPSHOT_VERSION'] == "1.0" && !isset($error_status['MANIFEST']['TABLES-DATA'])) {
             $backupFile = trailingslashit($sessionRestoreFolder) . 'snapshot_backups.sql';
             $table_segments = snapshot_utility_get_table_segments_from_single($backupFile);
             if ($table_segments) {
                 $error_status['MANIFEST']['TABLES-DATA'] = $table_segments;
                 unlink($backupFile);
             }
         }
     }
     if (is_multisite()) {
         //echo "item<pre>"; print_r($item); echo "</pre>";
         //echo "error_status<pre>"; print_r($error_status); echo "</pre>";
         //echo "_POST<pre>"; print_r($_POST); echo "</pre>";
         //switch_to_blog( $item['blog-id'] );
         $error_status['MANIFEST']['RESTORE']['SOURCE'] = array();
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_BLOG_ID'] = $error_status['MANIFEST']['WP_BLOG_ID'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_PREFIX'] = $error_status['MANIFEST']['WP_DB_PREFIX'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_BASE_PREFIX'] = $error_status['MANIFEST']['WP_DB_BASE_PREFIX'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_SITEURL'] = $error_status['MANIFEST']['WP_SITEURL'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['UPLOAD_DIR'] = $error_status['MANIFEST']['WP_UPLOAD_PATH'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_UPLOAD_URLS'] = $error_status['MANIFEST']['WP_UPLOAD_URLS'];
         switch_to_blog($_POST['snapshot-blog-id']);
         $error_status['MANIFEST']['RESTORE']['DEST'] = array();
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_BLOG_ID'] = $_POST['snapshot-blog-id'];
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_PREFIX'] = $wpdb->get_blog_prefix($_POST['snapshot-blog-id']);
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_BASE_PREFIX'] = $wpdb->base_prefix;
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_SITEURL'] = get_site_url($_POST['snapshot-blog-id']);
         if (empty($error_status['MANIFEST']['RESTORE']['DEST']['WP_SITEURL'])) {
             if (!empty($_POST['snapshot_blog_search'])) {
                 $error_status['MANIFEST']['RESTORE']['DEST']['WP_SITEURL'] = network_site_url('/' . untrailingslashit($_POST['snapshot_blog_search']) . '/');
             } else {
                 $error_status['MANIFEST']['RESTORE']['DEST']['WP_SITEURL'] = $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_SITEURL'];
             }
         }
         $wp_upload_dir = wp_upload_dir();
         //echo "wp_upload_dir<pre>"; print_r($wp_upload_dir); echo "</pre>";
         //die();
         $wp_upload_dir['basedir'] = str_replace('\\', '/', $wp_upload_dir['basedir']);
         $error_status['MANIFEST']['RESTORE']['DEST']['UPLOAD_DIR'] = str_replace($home_path, '', $wp_upload_dir['basedir']);
         //echo "error_status<pre>"; print_r($error_status); echo "</pre>";
         //die();
     } else {
         $error_status['MANIFEST']['RESTORE']['SOURCE'] = array();
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_BLOG_ID'] = $error_status['MANIFEST']['WP_BLOG_ID'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_PREFIX'] = $error_status['MANIFEST']['WP_DB_PREFIX'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_BASE_PREFIX'] = $error_status['MANIFEST']['WP_DB_BASE_PREFIX'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_SITEURL'] = $error_status['MANIFEST']['WP_SITEURL'];
         $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_UPLOAD_URLS'] = $error_status['MANIFEST']['WP_UPLOAD_URLS'];
         $wp_upload_dir = wp_upload_dir();
         $wp_upload_dir['basedir'] = str_replace('\\', '/', $wp_upload_dir['basedir']);
         $error_status['MANIFEST']['RESTORE']['SOURCE']['UPLOAD_DIR'] = $wp_upload_dir['basedir'];
         $error_status['MANIFEST']['RESTORE']['DEST'] = array();
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_BLOG_ID'] = $error_status['MANIFEST']['WP_BLOG_ID'];
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_PREFIX'] = $wpdb->prefix;
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_BASE_PREFIX'] = $wpdb->base_prefix;
         $error_status['MANIFEST']['RESTORE']['DEST']['WP_SITEURL'] = get_site_url($error_status['MANIFEST']['WP_BLOG_ID']);
         if (empty($error_status['MANIFEST']['RESTORE']['DEST']['WP_SITEURL'])) {
             $error_status['MANIFEST']['RESTORE']['DEST']['WP_SITEURL'] = $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_SITEURL'];
         }
         $error_status['MANIFEST']['RESTORE']['DEST']['UPLOAD_DIR'] = $error_status['MANIFEST']['RESTORE']['SOURCE']['UPLOAD_DIR'];
     }
     if (!isset($_POST['snapshot-tables-option'])) {
         $_POST['snapshot-tables-option'] = "none";
     }
     if ($_POST['snapshot-tables-option'] == "none") {
         unset($error_status['MANIFEST']['TABLES']);
         $error_status['MANIFEST']['TABLES'] = array();
     } else {
         if ($_POST['snapshot-tables-option'] == "selected") {
             if (isset($_POST['snapshot-tables-array'])) {
                 $error_status['MANIFEST']['TABLES'] = $_POST['snapshot-tables-array'];
             }
         } else {
             if ($_POST['snapshot-tables-option'] == "all") {
                 $manifest_tables = array();
                 foreach ($error_status['MANIFEST']['TABLES'] as $table_set_key => $table_set) {
                     // Per the instructions on the page. When selecting 'all' we do not include the global tables: users and usermeta
                     if ($table_set_key == 'global') {
                         continue;
                     }
                     $manifest_tables = array_merge($manifest_tables, array_values($table_set));
                 }
                 //echo "manifest_tables<pre>"; print_r($manifest_tables); echo "</pre>";
                 //die();
                 $error_status['MANIFEST']['TABLES'] = $manifest_tables;
             }
         }
     }
     //echo "RESTORE<pre>"; print_r($error_status['MANIFEST']['RESTORE']); echo "</pre>";
     //echo "TABLES<pre>"; print_r($error_status['MANIFEST']['TABLES']); echo "</pre>";
     //echo "MANIFEST<pre>"; print_r($error_status['MANIFEST']); echo "</pre>";
     //echo "wpdb<pre>"; print_r($wpdb); echo "</pre>";
     //die();
     // upload_path wp-content/blogs.dir/7/files
     if (isset($error_status['MANIFEST']['TABLES']) && count($error_status['MANIFEST']['TABLES'])) {
         $tables_array = array();
         foreach ($error_status['MANIFEST']['TABLES'] as $table_name) {
             $table_info = array();
             $table_info['table_name'] = $table_name;
             if (strncasecmp($table_name, $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_PREFIX'], strlen($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_PREFIX'])) == 0) {
                 $table_info['table_name_base'] = str_replace($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_PREFIX'], '', $table_name);
                 $table_info['table_name_restore'] = $this->_settings['recover_table_prefix'] . str_replace($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_PREFIX'], $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_PREFIX'], $table_name);
                 $table_name_dest = str_replace($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_PREFIX'], $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_PREFIX'], $table_name);
             } else {
                 if (strncasecmp($table_name, $error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_BASE_PREFIX'], strlen($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_BASE_PREFIX'])) == 0) {
                     $table_info['table_name_base'] = str_replace($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_BASE_PREFIX'], '', $table_name);
                     $table_info['table_name_restore'] = $this->_settings['recover_table_prefix'] . str_replace($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_BASE_PREFIX'], $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_BASE_PREFIX'], $table_name);
                     $table_name_dest = str_replace($error_status['MANIFEST']['RESTORE']['SOURCE']['WP_DB_BASE_PREFIX'], $error_status['MANIFEST']['RESTORE']['DEST']['WP_DB_BASE_PREFIX'], $table_name);
                 } else {
                     // If the table name is not using the DB_PREFIX or DB_BASE_PREFIX then don't convert it.
                     $table_info['table_name_base'] = $table_name;
                     $table_info['table_name_restore'] = $table_name;
                     $table_name_dest = $table_name;
                 }
             }
             $table_info['label'] = $table_name . " > " . $table_name_dest;
             $table_info['table_name_dest'] = $table_name_dest;
             $tables_array[$table_name] = $table_info;
         }
         $error_status['MANIFEST']['TABLES'] = $tables_array;
         //echo "MANIFEST<pre>"; print_r($error_status['MANIFEST']['TABLES']); echo "</pre>";
         //die();
     }
     if (isset($error_status['MANIFEST']['TABLES-DATA']) && count($error_status['MANIFEST']['TABLES-DATA'])) {
         $tables_data_sets = array();
         foreach ($error_status['MANIFEST']['TABLES-DATA'] as $table_set) {
             if (!isset($table_set['table_name'])) {
                 continue;
             }
             //echo "table_set table_name[". $table_set['table_name'] ."]<br />";
             if (array_key_exists($table_set['table_name'], $error_status['MANIFEST']['TABLES']) !== false) {
                 $tables_data_sets[] = $table_set;
             } else {
                 //echo "Table[". $table_set['table_name'] ."] not found in tables<br />";
             }
         }
         $error_status['MANIFEST']['TABLES-DATA'] = $tables_data_sets;
     }
     //echo "MANIFEST<pre>"; print_r($error_status['MANIFEST']['TABLES']); echo "</pre>";
     //echo "MANIFEST<pre>"; print_r($error_status['MANIFEST']['TABLES-DATA']); echo "</pre>";
     //die();
     if (!isset($_POST['snapshot-files-option'])) {
         $_POST['snapshot-files-option'] = "none";
     }
     if ($_POST['snapshot-files-option'] == "none") {
         unset($error_status['MANIFEST']['FILES-DATA']);
         $error_status['MANIFEST']['FILES-DATA'] = array();
     } else {
         if ($_POST['snapshot-files-option'] == "selected") {
             if (isset($_POST['snapshot-files-sections'])) {
                 $error_status['MANIFEST']['FILES-DATA'] = $_POST['snapshot-files-sections'];
             }
         } else {
             if ($_POST['snapshot-files-option'] == "all") {
                 if (isset($error_status['MANIFEST']['ITEM']['data'])) {
                     $data_item = snapshot_utility_latest_data_item($error_status['MANIFEST']['ITEM']['data']);
                     if (isset($data_item['files-sections'])) {
                         $error_status['MANIFEST']['FILES-DATA'] = array_values($data_item['files-sections']);
                         $array_idx = array_search('config', $error_status['MANIFEST']['FILES-DATA']);
                         if ($array_idx !== false) {
                             unset($error_status['MANIFEST']['FILES-DATA'][$array_idx]);
                         }
                         $array_idx = array_search('htaccess', $error_status['MANIFEST']['FILES-DATA']);
                         if ($array_idx !== false) {
                             unset($error_status['MANIFEST']['FILES-DATA'][$array_idx]);
                         }
                     }
                 }
             }
         }
     }
     //echo "_POST<pre>"; print_r($_POST); echo "</pre>";
     //echo "MANIFEST<pre>"; print_r($error_status['MANIFEST']); echo "</pre>";
     //echo "MANIFEST RESTORE<pre>"; print_r($error_status['MANIFEST']['RESTORE']); echo "</pre>";
     //die();
     $this->_session->data['MANIFEST'] = $error_status['MANIFEST'];
     return $error_status;
 }