Rename App Methods
- renamed a lot of App methods to CamelCase - replaced direct public variables with get-/set-Methods
This commit is contained in:
parent
5f9dd11cfb
commit
5a02e39a65
94 changed files with 481 additions and 338 deletions
|
@ -3344,7 +3344,7 @@ function api_statusnet_config($type)
|
|||
$a = get_app();
|
||||
|
||||
$name = Config::get('config', 'sitename');
|
||||
$server = $a->get_hostname();
|
||||
$server = $a->getHostName();
|
||||
$logo = System::baseUrl() . '/images/friendica-64.png';
|
||||
$email = Config::get('config', 'admin_email');
|
||||
$closed = intval(Config::get('config', 'register_policy')) === REGISTER_CLOSED ? 'true' : 'false';
|
||||
|
|
|
@ -61,7 +61,7 @@ function notification($params)
|
|||
}
|
||||
|
||||
$sender_name = $sitename;
|
||||
$hostname = $a->get_hostname();
|
||||
$hostname = $a->getHostName();
|
||||
if (strpos($hostname, ':')) {
|
||||
$hostname = substr($hostname, 0, strpos($hostname, ':'));
|
||||
}
|
||||
|
|
|
@ -318,7 +318,7 @@ function subscribe_to_hub($url, array $importer, array $contact, $hubmode = 'sub
|
|||
|
||||
Network::post($url, $params);
|
||||
|
||||
logger('subscribe_to_hub: returns: ' . $a->get_curl_code(), LOGGER_DEBUG);
|
||||
logger('subscribe_to_hub: returns: ' . Network::getCurl()->getCode(), LOGGER_DEBUG);
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ function replace_macros($s, $r) {
|
|||
// pass $baseurl to all templates
|
||||
$r['$baseurl'] = System::baseUrl();
|
||||
|
||||
$t = $a->template_engine();
|
||||
$t = $a->getTemplateEngine();
|
||||
try {
|
||||
$output = $t->replaceMacros($s, $r);
|
||||
} catch (Exception $e) {
|
||||
|
@ -50,7 +50,7 @@ function replace_macros($s, $r) {
|
|||
killme();
|
||||
}
|
||||
|
||||
$a->save_timestamp($stamp1, "rendering");
|
||||
$a->saveTimestamp($stamp1, "rendering");
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ function get_markup_template($s, $root = '') {
|
|||
$stamp1 = microtime(true);
|
||||
|
||||
$a = get_app();
|
||||
$t = $a->template_engine();
|
||||
$t = $a->getTemplateEngine();
|
||||
try {
|
||||
$template = $t->getTemplateFile($s, $root);
|
||||
} catch (Exception $e) {
|
||||
|
@ -481,7 +481,7 @@ function get_markup_template($s, $root = '') {
|
|||
killme();
|
||||
}
|
||||
|
||||
$a->save_timestamp($stamp1, "file");
|
||||
$a->saveTimestamp($stamp1, "file");
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
@ -574,7 +574,7 @@ function logger($msg, $level = LOGGER_INFO) {
|
|||
|
||||
$stamp1 = microtime(true);
|
||||
@file_put_contents($logfile, $logline, FILE_APPEND);
|
||||
$a->save_timestamp($stamp1, "file");
|
||||
$a->saveTimestamp($stamp1, "file");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -634,7 +634,7 @@ function dlogger($msg, $level = LOGGER_INFO) {
|
|||
|
||||
$stamp1 = microtime(true);
|
||||
@file_put_contents($logfile, $logline, FILE_APPEND);
|
||||
$a->save_timestamp($stamp1, "file");
|
||||
$a->saveTimestamp($stamp1, "file");
|
||||
}
|
||||
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ function get_plink($item) {
|
|||
];
|
||||
|
||||
if (x($item, 'plink')) {
|
||||
$ret["href"] = $a->remove_baseurl($item['plink']);
|
||||
$ret["href"] = $a->removeBaseURL($item['plink']);
|
||||
$ret["title"] = L10n::t('link to source');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue