本文整理汇总了PHP中AText::_方法的典型用法代码示例。如果您正苦于以下问题:PHP AText::_方法的具体用法?PHP AText::_怎么用?PHP AText::_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AText
的用法示例。
在下文中一共展示了AText::_方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRecommended
public function getRecommended()
{
static $phpOptions = array();
if (empty($phpOptions)) {
$phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCGPC'), 'current' => (bool) ini_get('magic_quotes_gpc'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_FTP'), 'current' => function_exists('ftp_connect'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SSH2'), 'current' => extension_loaded('ssh2'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_FOPEN'), 'current' => ini_get('allow_url_fopen'), 'recommended' => true);
if (function_exists('gzencode')) {
$gz = @gzencode('dd') !== false;
} else {
$gz = false;
}
$phpOptions[] = array('label' => AText::_('MAIN_REC_GZ'), 'current' => $gz, 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCRYPT'), 'current' => function_exists('mcrypt_encrypt'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_DOM'), 'current' => extension_loaded('Dom'), 'recommended' => true);
}
return $phpOptions;
}
示例2: onBeforeMain
public function onBeforeMain()
{
ADocument::getInstance()->addScriptDeclaration(<<<ENDSRIPT
var akeebaAjax = null;
\$(document).ready(function(){
akeebaAjax = new akeebaAjaxConnector('index.php');
akeebaAjax.callJSON({
'view' : 'runscripts',
'format' : 'raw'
});
});
ENDSRIPT
);
$model = $this->getModel();
$this->showconfig = $model->getState('showconfig', 0);
if ($this->showconfig) {
$this->configuration = AModel::getAnInstance('Configuration', 'AngieModel')->getFileContents();
}
if (ASession::getInstance()->get('tfa_warning', false)) {
$this->extra_warning = '<div class="alert alert-block alert-error">';
$this->extra_warning .= '<h4 class="alert-heading">' . AText::_('FINALISE_TFA_DISABLED_TITLE') . '</h4>';
$this->extra_warning .= '<p>' . AText::_('FINALISE_TFA_DISABLED_BODY') . '</p>';
$this->extra_warning .= '</div>';
}
return true;
}
示例3: applySettings
/**
* Apply the settings to the configuration file and the database
*/
public function applySettings()
{
// Get the state variables and update the global configuration
$stateVars = $this->getStateVariables();
// -- General settings
$this->configModel->set('sitename', $stateVars->sitename);
$this->configModel->set('sitedescr', $stateVars->sitedescr);
$this->configModel->set('siteurl', $stateVars->siteurl);
// -- Database settings
$connectionVars = $this->getDbConnectionVars();
$this->configModel->set('dbtype', $connectionVars->dbtype);
$this->configModel->set('dbhost', $connectionVars->dbhost);
$this->configModel->set('dbuser', $connectionVars->dbuser);
$this->configModel->set('dbpass', $connectionVars->dbpass);
$this->configModel->set('dbname', $connectionVars->dbname);
$this->configModel->set('dbprefix', $connectionVars->prefix);
$this->configModel->saveToSession();
// Sanity check
if (!$stateVars->siteurl) {
throw new Exception(AText::_('SETUP_SITEURL_REQUIRED'));
}
// Apply the Super Administrator changes
$this->applySuperAdminChanges();
// Get the wp-config.php file and try to save it
if (!$this->configModel->writeConfig(APATH_ROOT . '/config.php')) {
return false;
}
return true;
}
示例4: applyjson
public function applyjson()
{
// We have to use the HTML filter, since the key could contain a forward slash
// e.g. virtual_folders/first_folder
$key = $this->input->getCmd('substep', 'default', 'html');
if (empty($key)) {
$result = array('percent' => 0, 'error' => AText::_('OFFSITEDIRS_ERR_INVALIDKEY'), 'done' => 1, 'showconfig' => '');
echo json_encode($result);
return;
}
try {
/** @var AngieModelDrupal7Setup $model */
$model = $this->getThisModel();
$config = '';
$error = '';
$writtenConfiguration = $model->applySettings($key);
if (!$writtenConfiguration) {
/** @var AngieModelDrupal7Configuration $configModel */
$configModel = AModel::getAnInstance('Configuration', 'AngieModel', array(), $this->container);
$config = $configModel->getFileContents(APATH_SITE . '/sites/' . $key . '/settings.php');
$error = AText::_('FINALISE_LBL_CONFIGINTRO') . '<br/>' . AText::_('FINALISE_LBL_CONFIGOUTRO');
}
$result = array('percent' => 100, 'error' => $error, 'done' => 1, 'showconfig' => $config);
} catch (Exception $exc) {
$result = array('percent' => 0, 'error' => $exc->getMessage(), 'done' => 1, 'showconfig' => '');
}
echo json_encode($result);
}
示例5: start
public function start()
{
$key = $this->input->get('key', null);
$data = $this->input->get('dbinfo', null, 'array');
if (empty($key) || empty($data['dbtype'])) {
$result = array('percent' => 0, 'restored' => 0, 'total' => 0, 'eta' => 0, 'error' => AText::_('DATABASE_ERR_INVALIDKEY'), 'done' => 1);
echo json_encode($result);
return;
}
$model = AModel::getAnInstance('Database', 'AngieModel');
$savedData = $model->getDatabaseInfo($key);
if (is_object($savedData)) {
$savedData = (array) $savedData;
}
if (!is_array($savedData)) {
$savedData = array();
}
$data = array_merge($savedData, $data);
$model->setDatabaseInfo($key, $data);
$model->saveDatabasesIni();
try {
$restoreEngine = ADatabaseRestore::getInstance($key, $data);
$restoreEngine->removeInformationFromStorage();
$result = array('percent' => 0, 'restored' => 0, 'total' => $restoreEngine->getTotalSize(true), 'eta' => '–––', 'error' => '', 'done' => 0);
} catch (Exception $exc) {
$result = array('percent' => 0, 'restored' => 0, 'total' => 0, 'eta' => 0, 'error' => $exc->getMessage(), 'done' => 1);
}
echo json_encode($result);
}
示例6: getRecommended
public function getRecommended()
{
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
return $phpOptions;
}
示例7: getRecommended
public function getRecommended()
{
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
return $phpOptions;
}
示例8: getRecommended
public function getRecommended()
{
static $phpOptions = array();
if (empty($phpOptions)) {
$phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_UPLOADS'), 'current' => (bool) ini_get('file_uploads'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
}
return $phpOptions;
}
示例9: getRecommended
public function getRecommended()
{
static $phpOptions = array();
if (empty($phpOptions)) {
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_UPLOADS'), 'current' => (bool) ini_get('file_uploads'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_XML'), 'current' => extension_loaded('xml'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_LBL_REQ_ICONV'), 'current' => extension_loaded('iconv'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
}
return $phpOptions;
}
示例10: unlock
public function unlock()
{
$parts = explode(':', AKEEBA_PASSHASH);
$password = $this->input->get('password', '', 'raw');
$passHash = md5($password . $parts[1]);
ASession::getInstance()->set('angie.passhash', $passHash);
ASession::getInstance()->saveData();
if ($passHash == $parts[0]) {
$this->setRedirect('index.php?view=main');
} else {
$msg = AText::_('PASSWORD_ERR_INVALIDPASSWORD');
$this->setRedirect('index.php?view=password', $msg, 'error');
}
}
示例11: moveDir
public function moveDir($key)
{
$dirs = $this->getDirs(true, true);
$dir = $dirs[$key];
$info = $this->input->get('info', array(), 'array');
$virtual = APATH_ROOT . '/' . $dir['virtual'];
$target = str_replace(array('[SITEROOT]', '[ROOTPARENT]'), array(APATH_ROOT, realpath(APATH_ROOT . '/..')), $info['target']);
if (!file_exists($virtual)) {
throw new Exception(AText::_('OFFSITEDIRS_VIRTUAL_DIR_NOT_FOUND'), 0);
}
if (!$this->recurse_copy($virtual, $target)) {
throw new Exception(AText::_('OFFSITEDIRS_VIRTUAL_COPY_ERROR'), 0);
}
}
示例12: getRecommended
public function getRecommended()
{
static $phpOptions = array();
if (empty($phpOptions)) {
$phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCGPC'), 'current' => (bool) ini_get('magic_quotes_gpc'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_CURL'), 'current' => function_exists('curl_init'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_FTP'), 'current' => function_exists('ftp_connect'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SSH2'), 'current' => extension_loaded('ssh2'), 'recommended' => true);
}
return $phpOptions;
}
示例13: move
public function move()
{
// We have to use the HTML filter, since the key could contain a forward slash
// e.g. virtual_folders/first_folder
$key = $this->input->get('key', null, 'html');
if (empty($key)) {
$result = array('percent' => 0, 'error' => AText::_('OFFSITEDIRS_ERR_INVALIDKEY'), 'done' => 1);
echo json_encode($result);
return;
}
try {
$this->getThisModel()->moveDir($key);
$result = array('percent' => 100, 'error' => '', 'done' => 1);
} catch (Exception $exc) {
$result = array('percent' => 0, 'error' => $exc->getMessage(), 'done' => 1);
}
echo json_encode($result);
}
示例14: getRecommended
public function getRecommended()
{
static $phpOptions = array();
if (empty($phpOptions)) {
$jVersion = $this->container->session->get('jversion');
$phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_UPLOADS'), 'current' => (bool) ini_get('file_uploads'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
if (version_compare($jVersion, '3.0.0', 'lt')) {
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCGPC'), 'current' => (bool) ini_get('magic_quotes_gpc'), 'recommended' => false);
}
$phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
}
return $phpOptions;
}
示例15: getRecommended
public function getRecommended()
{
static $phpOptions = array();
if (empty($phpOptions)) {
$phpOptions[] = array('label' => AText::_('MAIN_REC_MBSTRING'), 'current' => extension_loaded('mbstring'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_OPENSSL'), 'current' => extension_loaded('openssl'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_TOKENIZER'), 'current' => extension_loaded('tokenizer'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_XMLRPC'), 'current' => extension_loaded('xmlrpc'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SOAP'), 'current' => extension_loaded('soap'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SAFEMODE'), 'current' => (bool) ini_get('safe_mode'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_DISPERRORS'), 'current' => (bool) ini_get('display_errors'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_UPLOADS'), 'current' => (bool) ini_get('file_uploads'), 'recommended' => true);
$phpOptions[] = array('label' => AText::_('MAIN_REC_MCR'), 'current' => (bool) ini_get('magic_quotes_runtime'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_OUTBUF'), 'current' => (bool) ini_get('output_buffering'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_SESSIONAUTO'), 'current' => (bool) ini_get('session.auto_start'), 'recommended' => false);
$phpOptions[] = array('label' => AText::_('MAIN_REC_NATIVEZIP'), 'current' => function_exists('zip_open') && function_exists('zip_read'), 'recommended' => true);
}
return $phpOptions;
}