Merge remote-tracking branch 'upstream/develop' into 1701-top-level

This commit is contained in:
Michael 2017-01-11 23:15:23 +00:00
commit 12dd06f726
159 changed files with 606 additions and 607 deletions

View file

@ -1,5 +1,5 @@
Friendica Communications Server
Copyright (c) 2010-2016 the Friendica Project
Copyright (c) 2010-2017 the Friendica Project
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by

View file

@ -1540,7 +1540,7 @@ function check_db() {
* Sets the base url for use in cmdline programs which don't have
* $_SERVER variables
*/
function check_url(App &$a) {
function check_url(App $a) {
$url = get_config('system','url');
@ -1562,7 +1562,7 @@ function check_url(App &$a) {
/**
* @brief Automatic database updates
*/
function update_db(App &$a) {
function update_db(App $a) {
$build = get_config('system','build');
if(! x($build))
$build = set_config('system','build',DB_UPDATE_VERSION);
@ -1678,7 +1678,7 @@ function run_update_function($x) {
* @param App $a
*
*/
function check_plugins(App &$a) {
function check_plugins(App $a) {
$r = q("SELECT * FROM `addon` WHERE `installed` = 1");
if (dbm::is_result($r))
@ -2414,7 +2414,7 @@ function get_temppath() {
}
/// @deprecated
function set_template_engine(App &$a, $engine = 'internal') {
function set_template_engine(App $a, $engine = 'internal') {
/// @note This function is no longer necessary, but keep it as a wrapper to the class method
/// to avoid breaking themes again unnecessarily

View file

@ -40,7 +40,7 @@ Arguments
---
Your hook callback functions will be called with at least one and possibly two arguments
function myhook_function(&$a, &$b) {
function myhook_function(App $a, &$b) {
}
@ -77,9 +77,9 @@ This will include:
$a->argc = 3
$a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2');
Your module functions will often contain the function plugin_name_content(App &$a), which defines and returns the page body content.
They may also contain plugin_name_post(App &$a) which is called before the _content function and typically handles the results of POST forms.
You may also have plugin_name_init(App &$a) which is called very early on and often does module initialisation.
Your module functions will often contain the function plugin_name_content(App $a), which defines and returns the page body content.
They may also contain plugin_name_post(App $a) which is called before the _content function and typically handles the results of POST forms.
You may also have plugin_name_init(App $a) which is called very early on and often does module initialisation.
Templates
---

View file

@ -68,7 +68,7 @@ The code will be something like:
file: mod/network.php
<?php
function network_content(App &$a) {
function network_content(App $a) {
$itemsmanager = new \Friendica\ItemsManager();
$items = $itemsmanager->getAll();
@ -160,7 +160,7 @@ But if you want to use classes from another library, you need to use the full na
```
<?php
namespace \Frienidca;
namespace \Friendica;
class Diaspora {
public function md2bbcode() {
@ -173,7 +173,7 @@ if you use that class in many places of the code and you don't want to write the
```
<?php
namespace \Frienidca;
namespace \Friendica;
use \Michelf\MarkdownExtra;

View file

@ -40,7 +40,7 @@ Argumente
Deine Hook-Callback-Funktion wird mit mindestens einem und bis zu zwei Argumenten aufgerufen
function myhook_function(&$a, &$b) {
function myhook_function(App $a, &$b) {
}
@ -67,9 +67,9 @@ So würde http://example.com/plugin/arg1/arg2 nach einem Modul "plugin" suchen u
$a->argc = 3
$a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2');
Deine Modulfunktionen umfassen oft die Funktion plugin_name_content(App &$a), welche den Seiteninhalt definiert und zurückgibt.
Sie können auch plugin_name_post(App &$a) umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt.
Du kannst ebenso plugin_name_init(App &$a) nutzen, was oft frühzeitig aufgerufen wird und das Modul initialisert.
Deine Modulfunktionen umfassen oft die Funktion plugin_name_content(App $a), welche den Seiteninhalt definiert und zurückgibt.
Sie können auch plugin_name_post(App $a) umfassen, welches vor der content-Funktion aufgerufen wird und normalerweise die Resultate der POST-Formulare handhabt.
Du kannst ebenso plugin_name_init(App $a) nutzen, was oft frühzeitig aufgerufen wird und das Modul initialisert.
Derzeitige Hooks

View file

@ -122,7 +122,7 @@ the 1st part of the line is the name of the CSS file (without the .css) the 2nd
Calling the t() function with the common name makes the string translateable.
The selected 1st part will be saved in the database by the theme_post function.
function theme_post(App &$a){
function theme_post(App $a){
// non local users shall not pass
if (! local_user()) {
return;
@ -168,7 +168,7 @@ The content of this file should be something like
<?php
/* meta informations for the theme, see below */
function duepuntozero_lr_init(App &$a) {
function duepuntozero_lr_init(App $a) {
$a-> theme_info = array(
'extends' => 'duepuntozero'.
);
@ -251,7 +251,7 @@ Next crucial part of the theme.php file is a definition of an init function.
The name of the function is <theme-name>_init.
So in the case of quattro it is
function quattro_init(App &$a) {
function quattro_init(App $a) {
$a->theme_info = array();
set_template_engine($a, 'smarty3');
}

View file

@ -612,7 +612,7 @@ function get_contact($url, $uid = 0, $no_update = false) {
*
* @return string posts in HTML
*/
function posts_from_gcontact($a, $gcontact_id) {
function posts_from_gcontact(App $a, $gcontact_id) {
require_once('include/conversation.php');
@ -664,7 +664,7 @@ function posts_from_gcontact($a, $gcontact_id) {
*
* @return string posts in HTML
*/
function posts_from_contact_url($a, $contact_url) {
function posts_from_contact_url(App $a, $contact_url) {
require_once('include/conversation.php');

View file

@ -943,7 +943,7 @@ function scale_image($width, $height, $max) {
return array("width" => $dest_width, "height" => $dest_height);
}
function store_photo($a, $uid, $imagedata = "", $url = "") {
function store_photo(App $a, $uid, $imagedata = "", $url = "") {
$r = q("SELECT `user`.`nickname`, `user`.`page-flags`, `contact`.`id` FROM `user` INNER JOIN `contact` on `user`.`uid` = `contact`.`uid`
WHERE `user`.`uid` = %d AND `user`.`blocked` = 0 AND `contact`.`self` = 1 LIMIT 1",
intval($uid));

View file

@ -372,7 +372,7 @@ function populate_acl($user = null, $show_jotnets = false) {
}
function construct_acl_data(&$a, $user) {
function construct_acl_data(App $a, $user) {
// Get group and contact information for html ACL selector
$acl_data = acl_lookup($a, 'html');
@ -404,7 +404,7 @@ function construct_acl_data(&$a, $user) {
}
function acl_lookup(&$a, $out_type = 'json') {
function acl_lookup(App $a, $out_type = 'json') {
if (!local_user()) {
return '';
@ -691,7 +691,7 @@ function acl_lookup(&$a, $out_type = 'json') {
* @param App $a
* @return array with the search results
*/
function navbar_complete(App &$a) {
function navbar_complete(App $a) {
// logger('navbar_complete');

View file

@ -133,7 +133,7 @@
* @hook 'logged_in'
* array $user logged user record
*/
function api_login(App &$a){
function api_login(App $a){
// login with oauth
try{
$oauth = new FKOAuth1();
@ -251,7 +251,7 @@
* @param App $a
* @return string API call result
*/
function api_call(App &$a){
function api_call(App $a){
global $API, $called_api;
$type="json";
@ -404,7 +404,7 @@
* @param array $user_info
* @return array
*/
function api_rss_extra(&$a, $arr, $user_info){
function api_rss_extra(App $a, $arr, $user_info){
if (is_null($user_info)) $user_info = api_get_user($a);
$arr['$user'] = $user_info;
$arr['$rss'] = array(
@ -444,7 +444,7 @@
* @param int|string $contact_id Contact ID or URL
* @param string $type Return type (for errors)
*/
function api_get_user(&$a, $contact_id = Null, $type = "json"){
function api_get_user(App $a, $contact_id = Null, $type = "json"){
global $called_api;
$user = null;
$extra_query = "";
@ -712,7 +712,7 @@
* @param array $item : item from db
* @return array(array:author, array:owner)
*/
function api_item_get_user(&$a, $item) {
function api_item_get_user(App $a, $item) {
$status_user = api_get_user($a, $item["author-link"]);

View file

@ -466,7 +466,7 @@ function item_condition() {
*/
if(!function_exists('conversation')) {
function conversation(&$a, $items, $mode, $update, $preview = false) {
function conversation(App $a, $items, $mode, $update, $preview = false) {
require_once('include/bbcode.php');
require_once('include/Contact.php');

View file

@ -343,7 +343,7 @@ function cron_poll_contacts($argc, $argv) {
*
* @param App $a
*/
function cron_clear_cache(App &$a) {
function cron_clear_cache(App $a) {
$last = get_config('system','cache_last_cleared');
@ -430,7 +430,7 @@ function cron_clear_cache(App &$a) {
*
* @param App $a
*/
function cron_repair_diaspora(App &$a) {
function cron_repair_diaspora(App $a) {
$r = q("SELECT `id`, `url` FROM `contact`
WHERE `network` = '%s' AND (`batch` = '' OR `notify` = '' OR `poll` = '' OR pubkey = '')
ORDER BY RAND() LIMIT 50", dbesc(NETWORK_DIASPORA));

View file

@ -325,8 +325,9 @@ class Diaspora {
logger("delivering to: ".$rr["username"]);
self::dispatch($rr,$msg);
}
} else
logger("No subscribers for ".$msg["author"]." ".print_r($msg, true));
} else {
logger("No subscribers for ".$msg["author"]." ".print_r($msg, true), LOGGER_DEBUG);
}
return $message_id;
}

View file

@ -206,7 +206,7 @@ function bbtoevent($s) {
}
function sort_by_date(App &$a) {
function sort_by_date(App $a) {
usort($a,'ev_compare');
return $a;

View file

@ -31,7 +31,7 @@ require_once("mod/proxy.php");
* @param int $profile
* @param array $profiledata
*/
function profile_load(&$a, $nickname, $profile = 0, $profiledata = array()) {
function profile_load(App $a, $nickname, $profile = 0, $profiledata = array()) {
$user = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1",
dbesc($nickname)
@ -598,7 +598,7 @@ function get_events() {
));
}
function advanced_profile(App &$a) {
function advanced_profile(App $a) {
$o = '';
$uid = $a->profile['uid'];
@ -755,7 +755,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
array(
'label'=>t('Status'),
'url' => $url,
'sel' => ((!isset($tab)&&$a->argv[0]=='profile')?'active':''),
'sel' => ((!isset($tab) && $a->argv[0]=='profile')?'active':''),
'title' => t('Status Messages and Posts'),
'id' => 'status-tab',
'accesskey' => 'm',
@ -771,7 +771,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
array(
'label' => t('Photos'),
'url' => App::get_baseurl() . '/photos/' . $nickname,
'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''),
'sel' => ((!isset($tab) && $a->argv[0]=='photos')?'active':''),
'title' => t('Photo Albums'),
'id' => 'photo-tab',
'accesskey' => 'h',
@ -779,7 +779,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
array(
'label' => t('Videos'),
'url' => App::get_baseurl() . '/videos/' . $nickname,
'sel' => ((!isset($tab)&&$a->argv[0]=='videos')?'active':''),
'sel' => ((!isset($tab) && $a->argv[0]=='videos')?'active':''),
'title' => t('Videos'),
'id' => 'video-tab',
'accesskey' => 'v',
@ -791,7 +791,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
$tabs[] = array(
'label' => t('Events'),
'url' => App::get_baseurl() . '/events',
'sel' =>((!isset($tab)&&$a->argv[0]=='events')?'active':''),
'sel' =>((!isset($tab) && $a->argv[0]=='events')?'active':''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'accesskey' => 'e',
@ -802,7 +802,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
$tabs[] = array(
'label' => t('Events'),
'url' => App::get_baseurl() . '/cal/' . $nickname,
'sel' =>((!isset($tab)&&$a->argv[0]=='cal')?'active':''),
'sel' =>((!isset($tab) && $a->argv[0]=='cal')?'active':''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'accesskey' => 'e',
@ -813,7 +813,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
$tabs[] = array(
'label' => t('Personal Notes'),
'url' => App::get_baseurl() . '/notes',
'sel' =>((!isset($tab)&&$a->argv[0]=='notes')?'active':''),
'sel' =>((!isset($tab) && $a->argv[0]=='notes')?'active':''),
'title' => t('Only You Can See This'),
'id' => 'notes-tab',
'accesskey' => 't',
@ -824,7 +824,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
$tabs[] = array(
'label' => t('Contacts'),
'url' => App::get_baseurl() . '/viewcontacts/' . $nickname,
'sel' => ((!isset($tab)&&$a->argv[0]=='viewcontacts')?'active':''),
'sel' => ((!isset($tab) && $a->argv[0]=='viewcontacts')?'active':''),
'title' => t('Contacts'),
'id' => 'viewcontacts-tab',
'accesskey' => 'k',
@ -845,7 +845,7 @@ function get_my_url() {
return false;
}
function zrl_init(App &$a) {
function zrl_init(App $a) {
$tmp_str = get_my_url();
if(validate_url($tmp_str)) {

View file

@ -1,6 +1,6 @@
<?php
function nav(App &$a) {
function nav(App $a) {
/*
*

View file

@ -2072,7 +2072,7 @@ class ostatus {
*
* @return string XML feed
*/
public static function feed(&$a, $owner_nick, $last_update) {
public static function feed(App $a, $owner_nick, $last_update) {
$r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags`
FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`

View file

@ -296,7 +296,7 @@ function shortenmsg($msg, $limit, $twitter = false) {
*
* @return string The converted message
*/
function plaintext($a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2, $target_network = "") {
function plaintext(App $a, $b, $limit = 0, $includedlinks = false, $htmlmode = 2, $target_network = "") {
// Remove the hash tags
$URLSearchString = "^\[\]";

View file

@ -1,6 +1,6 @@
<?php
function auto_redir(&$a, $contact_nick) {
function auto_redir(App $a, $contact_nick) {
// prevent looping

View file

@ -106,7 +106,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive
function can_write_wall(&$a,$owner) {
function can_write_wall(App $a, $owner) {
static $verified = 0;

View file

@ -276,7 +276,7 @@ if(! function_exists('paginate_data')) {
* @param int $count [optional] item count (used with alt pager)
* @return Array data for pagination template
*/
function paginate_data(&$a, $count=null) {
function paginate_data(App $a, $count=null) {
$stripped = preg_replace('/([&?]page=[0-9]*)/','',$a->query_string);
$stripped = str_replace('q=','',$stripped);
@ -369,7 +369,7 @@ if(! function_exists('paginate')) {
* @param App $a App instance
* @return string html for pagination #FIXME remove html
*/
function paginate(App &$a) {
function paginate(App $a) {
$data = paginate_data($a);
$tpl = get_markup_template("paginate.tpl");
@ -384,7 +384,7 @@ if(! function_exists('alt_pager')) {
* @param int $i
* @return string html for pagination #FIXME remove html
*/
function alt_pager(&$a, $i) {
function alt_pager(App $a, $i) {
$data = paginate_data($a, $i);
$tpl = get_markup_template("paginate.tpl");

View file

@ -78,7 +78,7 @@ function import_cleanup($newuid) {
q("DELETE FROM `pconfig` WHERE uid = %d", $newuid);
}
function import_account(&$a, $file) {
function import_account(App $a, $file) {
logger("Start user import from " . $file['tmp_name']);
/*
STEPS

View file

@ -3,7 +3,7 @@
require_once("mod/hostxrd.php");
require_once("mod/nodeinfo.php");
function _well_known_init(App &$a){
function _well_known_init(App $a) {
if ($a->argc > 1) {
switch($a->argv[1]) {
case "host-meta":
@ -21,7 +21,7 @@ function _well_known_init(App &$a){
killme();
}
function wk_social_relay(App &$a) {
function wk_social_relay(App $a) {
define('SR_SCOPE_ALL', 'all');
define('SR_SCOPE_TAGS', 'tags');

View file

@ -2,7 +2,7 @@
require_once('include/Scrape.php');
function acctlink_init(App &$a) {
function acctlink_init(App $a) {
if(x($_GET,'addr')) {
$addr = trim($_GET['addr']);

View file

@ -3,7 +3,7 @@
require_once("include/acl_selectors.php");
function acl_init(App &$a){
function acl_init(App $a) {
acl_lookup($a);
}

View file

@ -23,7 +23,7 @@ require_once("include/text.php");
* @param App $a
*
*/
function admin_post(App &$a){
function admin_post(App $a) {
if(!is_site_admin()) {
@ -66,7 +66,7 @@ function admin_post(App &$a){
$theme = $a->argv[2];
if(is_file("view/theme/$theme/config.php")){
function __call_theme_admin_post(&$a, $theme) {
function __call_theme_admin_post(App $a, $theme) {
$orig_theme = $a->theme;
$orig_page = $a->page;
$orig_session_theme = $_SESSION['theme'];
@ -127,7 +127,7 @@ function admin_post(App &$a){
* @param App $a
* @return string
*/
function admin_content(App &$a) {
function admin_content(App $a) {
if(!is_site_admin()) {
return login(false);
@ -260,7 +260,7 @@ function admin_content(App &$a) {
* @param App $a
* @return string
*/
function admin_page_federation(App &$a) {
function admin_page_federation(App $a) {
// get counts on active friendica, diaspora, redmatrix, hubzilla, gnu
// social and statusnet nodes this node is knowing
//
@ -393,7 +393,7 @@ function admin_page_federation(App &$a) {
* @param App $a
* @return string
*/
function admin_page_queue(App &$a) {
function admin_page_queue(App $a) {
// get content from the queue table
$r = q("SELECT `c`.`name`, `c`.`nurl`, `q`.`id`, `q`.`network`, `q`.`created`, `q`.`last`
FROM `queue` AS `q`, `contact` AS `c`
@ -427,7 +427,7 @@ function admin_page_queue(App &$a) {
* @param App $a
* @return string
*/
function admin_page_summary(App &$a) {
function admin_page_summary(App $a) {
global $db;
// are there MyISAM tables in the DB? If so, trigger a warning message
$r = q("SELECT `engine` FROM `information_schema`.`tables` WHERE `engine` = 'myisam' AND `table_schema` = '%s' LIMIT 1",
@ -504,7 +504,7 @@ function admin_page_summary(App &$a) {
*
* @param App $a
*/
function admin_page_site_post(App &$a) {
function admin_page_site_post(App $a) {
if(!x($_POST,"page_site")) {
return;
}
@ -845,7 +845,7 @@ function admin_page_site_post(App &$a) {
* @param App $a
* @return string
*/
function admin_page_site(App &$a) {
function admin_page_site(App $a) {
/* Installed langs */
$lang_choices = get_available_languages();
@ -1072,7 +1072,7 @@ function admin_page_site(App &$a) {
* @param App $a
* @return string
**/
function admin_page_dbsync(App &$a) {
function admin_page_dbsync(App $a) {
$o = '';
@ -1155,7 +1155,7 @@ function admin_page_dbsync(App &$a) {
*
* @param App $a
*/
function admin_page_users_post(App &$a){
function admin_page_users_post(App $a) {
$pending = (x($_POST, 'pending') ? $_POST['pending'] : array());
$users = (x($_POST, 'user') ? $_POST['user'] : array());
$nu_name = (x($_POST, 'new_user_name') ? $_POST['new_user_name'] : '');
@ -1260,7 +1260,7 @@ function admin_page_users_post(App &$a){
* @param App $a
* @return string
*/
function admin_page_users(App &$a){
function admin_page_users(App $a) {
if($a->argc>2) {
$uid = $a->argv[3];
$user = q("SELECT `username`, `blocked` FROM `user` WHERE `uid` = %d", intval($uid));
@ -1460,7 +1460,7 @@ function admin_page_users(App &$a){
* @param App $a
* @return string
*/
function admin_page_plugins(App &$a){
function admin_page_plugins(App $a) {
/*
* Single plugin
@ -1669,7 +1669,7 @@ function rebuild_theme_table($themes) {
* @param App $a
* @return string
*/
function admin_page_themes(App &$a){
function admin_page_themes(App $a) {
$allowed_themes_str = get_config('system','allowed_themes');
$allowed_themes_raw = explode(',',$allowed_themes_str);
@ -1749,7 +1749,7 @@ function admin_page_themes(App &$a){
$admin_form="";
if(is_file("view/theme/$theme/config.php")) {
function __get_theme_admin_form(&$a, $theme) {
function __get_theme_admin_form(App $a, $theme) {
$orig_theme = $a->theme;
$orig_page = $a->page;
$orig_session_theme = $_SESSION['theme'];
@ -1850,7 +1850,7 @@ function admin_page_themes(App &$a){
*
* @param App $a
*/
function admin_page_logs_post(App &$a) {
function admin_page_logs_post(App $a) {
if (x($_POST,"page_logs")) {
check_form_security_token_redirectOnErr('/admin/logs', 'admin_logs');
@ -1884,7 +1884,7 @@ function admin_page_logs_post(App &$a) {
* @param App $a
* @return string
*/
function admin_page_logs(App &$a){
function admin_page_logs(App $a) {
$log_choices = array(
LOGGER_NORMAL => 'Normal',
@ -1941,7 +1941,7 @@ function admin_page_logs(App &$a){
* @param App $a
* @return string
*/
function admin_page_viewlogs(App &$a){
function admin_page_viewlogs(App $a) {
$t = get_markup_template("admin_viewlogs.tpl");
$f = get_config('system','logfile');
$data = '';
@ -1983,7 +1983,7 @@ function admin_page_viewlogs(App &$a){
*
* @param App $a
*/
function admin_page_features_post(App &$a) {
function admin_page_features_post(App $a) {
check_form_security_token_redirectOnErr('/admin/features', 'admin_manage_features');
@ -2029,7 +2029,7 @@ function admin_page_features_post(App &$a) {
* @param App $a
* @return string
*/
function admin_page_features(App &$a) {
function admin_page_features(App $a) {
if((argc() > 1) && (argv(1) === 'features')) {
$arr = array();

View file

@ -5,7 +5,7 @@ require_once('include/Contact.php');
require_once('include/contact_selectors.php');
require_once('mod/contacts.php');
function allfriends_content(App &$a) {
function allfriends_content(App $a) {
$o = '';
if (! local_user()) {

View file

@ -1,6 +1,6 @@
<?php
function amcd_content(App &$a) {
function amcd_content(App $a) {
//header("Content-type: text/json");
echo <<< EOT
{

View file

@ -20,7 +20,7 @@ function oauth_get_client($request){
return $r[0];
}
function api_post(App &$a) {
function api_post(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
@ -34,7 +34,7 @@ function api_post(App &$a) {
}
function api_content(App &$a) {
function api_content(App $a) {
if ($a->cmd=='api/oauth/authorize'){
/*
* api/oauth/authorize interact with the user. return a standard page

View file

@ -1,6 +1,6 @@
<?php
function apps_content(App &$a) {
function apps_content(App $a) {
$privateaddons = get_config('config','private_addons');
if ($privateaddons === "1") {
if((! (local_user()))) {

View file

@ -2,7 +2,7 @@
require_once('include/security.php');
function attach_init(App &$a) {
function attach_init(App $a) {
if($a->argc != 2) {
notice( t('Item not available.') . EOL);

View file

@ -9,7 +9,7 @@ function visible_lf($s) {
return str_replace("\n",'<br />', $s);
}
function babel_content(App &$a) {
function babel_content(App $a) {
$o .= '<h1>Babel Diagnostic</h1>';

View file

@ -3,11 +3,11 @@
require_once('include/conversation.php');
require_once('include/items.php');
function bookmarklet_init(App &$a) {
function bookmarklet_init(App $a) {
$_GET["mode"] = "minimal";
}
function bookmarklet_content(App &$a) {
function bookmarklet_content(App $a) {
if (!local_user()) {
$o = '<h2>'.t('Login').'</h2>';
$o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);

View file

@ -9,7 +9,7 @@
require_once('include/event.php');
require_once('include/redir.php');
function cal_init(App &$a) {
function cal_init(App $a) {
if($a->argc > 1)
auto_redir($a, $a->argv[1]);
@ -64,7 +64,7 @@ function cal_init(App &$a) {
return;
}
function cal_content(App &$a) {
function cal_content(App $a) {
nav_set_selected('events');
$editselect = 'none';

View file

@ -5,19 +5,19 @@
*/
function cb_init(App &$a) {
function cb_init(App $a) {
call_hooks('cb_init');
}
function cb_post(App &$a) {
function cb_post(App $a) {
call_hooks('cb_post', $_POST);
}
function cb_afterpost(App &$a) {
function cb_afterpost(App $a) {
call_hooks('cb_afterpost');
}
function cb_content(App &$a) {
function cb_content(App $a) {
$o = '';
call_hooks('cb_content', $o);
return $o;

View file

@ -5,7 +5,7 @@ require_once('include/Contact.php');
require_once('include/contact_selectors.php');
require_once('mod/contacts.php');
function common_content(App &$a) {
function common_content(App $a) {
$o = '';

View file

@ -1,6 +1,6 @@
<?php
function community_init(App &$a) {
function community_init(App $a) {
if (! local_user()) {
unset($_SESSION['theme']);
unset($_SESSION['mobile-theme']);
@ -10,7 +10,7 @@ function community_init(App &$a) {
}
function community_content(&$a, $update = 0) {
function community_content(App $a, $update = 0) {
$o = '';

View file

@ -2,7 +2,7 @@
require_once('include/group.php');
function contactgroup_content(App &$a) {
function contactgroup_content(App $a) {
if (! local_user()) {

View file

@ -7,7 +7,7 @@ require_once('include/Scrape.php');
require_once('mod/proxy.php');
require_once('include/Photo.php');
function contacts_init(App &$a) {
function contacts_init(App $a) {
if (! local_user()) {
return;
}
@ -97,7 +97,7 @@ function contacts_init(App &$a) {
}
function contacts_batch_actions(App &$a){
function contacts_batch_actions(App $a) {
$contacts_id = $_POST['contact_batch'];
if (!is_array($contacts_id)) return;
@ -144,7 +144,7 @@ function contacts_batch_actions(App &$a){
}
function contacts_post(App &$a) {
function contacts_post(App $a) {
if (! local_user()) {
return;
@ -349,7 +349,7 @@ function _contact_drop($contact_id, $orig_record) {
}
function contacts_content(App &$a) {
function contacts_content(App $a) {
$sort_type = 0;
$o = '';

View file

@ -16,7 +16,7 @@
// and 10-20 milliseconds to fetch all the child items.
function content_content(&$a, $update = 0) {
function content_content(App $a, $update = 0) {
require_once('include/conversation.php');
@ -307,7 +307,7 @@ function content_content(&$a, $update = 0) {
function render_content(&$a, $items, $mode, $update, $preview = false) {
function render_content(App $a, $items, $mode, $update, $preview = false) {
require_once('include/bbcode.php');
require_once('mod/proxy.php');

View file

@ -5,7 +5,7 @@
* addons repository will be listed though ATM)
*/
function credits_content (App &$a) {
function credits_content (App $a) {
/* fill the page with credits */
$f = fopen('util/credits.txt','r');
$names = fread($f, filesize('util/credits.txt'));

View file

@ -2,7 +2,7 @@
require_once("include/contact_selectors.php");
require_once("mod/contacts.php");
function crepair_init(App &$a) {
function crepair_init(App $a) {
if (! local_user()) {
return;
}
@ -30,7 +30,7 @@ function crepair_init(App &$a) {
}
}
function crepair_post(App &$a) {
function crepair_post(App $a) {
if (! local_user()) {
return;
}
@ -96,7 +96,7 @@ function crepair_post(App &$a) {
function crepair_content(App &$a) {
function crepair_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -1,12 +1,12 @@
<?php
require_once('mod/settings.php');
function delegate_init(App &$a) {
function delegate_init(App $a) {
return settings_init($a);
}
function delegate_content(App &$a) {
function delegate_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -22,7 +22,7 @@ require_once('include/enotify.php');
require_once('include/group.php');
require_once('include/Probe.php');
function dfrn_confirm_post(&$a,$handsfree = null) {
function dfrn_confirm_post(App $a, $handsfree = null) {
if(is_array($handsfree)) {

View file

@ -11,7 +11,7 @@ require_once('include/event.php');
require_once('library/defuse/php-encryption-1.2.1/Crypto.php');
function dfrn_notify_post(App &$a) {
function dfrn_notify_post(App $a) {
logger(__function__, LOGGER_TRACE);
$dfrn_id = ((x($_POST,'dfrn_id')) ? notags(trim($_POST['dfrn_id'])) : '');
$dfrn_version = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0);
@ -221,7 +221,7 @@ function dfrn_notify_post(App &$a) {
}
function dfrn_notify_content(App &$a) {
function dfrn_notify_content(App $a) {
if(x($_GET,'dfrn_id')) {

View file

@ -4,7 +4,7 @@ require_once('include/auth.php');
require_once('include/dfrn.php');
function dfrn_poll_init(App &$a) {
function dfrn_poll_init(App $a) {
$dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : '');
@ -203,7 +203,7 @@ function dfrn_poll_init(App &$a) {
function dfrn_poll_post(App &$a) {
function dfrn_poll_post(App $a) {
$dfrn_id = ((x($_POST,'dfrn_id')) ? $_POST['dfrn_id'] : '');
$challenge = ((x($_POST,'challenge')) ? $_POST['challenge'] : '');
@ -383,7 +383,7 @@ function dfrn_poll_post(App &$a) {
}
}
function dfrn_poll_content(App &$a) {
function dfrn_poll_content(App $a) {
$dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : '');
$type = ((x($_GET,'type')) ? $_GET['type'] : 'data');

View file

@ -17,7 +17,7 @@ require_once('include/Scrape.php');
require_once('include/Probe.php');
require_once('include/group.php');
function dfrn_request_init(App &$a) {
function dfrn_request_init(App $a) {
if($a->argc > 1)
$which = $a->argv[1];
@ -42,7 +42,7 @@ function dfrn_request_init(App &$a) {
* After logging in, we click 'submit' to approve the linkage.
*
*/
function dfrn_request_post(App &$a) {
function dfrn_request_post(App $a) {
if(($a->argc != 2) || (! count($a->profile))) {
logger('Wrong count of argc or profiles: argc=' . $a->argc . ',profile()=' . count($a->profile));
@ -658,7 +658,7 @@ function dfrn_request_post(App &$a) {
}
function dfrn_request_content(App &$a) {
function dfrn_request_content(App $a) {
if (($a->argc != 2) || (! count($a->profile))) {
return "";

View file

@ -1,6 +1,6 @@
<?php
function directory_init(App &$a) {
function directory_init(App $a) {
$a->set_pager_itemspage(60);
if(local_user()) {
@ -20,14 +20,14 @@ function directory_init(App &$a) {
}
function directory_post(App &$a) {
function directory_post(App $a) {
if(x($_POST,'search'))
$a->data['search'] = $_POST['search'];
}
function directory_content(App &$a) {
function directory_content(App $a) {
global $db;
require_once("mod/proxy.php");

View file

@ -5,7 +5,7 @@ require_once('include/Contact.php');
require_once('include/contact_selectors.php');
require_once('mod/contacts.php');
function dirfind_init(App &$a) {
function dirfind_init(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL );
@ -23,7 +23,7 @@ function dirfind_init(App &$a) {
function dirfind_content(&$a, $prefix = "") {
function dirfind_content(App $a, $prefix = "") {
$community = false;
$discover_user = false;

View file

@ -1,6 +1,6 @@
<?php
function display_init(App &$a) {
function display_init(App $a) {
if ((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
return;
@ -194,7 +194,7 @@ function display_fetchauthor($a, $item) {
return($profiledata);
}
function display_content(&$a, $update = 0) {
function display_content(App $a, $update = 0) {
if ((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice(t('Public access denied.') . EOL);

View file

@ -2,7 +2,7 @@
require_once('include/acl_selectors.php');
function editpost_content(App &$a) {
function editpost_content(App $a) {
$o = '';

View file

@ -8,7 +8,7 @@ require_once('include/datetime.php');
require_once('include/event.php');
require_once('include/items.php');
function events_init(App &$a) {
function events_init(App $a) {
if (! local_user()) {
return;
}
@ -31,7 +31,7 @@ function events_init(App &$a) {
return;
}
function events_post(App &$a) {
function events_post(App $a) {
logger('post: ' . print_r($_REQUEST,true));
@ -189,7 +189,7 @@ function events_post(App &$a) {
function events_content(App &$a) {
function events_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -10,7 +10,7 @@ require_once('include/Photo.php');
/**
* @param App $a
*/
function fbrowser_content(App &$a){
function fbrowser_content(App $a) {
if (!local_user())
killme();

View file

@ -6,9 +6,7 @@ require_once("include/crypto.php");
require_once("include/diaspora.php");
require_once("include/xml.php");
/// @TODO You always make it like this: function foo(&$a)
/// @TODO This means that the value of $a can be changed in anything, remove & and use App as type-hint
function fetch_init(App &$a){
function fetch_init(App $a) {
if (($a->argc != 3) OR (!in_array($a->argv[1], array("post", "status_message", "reshare")))) {
header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found'));

View file

@ -5,7 +5,7 @@ require_once('include/bbcode.php');
require_once('include/items.php');
function filer_content(App &$a) {
function filer_content(App $a) {
if (! local_user()) {
killme();

View file

@ -1,6 +1,6 @@
<?php
function filerm_content(App &$a) {
function filerm_content(App $a) {
if (! local_user()) {
killme();

View file

@ -5,7 +5,7 @@ require_once('include/follow.php');
require_once('include/Contact.php');
require_once('include/contact_selectors.php');
function follow_content(App &$a) {
function follow_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
@ -152,7 +152,7 @@ function follow_content(App &$a) {
return $o;
}
function follow_post(App &$a) {
function follow_post(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -1,6 +1,6 @@
<?php
function friendica_init(App &$a) {
function friendica_init(App $a) {
if ($a->argv[1]=="json"){
$register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
@ -59,7 +59,7 @@ function friendica_init(App &$a) {
function friendica_content(App &$a) {
function friendica_content(App $a) {
$o = '';
$o .= '<h3>Friendica</h3>';

View file

@ -1,7 +1,7 @@
<?php
function fsuggest_post(App &$a) {
function fsuggest_post(App $a) {
if (! local_user()) {
return;
@ -71,7 +71,7 @@ function fsuggest_post(App &$a) {
function fsuggest_content(App &$a) {
function fsuggest_content(App $a) {
require_once('include/acl_selectors.php');

View file

@ -4,7 +4,7 @@ function validate_members(&$item) {
$item = intval($item);
}
function group_init(App &$a) {
function group_init(App $a) {
if(local_user()) {
require_once('include/group.php');
$a->page['aside'] = group_side('contacts','group','extended',(($a->argc > 1) ? intval($a->argv[1]) : 0));
@ -13,7 +13,7 @@ function group_init(App &$a) {
function group_post(App &$a) {
function group_post(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
@ -69,7 +69,7 @@ function group_post(App &$a) {
return;
}
function group_content(App &$a) {
function group_content(App $a) {
$change = false;
if (! local_user()) {

View file

@ -1,6 +1,6 @@
<?php
function hcard_init(App &$a) {
function hcard_init(App $a) {
$blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);

View file

@ -18,7 +18,7 @@ if (!function_exists('load_doc_file')) {
}
function help_content(App &$a) {
function help_content(App $a) {
nav_set_selected('help');

View file

@ -1,7 +1,7 @@
<?php
if(! function_exists('home_init')) {
function home_init(App &$a) {
function home_init(App $a) {
$ret = array();
call_hooks('home_init',$ret);
@ -17,7 +17,7 @@ function home_init(App &$a) {
}}
if(! function_exists('home_content')) {
function home_content(App &$a) {
function home_content(App $a) {
$o = '';

View file

@ -2,7 +2,7 @@
require_once('include/crypto.php');
function hostxrd_init(App &$a) {
function hostxrd_init(App $a) {
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
$pubkey = get_config('system','site_pubkey');

View file

@ -11,7 +11,7 @@
require_once("include/socgraph.php");
require_once("include/Contact.php");
function hovercard_init(App &$a) {
function hovercard_init(App $a) {
// Just for testing purposes
$_GET["mode"] = "minimal";
}

View file

@ -1,7 +1,7 @@
<?php
function ignored_init(App &$a) {
function ignored_init(App $a) {
$ignored = 0;

View file

@ -4,7 +4,7 @@ require_once "include/Photo.php";
$install_wizard_pass=1;
function install_init(App &$a){
function install_init(App $a) {
// $baseurl/install/testrwrite to test if rewite in .htaccess is working
if ($a->argc==2 && $a->argv[1]=="testrewrite") {
@ -24,7 +24,7 @@ function install_init(App &$a){
}
function install_post(App &$a) {
function install_post(App $a) {
global $install_wizard_pass, $db;
switch($install_wizard_pass) {
@ -132,7 +132,7 @@ function get_db_errno() {
}
}
function install_content(App &$a) {
function install_content(App $a) {
global $install_wizard_pass, $db;
$o = '';
@ -565,7 +565,7 @@ function check_imagik(&$checks) {
}
}
function manual_config(App &$a) {
function manual_config(App $a) {
$data = htmlentities($a->data['txt'],ENT_COMPAT,'UTF-8');
$o = t('The database configuration file ".htconfig.php" could not be written. Please use the enclosed text to create a configuration file in your web server root.');
$o .= "<textarea rows=\"24\" cols=\"80\" >$data</textarea>";

View file

@ -9,7 +9,7 @@
require_once('include/email.php');
function invite_post(App &$a) {
function invite_post(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
@ -97,7 +97,7 @@ function invite_post(App &$a) {
}
function invite_content(App &$a) {
function invite_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -27,7 +27,7 @@ require_once('include/Scrape.php');
require_once('include/diaspora.php');
require_once('include/Contact.php');
function item_post(App &$a) {
function item_post(App $a) {
if((! local_user()) && (! remote_user()) && (! x($_REQUEST,'commenter')))
return;
@ -1066,7 +1066,7 @@ function item_post_return($baseurl, $api_source, $return_path) {
function item_content(App &$a) {
function item_content(App $a) {
if ((! local_user()) && (! remote_user())) {
return;

View file

@ -5,7 +5,7 @@ require_once('include/bbcode.php');
require_once('include/items.php');
require_once('include/like.php');
function like_content(App &$a) {
function like_content(App $a) {
if(! local_user() && ! remote_user()) {
return false;
}

View file

@ -3,7 +3,7 @@
require_once('include/datetime.php');
function localtime_post(App &$a) {
function localtime_post(App $a) {
$t = $_REQUEST['time'];
if(! $t)
@ -16,7 +16,7 @@ function localtime_post(App &$a) {
}
function localtime_content(App &$a) {
function localtime_content(App $a) {
$t = $_REQUEST['time'];
if(! $t)
$t = 'now';

View file

@ -1,7 +1,7 @@
<?php
function lockview_content(App &$a) {
function lockview_content(App $a) {
$type = (($a->argc > 1) ? $a->argv[1] : 0);
if (is_numeric($type)) {

View file

@ -1,6 +1,6 @@
<?php
function login_content(App &$a) {
function login_content(App $a) {
if(x($_SESSION,'theme'))
unset($_SESSION['theme']);
if(x($_SESSION,'mobile-theme'))

View file

@ -4,7 +4,7 @@ require_once('include/email.php');
require_once('include/enotify.php');
require_once('include/text.php');
function lostpass_post(App &$a) {
function lostpass_post(App $a) {
$loginame = notags(trim($_POST['login-name']));
if(! $loginame)
@ -77,7 +77,7 @@ function lostpass_post(App &$a) {
}
function lostpass_content(App &$a) {
function lostpass_content(App $a) {
if(x($_GET,'verify')) {

View file

@ -1,6 +1,6 @@
<?php
function maintenance_content(App &$a) {
function maintenance_content(App $a) {
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 600');

View file

@ -3,7 +3,7 @@
require_once("include/text.php");
function manage_post(App &$a) {
function manage_post(App $a) {
if (! local_user()) {
return;
@ -92,7 +92,7 @@ function manage_post(App &$a) {
function manage_content(App &$a) {
function manage_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -10,10 +10,10 @@ require_once('mod/proxy.php');
* It takes keywords from your profile and queries the directory server for
* matching keywords from other profiles.
*
* @param App &$a
* @param App $a
* @return void|string
*/
function match_content(App &$a) {
function match_content(App $a) {
$o = '';
if (! local_user()) {

View file

@ -4,7 +4,7 @@ require_once('include/acl_selectors.php');
require_once('include/message.php');
require_once('include/Smilies.php');
function message_init(App &$a) {
function message_init(App $a) {
$tabs = '';
@ -40,7 +40,7 @@ function message_init(App &$a) {
}
function message_post(App &$a) {
function message_post(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
@ -173,7 +173,7 @@ function item_redir_and_replace_images($body, $images, $cid) {
function message_content(App &$a) {
function message_content(App $a) {
$o = '';
nav_set_selected('messages');

View file

@ -2,7 +2,7 @@
require_once('library/asn1.php');
function modexp_init(App &$a) {
function modexp_init(App $a) {
if($a->argc != 2)
killme();

View file

@ -5,7 +5,7 @@ require_once('include/bbcode.php');
require_once('include/items.php');
function mood_init(App &$a) {
function mood_init(App $a) {
if (! local_user()) {
return;
@ -109,7 +109,7 @@ function mood_init(App &$a) {
function mood_content(App &$a) {
function mood_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -1,6 +1,6 @@
<?php
function msearch_post(App &$a) {
function msearch_post(App $a) {
$perpage = (($_POST['n']) ? $_POST['n'] : 80);
$page = (($_POST['p']) ? intval($_POST['p'] - 1) : 0);

View file

@ -2,7 +2,7 @@
require_once("include/nav.php");
function navigation_content(App &$a) {
function navigation_content(App $a) {
$nav_info = nav_info($a);

View file

@ -1,5 +1,5 @@
<?php
function network_init(App &$a) {
function network_init(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);
return;
@ -221,7 +221,7 @@ function saved_searches($search) {
*
* @return Array ( $no_active, $comment_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active );
*/
function network_query_get_sel_tab(App &$a) {
function network_query_get_sel_tab(App $a) {
$no_active='';
$starred_active = '';
$new_active = '';
@ -292,7 +292,7 @@ function network_query_get_sel_net() {
return $network;
}
function network_query_get_sel_group(App &$a) {
function network_query_get_sel_group(App $a) {
$group = false;
if($a->argc >= 2 && is_numeric($a->argv[1])) {
@ -303,7 +303,7 @@ function network_query_get_sel_group(App &$a) {
}
function network_content(&$a, $update = 0) {
function network_content(App $a, $update = 0) {
require_once('include/conversation.php');
@ -809,7 +809,7 @@ function network_content(&$a, $update = 0) {
* @param app $a The global App
* @return string Html of the networktab
*/
function network_tabs(App &$a) {
function network_tabs(App $a) {
// item filter tabs
/// @TODO fix this logic, reduce duplication
/// $a->page['content'] .= '<div class="tabs-wrapper">';

View file

@ -1,6 +1,6 @@
<?php
function newmember_content(App &$a) {
function newmember_content(App $a) {
$o = '<h1>' . t('Welcome to Friendica') . '</h1>';

View file

@ -7,7 +7,7 @@
require_once("include/plugin.php");
function nodeinfo_wellknown(App &$a) {
function nodeinfo_wellknown(App $a) {
if (!get_config("system", "nodeinfo")) {
http_status_exit(404);
killme();
@ -20,7 +20,7 @@ function nodeinfo_wellknown(App &$a) {
exit;
}
function nodeinfo_init(App &$a){
function nodeinfo_init(App $a) {
if (!get_config("system", "nodeinfo")) {
http_status_exit(404);
killme();

View file

@ -4,7 +4,7 @@ require_once('include/Contact.php');
require_once('include/socgraph.php');
require_once('include/contact_selectors.php');
function nogroup_init(App &$a) {
function nogroup_init(App $a) {
if (! local_user()) {
return;
@ -21,7 +21,7 @@ function nogroup_init(App &$a) {
}
function nogroup_content(App &$a) {
function nogroup_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -1,6 +1,6 @@
<?php
function noscrape_init(App &$a) {
function noscrape_init(App $a) {
if($a->argc > 1)
$which = $a->argv[1];

View file

@ -1,6 +1,6 @@
<?php
function notes_init(App &$a) {
function notes_init(App $a) {
if (! local_user()) {
return;
@ -17,7 +17,7 @@ function notes_init(App &$a) {
}
function notes_content(&$a,$update = false) {
function notes_content(App $a, $update = false) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -1,7 +1,7 @@
<?php
/* identi.ca -> friendica items permanent-url compatibility */
function notice_init(App &$a){
function notice_init(App $a) {
$id = $a->argv[1];
$r = q("SELECT user.nickname FROM user LEFT JOIN item ON item.uid=user.uid WHERE item.id=%d",
intval($id)

View file

@ -9,7 +9,7 @@ require_once("include/NotificationsManager.php");
require_once("include/contact_selectors.php");
require_once("include/network.php");
function notifications_post(App &$a) {
function notifications_post(App $a) {
if (! local_user()) {
goaway(z_root());
@ -65,7 +65,7 @@ function notifications_post(App &$a) {
}
}
function notifications_content(App &$a) {
function notifications_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -1,7 +1,7 @@
<?php
require_once('include/NotificationsManager.php');
function notify_init(App &$a) {
function notify_init(App $a) {
if (! local_user()) {
return;
}
@ -39,7 +39,7 @@ function notify_init(App &$a) {
}
function notify_content(App &$a) {
function notify_content(App $a) {
if (! local_user()) {
return login();
}

View file

@ -1,7 +1,7 @@
<?php
require_once("include/oembed.php");
function oembed_content(App &$a){
function oembed_content(App $a) {
// logger('mod_oembed ' . $a->query_string, LOGGER_ALL);
if ($a->argv[1]=='b2h'){

View file

@ -1,7 +1,7 @@
<?php
function oexchange_init(App &$a) {
function oexchange_init(App $a) {
if(($a->argc > 1) && ($a->argv[1] === 'xrd')) {
$tpl = get_markup_template('oexchange_xrd.tpl');
@ -14,7 +14,7 @@ function oexchange_init(App &$a) {
}
function oexchange_content(App &$a) {
function oexchange_content(App $a) {
if (! local_user()) {
$o = login(false);

View file

@ -4,7 +4,7 @@
require_once('library/openid.php');
function openid_content(App &$a) {
function openid_content(App $a) {
$noid = get_config('system','no_openid');
if($noid)

View file

@ -1,5 +1,5 @@
<?php
function opensearch_content(App &$a) {
function opensearch_content(App $a) {
$tpl = get_markup_template('opensearch.tpl');

View file

@ -3,7 +3,7 @@
require_once('include/Scrape.php');
require_once('include/follow.php');
function ostatus_subscribe_content(App &$a) {
function ostatus_subscribe_content(App $a) {
if (! local_user()) {
notice( t('Permission denied.') . EOL);

View file

@ -19,7 +19,7 @@ use \Friendica\ParseUrl;
require_once("include/items.php");
function parse_url_content(App &$a) {
function parse_url_content(App $a) {
$text = null;
$str_tags = "";

View file

@ -3,7 +3,7 @@
require_once('include/security.php');
require_once('include/Photo.php');
function photo_init(App &$a) {
function photo_init(App $a) {
global $_SERVER;
$prvcachecontrol = false;

View file

@ -10,7 +10,7 @@ require_once('include/tags.php');
require_once('include/threads.php');
require_once('include/Probe.php');
function photos_init(App &$a) {
function photos_init(App $a) {
if ($a->argc > 1)
auto_redir($a, $a->argv[1]);
@ -112,7 +112,7 @@ function photos_init(App &$a) {
function photos_post(App &$a) {
function photos_post(App $a) {
logger('mod-photos: photos_post: begin' , LOGGER_DEBUG);
@ -946,7 +946,7 @@ function photos_post(App &$a) {
function photos_content(App &$a) {
function photos_content(App $a) {
// URLs:
// photos/name

View file

@ -2,7 +2,7 @@
// See here for a documentation for portable contacts:
// https://web.archive.org/web/20160405005550/http://portablecontacts.net/draft-spec.html
function poco_init(App &$a) {
function poco_init(App $a) {
require_once("include/bbcode.php");
$system_mode = false;

Some files were not shown because too many files have changed in this diff Show more