本文整理汇总了PHP中AEPlatform::load_version_defines方法的典型用法代码示例。如果您正苦于以下问题:PHP AEPlatform::load_version_defines方法的具体用法?PHP AEPlatform::load_version_defines怎么用?PHP AEPlatform::load_version_defines使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AEPlatform
的用法示例。
在下文中一共展示了AEPlatform::load_version_defines方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIconDefinitions
/**
* Get an array of icon definitions for the Control Panel
*
* @return array
*/
public function getIconDefinitions()
{
AEPlatform::load_version_defines();
$core = $this->loadIconDefinitions(JPATH_COMPONENT_ADMINISTRATOR.DS.'views');
$pro = $this->loadIconDefinitions(JPATH_COMPONENT_ADMINISTRATOR.DS.'plugins'.DS.'views');
$ret = array_merge_recursive($core, $pro);
return $ret;
}
示例2: __construct
function __construct()
{
$useSVNSource = AEPlatform::get_platform_configuration_option('usesvnsource', 0);
// Determine the appropriate update URL based on whether we're on Core or Professional edition
AEPlatform::load_version_defines();
$fname = 'https://www.akeebabackup.com/updates/ab';
$fname .= (AKEEBA_PRO == 1) ? 'pro' : 'core';
if($useSVNSource) $fname .= 'svn';
$fname .= '.ini';
$this->_updateURL = $fname;
$this->_extensionTitle = 'Akeeba Backup '.(AKEEBA_PRO == 1 ? 'Professional' : 'Core');
$this->_requiresAuthorization = (AKEEBA_PRO == 1);
$this->_currentVersion = AKEEBA_VERSION;
$this->_currentReleaseDate = AKEEBA_DATE;
parent::__construct();
$this->_downloadID = AEPlatform::get_platform_configuration_option('update_dlid', '');
$this->_minStability = AEPlatform::get_platform_configuration_option('minstability', 'alpha');
$this->_cacerts = dirname(__FILE__).'/../akeeba/assets/cacert.pem';
}
示例3:
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'includes.php';
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'escape.php';
// Merge the default translation with the current translation
$jlang =& JFactory::getLanguage();
// Front-end translation
$jlang->load('com_akeeba', JPATH_SITE, 'en-GB', true);
$jlang->load('com_akeeba', JPATH_SITE, $jlang->getDefault(), true);
$jlang->load('com_akeeba', JPATH_SITE, null, true);
// Back-end translation
$jlang->load('com_akeeba', JPATH_ADMINISTRATOR, 'en-GB', true);
$jlang->load('com_akeeba', JPATH_ADMINISTRATOR, $jlang->getDefault(), true);
$jlang->load('com_akeeba', JPATH_ADMINISTRATOR, null, true);
// Load the utils helper library
AEPlatform::load_version_defines();
// Create a versioning tag for our static files
$staticFilesVersioningTag = md5(AKEEBA_VERSION.AKEEBA_DATE.AKEEBA_JVERSION);
define('AKEEBAMEDIATAG', $staticFilesVersioningTag);
// If JSON functions don't exist, load our compatibility layer
if( (!function_exists('json_encode')) || (!function_exists('json_decode')) )
{
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'helpers'.DS.'jsonlib.php';
}
// Handle Live Update requests
require_once JPATH_COMPONENT_ADMINISTRATOR.DS.'liveupdate'.DS.'liveupdate.php';
if(JRequest::getCmd('view','') == 'liveupdate') {
LiveUpdate::handleRequest();
示例4: _run
/**
* Implements the _run() abstract method
*/
protected function _run()
{
if( $this->getState() == 'postrun' )
{
AEUtilLogger::WriteLog(_AE_LOG_DEBUG, __CLASS__." :: Already finished");
$this->setStep('');
$this->setSubstep('');
return;
} else {
$this->setState('running');
}
// Load the version defines
AEPlatform::load_version_defines();
$registry =& AEFactory::getConfiguration();
// Write log file's header
AEUtilLogger::WriteLog(_AE_LOG_INFO, "--------------------------------------------------------------------------------");
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Akeeba Backup ".AKEEBA_VERSION.' ('.AKEEBA_DATE.')');
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Got backup?");
AEUtilLogger::WriteLog(_AE_LOG_INFO, "--------------------------------------------------------------------------------");
// PHP configuration variables are tried to be logged only for debug and info log levels
if ($registry->get('akeeba.basic.log_level') >= _AE_LOG_INFO ) {
AEUtilLogger::WriteLog(_AE_LOG_INFO, "--- System Information ---" );
if( function_exists('phpversion'))
AEUtilLogger::WriteLog(_AE_LOG_INFO, "PHP Version :" . phpversion() );
if(function_exists('php_uname'))
AEUtilLogger::WriteLog(_AE_LOG_INFO, "OS Version :" . php_uname('s') );
$db =& AEFactory::getDatabase();
AEUtilLogger::WriteLog(_AE_LOG_INFO, "DB Version :" . $db->getVersion() );
if (isset($_SERVER['SERVER_SOFTWARE'])) {
$server = $_SERVER['SERVER_SOFTWARE'];
} else if (($sf = getenv('SERVER_SOFTWARE'))) {
$server = $sf;
} else {
$server = 'n/a';
}
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Web Server :" . $server );
if(function_exists('php_sapi_name'))
AEUtilLogger::WriteLog(_AE_LOG_INFO, "PHP Interface :" . php_sapi_name() );
AEPlatform::getPlatformVersion( $platform, $version );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "$platform version :" . $version );
if(isset($_SERVER['HTTP_USER_AGENT']))
AEUtilLogger::WriteLog(_AE_LOG_INFO, "User agent :" . phpversion() <= "4.2.1" ? getenv( "HTTP_USER_AGENT" ) : $_SERVER['HTTP_USER_AGENT'] );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Safe mode :" . ini_get("safe_mode") );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Display errors :" . ini_get("display_errors") );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Error reporting :" . self::error2string() );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Error display :" . self::errordisplay() );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Disabled functions :" . ini_get("disable_functions") );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "open_basedir restr.:" . ini_get('open_basedir') );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Max. exec. time :" . ini_get("max_execution_time") );
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Memory limit :" . ini_get("memory_limit") );
if(function_exists("memory_get_usage"))
AEUtilLogger::WriteLog(_AE_LOG_INFO, "Current mem. usage :" . memory_get_usage() );
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);
//.........这里部分代码省略.........