use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\Profile;
// we haven't loaded user data yet, but we need user language
$user = dba::selectFirst('user', ['language'], ['uid' => $_SESSION['uid']]);
$_SESSION['language'] = $lang;
// we haven't loaded user data yet, but we need user language
$user = dba::selectFirst('user', ['language'], ['uid' => $_SESSION['uid']]);
$_SESSION['language'] = $lang;
$_SESSION['language'] = $user['language'];
}
}
if ((x($_SESSION, 'language')) && ($_SESSION['language'] !== $lang)) {
$lang = $_SESSION['language'];
$_SESSION['language'] = $user['language'];
}
}
if ((x($_SESSION, 'language')) && ($_SESSION['language'] !== $lang)) {
$lang = $_SESSION['language'];
}
// Array for informations about last received items
if (! x($_SESSION, 'last_updated')) {
}
// Array for informations about last received items
if (! x($_SESSION, 'last_updated')) {
}
/*
* check_config() is responsible for running update scripts. These automatically
* update the DB schema whenever we push a new one out. It also checks to see if
}
/*
* check_config() is responsible for running update scripts. These automatically
* update the DB schema whenever we push a new one out. It also checks to see if
//Don't populate apps_menu if apps are private
$privateapps = Config::get('config', 'private_addons');
if ((local_user()) || (! $privateapps === "1")) {
//Don't populate apps_menu if apps are private
$privateapps = Config::get('config', 'private_addons');
if ((local_user()) || (! $privateapps === "1")) {
- if ((!local_user()) && plugin_is_app($a->module) && $privateapps === "1") {
- info(t("You must be logged in to use addons. "));
+ if ((!local_user()) && Addon::isApp($a->module) && $privateapps === "1") {
+ info(L10n::t("You must be logged in to use addons. "));
call_user_func([$a->module_class, 'init']);
} else if (function_exists($a->module . '_init')) {
call_user_func([$a->module_class, 'init']);
} else if (function_exists($a->module . '_init')) {
if ($a->module_class) {
call_user_func([$a->module_class, 'post']);
} else if (function_exists($a->module . '_post')) {
if ($a->module_class) {
call_user_func([$a->module_class, 'post']);
} else if (function_exists($a->module . '_post')) {
if ($a->module_class) {
call_user_func([$a->module_class, 'afterpost']);
} else if (function_exists($a->module . '_afterpost')) {
if ($a->module_class) {
call_user_func([$a->module_class, 'afterpost']);
} else if (function_exists($a->module . '_afterpost')) {
- $arr = array('content' => $a->page['content']);
- call_hooks($a->module . '_mod_content', $arr);
+ $arr = ['content' => $a->page['content']];
+ Addon::callHooks($a->module . '_mod_content', $arr);
* now that we've been through the module content, see if the page reported
* a permission problem and if so, a 403 response would seem to be in order.
*/
* now that we've been through the module content, see if the page reported
* a permission problem and if so, a 403 response would seem to be in order.
*/
-if (stristr(implode("", $_SESSION['sysmsg']), t('Permission denied'))) {
- header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));
+if (stristr(implode("", $_SESSION['sysmsg']), L10n::t('Permission denied'))) {
+ header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . L10n::t('Permission denied.'));
}
$a->page['footer'] = replace_macros(
get_markup_template("toggle_mobile_footer.tpl"),
}
$a->page['footer'] = replace_macros(
get_markup_template("toggle_mobile_footer.tpl"),
* The page templates are located in /view/php/ or in the theme directory.
*/
if (isset($_GET["mode"])) {
* The page templates are located in /view/php/ or in the theme directory.
*/
if (isset($_GET["mode"])) {