Beispiel #1
0
	private function createExtrainfo()
	{
		$abversion = AKEEBA_VERSION;
		$host = AEPlatform::get_host();
		$ret = <<<ENDINI
; Akeeba Backup $abversion - Extra information used during restoration
host=$host

ENDINI;
		return $ret;
	}
Beispiel #2
0
	public static function get_archive_name_variables()
	{
		$variables = null;

		$registry =& AEFactory::getConfiguration();
		$serialized = $registry->get('volatile.core.archivenamevars', null);
		if(!empty($serialized)) {
			$variables = @unserialize($serialized);
		}

		if(empty($variables))
		{
			$host = AEPlatform::get_host();
			$variables = array(
				'[DATE]' => AEPlatform::get_local_timestamp("%Y%m%d"),
				'[YEAR]' => AEPlatform::get_local_timestamp("%Y"),
				'[MONTH]' => AEPlatform::get_local_timestamp("%m"),
				'[DAY]' => AEPlatform::get_local_timestamp("%d"),
				'[TIME]' => AEPlatform::get_local_timestamp("%H%M%S"),
				'[WEEK]' => AEPlatform::get_local_timestamp("%U"),
				'[WEEKDAY]' => AEPlatform::get_local_timestamp("%A"),
				'[HOST]' => empty($host) ? 'unknown_host' : $host,
				'[RANDOM]' => md5(microtime())
			);
		}

		return $variables;
	}