当前位置: 首页>>代码示例>>PHP>>正文


PHP AEPlatform::get_timestamp_mysql方法代码示例

本文整理汇总了PHP中AEPlatform::get_timestamp_mysql方法的典型用法代码示例。如果您正苦于以下问题:PHP AEPlatform::get_timestamp_mysql方法的具体用法?PHP AEPlatform::get_timestamp_mysql怎么用?PHP AEPlatform::get_timestamp_mysql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AEPlatform的用法示例。


在下文中一共展示了AEPlatform::get_timestamp_mysql方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _run


//.........这里部分代码省略.........
			if(function_exists("gzcompress")) {
				AEUtilLogger::WriteLog(_AE_LOG_INFO, "GZIP Compression   : available (good)" );
			} else {
				AEUtilLogger::WriteLog(_AE_LOG_INFO, "GZIP Compression   : n/a (no compression)" );
			}
			AEPlatform::log_platform_special_directories();
			AEUtilLogger::WriteLog(_AE_LOG_INFO, "Output directory   :" . $registry->get('akeeba.basic.output_directory') );
			AEUtilLogger::WriteLog(_AE_LOG_INFO, "Temporary directory:" . $registry->get('akeeba.basic.temporary_directory') );
			AEUtilLogger::WriteLog(_AE_LOG_INFO, "--------------------------------------------------------------------------------");
		}

		// Quirks reporting
		$quirks = AEUtilQuirks::get_quirks(true);
		if( !empty($quirks) )
		{
			AEUtilLogger::WriteLog(_AE_LOG_INFO, "Akeeba Backup has detected the following potential problems:" );
			foreach($quirks as $q)
			{
				AEUtilLogger::WriteLog(_AE_LOG_INFO, '- '.$q['code'].' '.$q['description'].' ('.$q['severity'].')' );
			}
			AEUtilLogger::WriteLog(_AE_LOG_INFO, "You probably do not have to worry about them, but you should be aware of them." );
			AEUtilLogger::WriteLog(_AE_LOG_INFO, "--------------------------------------------------------------------------------");
		}

		// Report profile ID
		$profile_id = AEPlatform::get_active_profile();
		AEUtilLogger::WriteLog(_AE_LOG_INFO, "Loaded profile #$profile_id");

		// Get archive name
		AEUtilFilesystem::get_archive_name($relativeArchiveName, $absoluteArchiveName);

		// ==== Stats initialisation ===
		$origin = AEPlatform::get_backup_origin(); // Get backup origin
		$profile_id = AEPlatform::get_active_profile(); // Get active profile

		$registry =& AEFactory::getConfiguration();
		$backupType = $registry->get('akeeba.basic.backup_type');
		AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Backup type is now set to '" . $backupType . "'");

		// Substitute "variables" in the archive name
		$description = AEUtilFilesystem::replace_archive_name_variables($this->description);
		$comment = AEUtilFilesystem::replace_archive_name_variables($this->comment);

		if($registry->get('volatile.writer.store_on_server', true) )
		{
			// Archive files are stored on our server
			$stat_relativeArchiveName = $relativeArchiveName;
			$stat_absoluteArchiveName = $absoluteArchiveName;
		}
		else
		{
			// Archive files are not stored on our server (FTP backup, cloud backup, sent by email, etc)
			$stat_relativeArchiveName = '';
			$stat_absoluteArchiveName = '';
		}

		$kettenrad =& AEFactory::getKettenrad();
		$temp = array(
			'description'	=> $description,
			'comment'		=> $comment,
			'backupstart'	=> AEPlatform::get_timestamp_mysql(),
			'status'		=> 'run',
			'origin'		=> $origin,
			'type'			=> $backupType,
			'profile_id'	=> $profile_id,
			'archivename'	=> $stat_relativeArchiveName,
			'absolute_path'	=> $stat_absoluteArchiveName,
			'multipart'		=> 0,
			'filesexist'	=> 1,
			'tag'			=> $kettenrad->getTag()
		);
		// Save the entry
		$statistics =& AEFactory::getStatistics();
		$statistics->setStatistics($temp);
		if($statistics->getError())
		{
			$this->setError($statistics->getError());
			return;
		}

		$statistics->release_multipart_lock();

		// Initialize the archive.
		if (AEUtilScripting::getScriptingParameter('core.createarchive',true))
		{
			AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Expanded archive file name: " . $absoluteArchiveName);

			AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Initializing archiver engine");
			$archiver =& AEFactory::getArchiverEngine();
			$archiver->initialize($absoluteArchiveName);
			$archiver->setComment($comment); // Add the comment to the archive itself.
			$archiver->propagateToObject($this);
			if($this->getError())
			{
				return;
			}
		}

		$this->setState('postrun');
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:101,代码来源:init.php

示例2: update_statistics

	/**
	 * Updates the backup statistics record
	 * @return bool
	 */
	private function update_statistics()
	{
		$this->setStep('Updating statistics');
		$this->setSubstep('');
		
		// Force a step break before updating stats (works around MySQL gone away issues)
		// 3.2.5 : Added conditional break logic after the call to setStatistics()
		/**
		if(!$this->update_stats)
		{
			$this->update_stats = true;
			$configuration =& AEFactory::getConfiguration();
			$configuration->set('volatile.breakflag', true);
			return false;
		}
		/**/

		AEUtilLogger::WriteLog(_AE_LOG_DEBUG, "Updating statistics" );
		// We finished normally. Fetch the stats record
		$statistics =& AEFactory::getStatistics();
		$registry =& AEFactory::getConfiguration();
		$data = array(
			'backupend'	=> AEPlatform::get_timestamp_mysql(),
			'status'	=> 'complete',
			'multipart'	=> $registry->get('volatile.statistics.multipart', 0)
		);
		$result = $statistics->setStatistics($data);
		if($result === false) {
			// Most likely a "MySQL has gone away" issue...
			$this->update_stats = true;
			$configuration =& AEFactory::getConfiguration();
			$configuration->set('volatile.breakflag', true);
			return false;
		}
		$this->propagateFromObject($statistics);

		$stat = (object)$statistics->getRecord();
		AEPlatform::remove_duplicate_backup_records($stat->archivename);

		return true;
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:45,代码来源:finalization.php


注:本文中的AEPlatform::get_timestamp_mysql方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。