Rename App Methods

- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
This commit is contained in:
Philipp Holzer 2018-10-09 19:58:58 +02:00
parent 5f9dd11cfb
commit 5a02e39a65
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
94 changed files with 481 additions and 338 deletions

View file

@ -1632,10 +1632,10 @@ class Contact extends BaseObject
if (($ret['network'] === Protocol::DFRN) && !DBA::isResult($contact)) {
if ($interactive) {
if (strlen($a->urlpath)) {
if (strlen($a->getURLpath())) {
$myaddr = bin2hex(System::baseUrl() . '/profile/' . $a->user['nickname']);
} else {
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname());
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->getHostName());
}
goaway($ret['request'] . "&addr=$myaddr");

View file

@ -1166,7 +1166,7 @@ class Item extends BaseObject
if ($notify) {
// We have to avoid duplicates. So we create the GUID in form of a hash of the plink or uri.
// We add the hash of our own host because our host is the original creator of the post.
$prefix_host = get_app()->get_hostname();
$prefix_host = get_app()->getHostName();
} else {
$prefix_host = '';
@ -2361,7 +2361,7 @@ class Item extends BaseObject
$guid = System::createUUID();
}
return self::getApp()->get_baseurl() . '/objects/' . $guid;
return self::getApp()->getBaseURL() . '/objects/' . $guid;
}
/**
@ -2644,7 +2644,7 @@ class Item extends BaseObject
}
// Prevent to forward already forwarded posts
if ($datarray["app"] == $a->get_hostname()) {
if ($datarray["app"] == $a->getHostName()) {
logger('Already forwarded (second test)', LOGGER_DEBUG);
return false;
}

View file

@ -146,7 +146,7 @@ class Photo
// Remove the cached photo
$a = get_app();
$basepath = $a->get_basepath();
$basepath = $a->getBasePath();
if (is_dir($basepath . "/photo")) {
$filename = $basepath . '/photo/' . $hash . '-4.' . $Image->getExt();

View file

@ -162,7 +162,7 @@ class Profile
* load/reload current theme info
*/
$a->set_template_engine(); // reset the template engine to the default in case the user's theme doesn't specify one
$a->setActiveTemplateEngine(); // reset the template engine to the default in case the user's theme doesn't specify one
$theme_info_file = 'view/theme/' . $a->getCurrentTheme() . '/theme.php';
if (file_exists($theme_info_file)) {
@ -1116,7 +1116,7 @@ class Profile
$a->contact = $arr['visitor'];
info(L10n::t('OpenWebAuth: %1$s welcomes %2$s', $a->get_hostname(), $visitor['name']));
info(L10n::t('OpenWebAuth: %1$s welcomes %2$s', $a->getHostName(), $visitor['name']));
logger('OpenWebAuth: auth success from ' . $visitor['addr'], LOGGER_DEBUG);
}

View file

@ -414,7 +414,7 @@ class User
$_SESSION['register'] = 1;
$_SESSION['openid'] = $openid_url;
$openid = new LightOpenID($a->get_hostname());
$openid = new LightOpenID($a->getHostName());
$openid->identity = $openid_url;
$openid->returnUrl = System::baseUrl() . '/openid';
$openid->required = ['namePerson/friendly', 'contact/email', 'namePerson'];