Cleanup /format pre-move

This commit is contained in:
Hypolite Petovan 2017-04-30 00:01:26 -04:00
parent f77632378b
commit 56ee734b00
85 changed files with 522 additions and 581 deletions

View File

@ -19,7 +19,7 @@
require_once(__DIR__ . DIRECTORY_SEPARATOR. 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'); require_once(__DIR__ . DIRECTORY_SEPARATOR. 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once('include/config.php'); require_once('include/config.php');
require_once('include/network.php'); require_once('include/network.php');

View File

@ -5,8 +5,8 @@
* *
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
use \Friendica\Core\PConfig; use Friendica\Core\PConfig;
require_once("include/feed.php"); require_once("include/feed.php");
require_once('include/email.php'); require_once('include/email.php');

View File

@ -6,7 +6,7 @@
* @todo Automatically detect if incoming data is HTML or BBCode * @todo Automatically detect if incoming data is HTML or BBCode
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once 'include/HTTPExceptions.php'; require_once 'include/HTTPExceptions.php';
require_once 'include/bbcode.php'; require_once 'include/bbcode.php';

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once('include/security.php'); require_once('include/security.php');
require_once('include/datetime.php'); require_once('include/datetime.php');

View File

@ -32,6 +32,8 @@
* *
*/ */
use Friendica\App;
if (sizeof($_SERVER["argv"]) == 0) if (sizeof($_SERVER["argv"]) == 0)
die(); die();

View File

@ -1,5 +1,7 @@
<?php <?php
use Friendica\App;
use League\HTMLToMarkdown\HtmlConverter; use League\HTMLToMarkdown\HtmlConverter;
require_once "include/oembed.php"; require_once "include/oembed.php";

View File

@ -1,5 +1,6 @@
<?php <?php
use \Friendica\Core\Config;
use Friendica\Core\Config;
require_once 'include/oembed.php'; require_once 'include/oembed.php';
require_once 'include/event.php'; require_once 'include/event.php';

View File

@ -1,6 +1,6 @@
<?php /** @file */ <?php /** @file */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once('boot.php'); require_once('boot.php');

View File

@ -3,7 +3,6 @@
require_once "include/bbcode.php"; require_once "include/bbcode.php";
require_once "include/acl_selectors.php"; require_once "include/acl_selectors.php";
/* /*
* Note: the code in 'item_extract_images' and 'item_redir_and_replace_images' * Note: the code in 'item_extract_images' and 'item_redir_and_replace_images'
* is identical to the code in mod/message.php for 'item_extract_images' and * is identical to the code in mod/message.php for 'item_extract_images' and

View File

@ -1,5 +1,6 @@
<?php <?php
use \Friendica\Core\Config;
use Friendica\Core\Config;
function cronjobs_run(&$argv, &$argc){ function cronjobs_run(&$argv, &$argc){
global $a; global $a;

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once("boot.php"); require_once("boot.php");
require_once("include/text.php"); require_once("include/text.php");

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once('include/queue_fn.php'); require_once('include/queue_fn.php');
require_once('include/html2plain.php'); require_once('include/html2plain.php');

View File

@ -8,7 +8,7 @@
* This will change in the future. * This will change in the future.
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once 'include/items.php'; require_once 'include/items.php';
require_once 'include/bb2diaspora.php'; require_once 'include/bb2diaspora.php';

View File

@ -4,7 +4,7 @@
* @file include/items.php * @file include/items.php
*/ */
use \Friendica\ParseUrl; use Friendica\ParseUrl;
require_once 'include/bbcode.php'; require_once 'include/bbcode.php';
require_once 'include/oembed.php'; require_once 'include/oembed.php';

View File

@ -3,8 +3,6 @@
// send a private message // send a private message
function send_message($recipient=0, $body='', $subject='', $replyto=''){ function send_message($recipient=0, $body='', $subject='', $replyto=''){
$a = get_app(); $a = get_app();

View File

@ -4,7 +4,7 @@
* @file include/network.php * @file include/network.php
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once("include/xml.php"); require_once("include/xml.php");
require_once('include/Probe.php'); require_once('include/Probe.php');

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once('include/queue_fn.php'); require_once('include/queue_fn.php');
require_once('include/html2plain.php'); require_once('include/html2plain.php');

View File

@ -4,8 +4,8 @@
* @file include/oembed.php * @file include/oembed.php
*/ */
use \Friendica\ParseUrl; use Friendica\ParseUrl;
use \Friendica\Core\Config; use Friendica\Core\Config;
function oembed_replacecb($matches){ function oembed_replacecb($matches){
$embedurl=$matches[1]; $embedurl=$matches[1];

View File

@ -4,7 +4,7 @@
* @file include/plaintext.php * @file include/plaintext.php
*/ */
use \Friendica\ParseUrl; use Friendica\ParseUrl;
require_once("include/Photo.php"); require_once("include/Photo.php");
require_once("include/bbcode.php"); require_once("include/bbcode.php");

View File

@ -1,4 +1,7 @@
<?php <?php
use Friendica\Core\Config;
if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) { if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
$directory = dirname($_SERVER["argv"][0]); $directory = dirname($_SERVER["argv"][0]);
@ -10,8 +13,6 @@ if (!file_exists("boot.php") AND (sizeof($_SERVER["argv"]) != 0)) {
chdir($directory); chdir($directory);
} }
use \Friendica\Core\Config;
require_once("boot.php"); require_once("boot.php");
function poller_run($argv, $argc){ function poller_run($argv, $argc){

View File

@ -1,5 +1,6 @@
<?php <?php
use \Friendica\Core\Config;
use Friendica\Core\Config;
require_once('include/items.php'); require_once('include/items.php');
require_once('include/ostatus.php'); require_once('include/ostatus.php');

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once("boot.php"); require_once("boot.php");
require_once("include/threads.php"); require_once("include/threads.php");

View File

@ -7,7 +7,7 @@
* @todo Detect if it is a forum * @todo Detect if it is a forum
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once('include/datetime.php'); require_once('include/datetime.php');
require_once("include/Scrape.php"); require_once("include/Scrape.php");

View File

@ -6,7 +6,6 @@ require_once("include/Smilies.php");
require_once("include/map.php"); require_once("include/map.php");
require_once("mod/proxy.php"); require_once("mod/proxy.php");
if(! function_exists('replace_macros')) { if(! function_exists('replace_macros')) {
/** /**
* This is our template processor * This is our template processor

View File

@ -1,11 +1,5 @@
<?php <?php
/**
* import account file exported from mod/uexport
* args:
* $a App Friendica App Class
* $file Array array from $_FILES
*/
require_once("include/Photo.php"); require_once("include/Photo.php");
define("IMPORT_DEBUG", False); define("IMPORT_DEBUG", False);
@ -75,6 +69,12 @@ function import_cleanup($newuid) {
q("DELETE FROM `pconfig` WHERE uid = %d", $newuid); q("DELETE FROM `pconfig` WHERE uid = %d", $newuid);
} }
/**
* @brief Import account file exported from mod/uexport
*
* @param App $a Friendica App Class
* @param array $file array from $_FILES
*/
function import_account(App $a, $file) { function import_account(App $a, $file) {
logger("Start user import from " . $file['tmp_name']); logger("Start user import from " . $file['tmp_name']);
/* /*
@ -255,10 +255,6 @@ function import_account(App $a, $file) {
} }
} }
foreach ($account['photo'] as &$photo) { foreach ($account['photo'] as &$photo) {
$photo['uid'] = $newuid; $photo['uid'] = $newuid;
$photo['data'] = hex2bin($photo['data']); $photo['data'] = hex2bin($photo['data']);

View File

@ -13,7 +13,7 @@
* *
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once('boot.php'); require_once('boot.php');
require_once('object/BaseObject.php'); require_once('object/BaseObject.php');

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once("mod/hostxrd.php"); require_once("mod/hostxrd.php");
require_once("mod/nodeinfo.php"); require_once("mod/nodeinfo.php");

View File

@ -6,7 +6,7 @@
* @brief Friendica admin * @brief Friendica admin
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once("include/enotify.php"); require_once("include/enotify.php");
require_once("include/text.php"); require_once("include/text.php");

View File

@ -1,8 +1,7 @@
<?php <?php
function amcd_content(App $a) { function amcd_content(App $a) {
//header("Content-type: text/json"); echo <<< JSON
echo <<< EOT
{ {
"version":1, "version":1,
"sessionstatus":{ "sessionstatus":{
@ -44,6 +43,6 @@ echo <<< EOT
} }
} }
} }
EOT; JSON;
killme(); killme();
} }

View File

@ -1,25 +1,24 @@
<?php <?php
function apps_content(App $a) { function apps_content(App $a) {
$privateaddons = get_config('config', 'private_addons'); $privateaddons = get_config('config', 'private_addons');
if ($privateaddons === "1") { if ($privateaddons === "1") {
if ((!(local_user()))) { if ((!(local_user()))) {
info(t("You must be logged in to use addons. ")); info(t("You must be logged in to use addons. "));
return;}; return;
};
} }
$title = t('Applications'); $title = t('Applications');
if(count($a->apps)==0) if (count($a->apps) == 0) {
notice(t('No installed applications.') . EOL); notice(t('No installed applications.') . EOL);
}
$tpl = get_markup_template("apps.tpl"); $tpl = get_markup_template("apps.tpl");
return replace_macros($tpl, array( return replace_macros($tpl, array(
'$title' => $title, '$title' => $title,
'$apps' => $a->apps, '$apps' => $a->apps,
)); ));
} }

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
function community_init(App $a) { function community_init(App $a) {
if (! local_user()) { if (! local_user()) {
@ -9,7 +9,6 @@ function community_init(App $a) {
} }
} }
function community_content(App $a, $update = 0) { function community_content(App $a, $update = 0) {
$o = ''; $o = '';

View File

@ -3,8 +3,6 @@
require_once('include/group.php'); require_once('include/group.php');
function contactgroup_content(App $a) { function contactgroup_content(App $a) {
if (! local_user()) { if (! local_user()) {
killme(); killme();
} }

View File

@ -1,10 +1,12 @@
<?php <?php
/** /**
* Show a credits page for all the developers who helped with the project * Show a credits page for all the developers who helped with the project
* (only contributors to the git repositories for friendica core and the * (only contributors to the git repositories for friendica core and the
* addons repository will be listed though ATM) * addons repository will be listed though ATM)
*/ */
function credits_content(App $a) { function credits_content(App $a) {
/* fill the page with credits */ /* fill the page with credits */
$f = fopen('util/credits.txt', 'r'); $f = fopen('util/credits.txt', 'r');

View File

@ -5,7 +5,6 @@ function delegate_init(App $a) {
return settings_init($a); return settings_init($a);
} }
function delegate_content(App $a) { function delegate_content(App $a) {
if (! local_user()) { if (! local_user()) {

View File

@ -3,10 +3,7 @@ require_once('include/items.php');
require_once('include/auth.php'); require_once('include/auth.php');
require_once('include/dfrn.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'] : ''); $dfrn_id = ((x($_GET,'dfrn_id')) ? $_GET['dfrn_id'] : '');
$type = ((x($_GET,'type')) ? $_GET['type'] : 'data'); $type = ((x($_GET,'type')) ? $_GET['type'] : 'data');
$last_update = ((x($_GET,'last_update')) ? $_GET['last_update'] : ''); $last_update = ((x($_GET,'last_update')) ? $_GET['last_update'] : '');

View File

@ -9,24 +9,18 @@ function directory_init(App $a) {
$a->page['aside'] .= findpeople_widget(); $a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget(); $a->page['aside'] .= follow_widget();
} }
else { else {
unset($_SESSION['theme']); unset($_SESSION['theme']);
unset($_SESSION['mobile-theme']); unset($_SESSION['mobile-theme']);
} }
} }
function directory_post(App $a) { function directory_post(App $a) {
if(x($_POST,'search')) if(x($_POST,'search'))
$a->data['search'] = $_POST['search']; $a->data['search'] = $_POST['search'];
} }
function directory_content(App $a) { function directory_content(App $a) {
global $db; global $db;

View File

@ -21,8 +21,6 @@ function dirfind_init(App $a) {
$a->page['aside'] .= follow_widget(); $a->page['aside'] .= follow_widget();
} }
function dirfind_content(App $a, $prefix = "") { function dirfind_content(App $a, $prefix = "") {
$community = false; $community = false;

View File

@ -106,7 +106,6 @@ function display_init(App $a) {
} }
profile_load($a, $nick, 0, $profiledata); profile_load($a, $nick, 0, $profiledata);
} }
function display_fetchauthor($a, $item) { function display_fetchauthor($a, $item) {

View File

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

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
function friendica_init(App $a) { function friendica_init(App $a) {
if ($a->argv[1] == "json"){ if ($a->argv[1] == "json"){

View File

@ -15,6 +15,7 @@ function hovercard_init(App $a) {
// Just for testing purposes // Just for testing purposes
$_GET["mode"] = "minimal"; $_GET["mode"] = "minimal";
} }
function hovercard_content() { function hovercard_content() {
$profileurl = (x($_REQUEST,'profileurl') ? $_REQUEST['profileurl'] : ""); $profileurl = (x($_REQUEST,'profileurl') ? $_REQUEST['profileurl'] : "");
$datatype = (x($_REQUEST,'datatype') ?$_REQUEST['datatype'] : "json"); $datatype = (x($_REQUEST,'datatype') ?$_REQUEST['datatype'] : "json");

View File

@ -1,9 +1,9 @@
<?php <?php
require_once "include/Photo.php"; require_once "include/Photo.php";
$install_wizard_pass = 1; $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 // $baseurl/install/testrwrite to test if rewite in .htaccess is working

View File

@ -1,13 +1,16 @@
<?php <?php
function login_content(App $a) { function login_content(App $a) {
if(x($_SESSION,'theme')) if (x($_SESSION, 'theme')) {
unset($_SESSION['theme']); unset($_SESSION['theme']);
if(x($_SESSION,'mobile-theme')) }
unset($_SESSION['mobile-theme']); if (x($_SESSION, 'mobile-theme')) {
unset($_SESSION['mobile-theme']);
if(local_user()) }
goaway(z_root());
return login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true); if (local_user()) {
goaway(z_root());
}
return login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
} }

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
function maintenance_content(App $a) { function maintenance_content(App $a) {

View File

@ -1,4 +1,5 @@
<?php <?php
use Friendica\Core\Config; use Friendica\Core\Config;
function manifest_content(App $a) { function manifest_content(App $a) {
@ -21,6 +22,4 @@
echo $o; echo $o;
killme(); killme();
} }
?>

View File

@ -1,5 +1,5 @@
<?php <?php
include_once('include/text.php'); require_once('include/text.php');
require_once('include/socgraph.php'); require_once('include/socgraph.php');
require_once('include/contact_widgets.php'); require_once('include/contact_widgets.php');
require_once('mod/proxy.php'); require_once('mod/proxy.php');

View File

@ -4,7 +4,6 @@ require_once('include/security.php');
require_once('include/bbcode.php'); require_once('include/bbcode.php');
require_once('include/items.php'); require_once('include/items.php');
function mood_init(App $a) { function mood_init(App $a) {
if (! local_user()) { if (! local_user()) {

View File

@ -1,67 +1,42 @@
<?php <?php
function newmember_content(App $a) { function newmember_content(App $a) {
$o = '<h1>' . t('Welcome to Friendica') . '</h1>'; $o = '<h1>' . t('Welcome to Friendica') . '</h1>';
$o .= '<h3>' . t('New Member Checklist') . '</h3>'; $o .= '<h3>' . t('New Member Checklist') . '</h3>';
$o .= '<div style="font-size: 120%;">'; $o .= '<div style="font-size: 120%;">';
$o .= t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.'); $o .= t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.');
$o .= '<h4>' . t('Getting Started') . '</h4>'; $o .= '<h4>' . t('Getting Started') . '</h4>';
$o .= '<ul>'; $o .= '<ul>';
$o .= '<li> ' . '<a target="newmember" href="help/guide">' . t('Friendica Walk-Through') . '</a><br />' . t('On your <em>Quick Start</em> page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '</li>' . EOL; $o .= '<li> ' . '<a target="newmember" href="help/guide">' . t('Friendica Walk-Through') . '</a><br />' . t('On your <em>Quick Start</em> page - find a brief introduction to your profile and network tabs, make some new connections, and find some groups to join.') . '</li>' . EOL;
$o .= '</ul>'; $o .= '</ul>';
$o .= '<h4>' . t('Settings') . '</h4>'; $o .= '<h4>' . t('Settings') . '</h4>';
$o .= '<ul>'; $o .= '<ul>';
$o .= '<li>' . '<a target="newmember" href="settings">' . t('Go to Your Settings') . '</a><br />' . t('On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="settings">' . t('Go to Your Settings') . '</a><br />' . t('On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This looks just like an email address - and will be useful in making friends on the free social web.') . '</li>' . EOL;
$o .= '<li>' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '</li>' . EOL; $o .= '<li>' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '</li>' . EOL;
$o .= '</ul>'; $o .= '</ul>';
$o .= '<h4>' . t('Profile') . '</h4>'; $o .= '<h4>' . t('Profile') . '</h4>';
$o .= '<ul>'; $o .= '<ul>';
$o .= '<li>' . '<a target="newmember" href="profile_photo">' . t('Upload Profile Photo') . '</a><br />' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="profile_photo">' . t('Upload Profile Photo') . '</a><br />' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '</li>' . EOL;
$o .= '<li>' . '<a target="newmember" href="profiles">' . t('Edit Your Profile') . '</a><br />' . t('Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="profiles">' . t('Edit Your Profile') . '</a><br />' . t('Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.') . '</li>' . EOL;
$o .= '<li>' . '<a target="newmember" href="profiles">' . t('Profile Keywords') . '</a><br />' . t('Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="profiles">' . t('Profile Keywords') . '</a><br />' . t('Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships.') . '</li>' . EOL;
$o .= '</ul>'; $o .= '</ul>';
$o .= '<h4>' . t('Connecting') . '</h4>'; $o .= '<h4>' . t('Connecting') . '</h4>';
$o .= '<ul>'; $o .= '<ul>';
$mail_disabled = ((function_exists('imap_open') && (!get_config('system', 'imap_disabled'))) ? 0 : 1); $mail_disabled = ((function_exists('imap_open') && (!get_config('system', 'imap_disabled'))) ? 0 : 1);
if(! $mail_disabled) if (!$mail_disabled) {
$o .= '<li>' . '<a target="newmember" href="settings/connectors">' . t('Importing Emails') . '</a><br />' . t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="settings/connectors">' . t('Importing Emails') . '</a><br />' . t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '</li>' . EOL;
}
$o .= '<li>' . '<a target="newmember" href="contacts">' . t('Go to Your Contacts Page') . '</a><br />' . t('Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Add New Contact</em> dialog.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="contacts">' . t('Go to Your Contacts Page') . '</a><br />' . t('Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Add New Contact</em> dialog.') . '</li>' . EOL;
$o .= '<li>' . '<a target="newmember" href="directory">' . t("Go to Your Site's Directory") . '</a><br />' . t('The Directory page lets you find other people in this network or other federated sites. Look for a <em>Connect</em> or <em>Follow</em> link on their profile page. Provide your own Identity Address if requested.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="directory">' . t("Go to Your Site's Directory") . '</a><br />' . t('The Directory page lets you find other people in this network or other federated sites. Look for a <em>Connect</em> or <em>Follow</em> link on their profile page. Provide your own Identity Address if requested.') . '</li>' . EOL;
$o .= '<li>' . '<a target="newmember" href="contacts">' . t('Finding New People') . '</a><br />' . t("On the side panel of the Contacts page are several tools to find new friends. We can match people by interest, look up people by name or interest, and provide suggestions based on network relationships. On a brand new site, friend suggestions will usually begin to be populated within 24 hours.") . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="contacts">' . t('Finding New People') . '</a><br />' . t("On the side panel of the Contacts page are several tools to find new friends. We can match people by interest, look up people by name or interest, and provide suggestions based on network relationships. On a brand new site, friend suggestions will usually begin to be populated within 24 hours.") . '</li>' . EOL;
$o .= '</ul>'; $o .= '</ul>';
$o .= '<h4>' . t('Groups') . '</h4>'; $o .= '<h4>' . t('Groups') . '</h4>';
$o .= '<ul>'; $o .= '<ul>';
$o .= '<li>' . '<a target="newmember" href="contacts">' . t('Group Your Contacts') . '</a><br />' . t('Once you have made some friends, organize them into private conversation groups from the sidebar of your Contacts page and then you can interact with each group privately on your Network page.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="contacts">' . t('Group Your Contacts') . '</a><br />' . t('Once you have made some friends, organize them into private conversation groups from the sidebar of your Contacts page and then you can interact with each group privately on your Network page.') . '</li>' . EOL;
if (get_config('system', 'newuser_private')) { if (get_config('system', 'newuser_private')) {
@ -69,15 +44,10 @@ function newmember_content(App $a) {
} }
$o .= '</ul>'; $o .= '</ul>';
$o .= '<h4>' . t('Getting Help') . '</h4>'; $o .= '<h4>' . t('Getting Help') . '</h4>';
$o .= '<ul>'; $o .= '<ul>';
$o .= '<li>' . '<a target="newmember" href="help">' . t('Go to the Help Section') . '</a><br />' . t('Our <strong>help</strong> pages may be consulted for detail on other program features and resources.') . '</li>' . EOL; $o .= '<li>' . '<a target="newmember" href="help">' . t('Go to the Help Section') . '</a><br />' . t('Our <strong>help</strong> pages may be consulted for detail on other program features and resources.') . '</li>' . EOL;
$o .= '</ul>'; $o .= '</ul>';
$o .= '</div>'; $o .= '</div>';
return $o; return $o;

View File

@ -5,7 +5,7 @@
* Documentation: http://nodeinfo.diaspora.software/schema.html * Documentation: http://nodeinfo.diaspora.software/schema.html
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once 'include/plugin.php'; require_once 'include/plugin.php';

View File

@ -1,11 +1,12 @@
<?php <?php
/* identi.ca -> friendica items permanent-url compatibility */ /* identi.ca -> friendica items permanent-url compatibility */
function notice_init(App $a) { function notice_init(App $a) {
$id = $a->argv[1]; $id = $a->argv[1];
$r = q("SELECT user.nickname FROM user LEFT JOIN item ON item.uid=user.uid WHERE item.id=%d", $r = q("SELECT `user`.`nickname` FROM `user` LEFT JOIN `item` ON `item`.`uid` = `user`.`uid` WHERE `item`.`id` = %d", intval($id));
intval($id)
);
if (dbm::is_result($r)) { if (dbm::is_result($r)) {
$nick = $r[0]['nickname']; $nick = $r[0]['nickname'];
$url = App::get_baseurl() . "/display/$nick/$id"; $url = App::get_baseurl() . "/display/$nick/$id";
@ -13,8 +14,7 @@
} else { } else {
$a->error = 404; $a->error = 404;
notice(t('Item not found.') . EOL); notice(t('Item not found.') . EOL);
} }
return; return;
} }

View File

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

View File

@ -1,4 +1,6 @@
<?php <?php
function opensearch_content(App $a) { function opensearch_content(App $a) {
$tpl = get_markup_template('opensearch.tpl'); $tpl = get_markup_template('opensearch.tpl');
@ -13,6 +15,4 @@
echo $o; echo $o;
killme(); killme();
} }
?>

View File

@ -10,7 +10,7 @@
* @see ParseUrl::getSiteinfo() for more information about scraping embeddable content * @see ParseUrl::getSiteinfo() for more information about scraping embeddable content
*/ */
use \Friendica\ParseUrl; use Friendica\ParseUrl;
require_once("include/items.php"); require_once("include/items.php");

View File

@ -1,4 +1,7 @@
<?php <?php
use Friendica\Core\Config;
require_once 'include/Photo.php'; require_once 'include/Photo.php';
require_once 'include/photos.php'; require_once 'include/photos.php';
require_once 'include/items.php'; require_once 'include/items.php';
@ -10,8 +13,6 @@ require_once 'include/tags.php';
require_once 'include/threads.php'; require_once 'include/threads.php';
require_once 'include/Probe.php'; require_once 'include/Probe.php';
use \Friendica\Core\Config;
function photos_init(App $a) { function photos_init(App $a) {
if ($a->argc > 1) { if ($a->argc > 1) {

View File

@ -1,5 +1,5 @@
<?php <?php
require_once("include/datetime.php"); require_once('include/datetime.php');
require_once('include/bbcode.php'); require_once('include/bbcode.php');
require_once('include/ForumManager.php'); require_once('include/ForumManager.php');
require_once('include/group.php'); require_once('include/group.php');

View File

@ -1,7 +1,6 @@
<?php /** @file */ <?php
/** /**
*
* Poke, prod, finger, or otherwise do unspeakable things to somebody - who must be a connection in your address book * Poke, prod, finger, or otherwise do unspeakable things to somebody - who must be a connection in your address book
* This function can be invoked with the required arguments (verb and cid and private and possibly parent) silently via ajax or * This function can be invoked with the required arguments (verb and cid and private and possibly parent) silently via ajax or
* other web request. You must be logged in and connected to a profile. * other web request. You must be logged in and connected to a profile.
@ -13,7 +12,7 @@
* private creates a private conversation with the recipient. Otherwise your profile's default post privacy is used. * private creates a private conversation with the recipient. Otherwise your profile's default post privacy is used.
* *
*/ */
* @file mod/poke.php
require_once('include/security.php'); require_once('include/security.php');
require_once('include/bbcode.php'); require_once('include/bbcode.php');
require_once('include/items.php'); require_once('include/items.php');

View File

@ -10,13 +10,13 @@ function pretheme_init(App $a) {
$desc = $info['description']; $desc = $info['description'];
$version = $info['version']; $version = $info['version'];
$credits = $info['credits']; $credits = $info['credits'];
} } else {
else {
$desc = ''; $desc = '';
$version = ''; $version = '';
$credits = ''; $credits = '';
} }
echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits)); echo json_encode(array('img' => get_theme_screenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits));
} }
killme(); killme();
} }

View File

@ -5,8 +5,7 @@ require_once('include/Scrape.php');
function probe_content(App $a) { function probe_content(App $a) {
if (!local_user()) { if (!local_user()) {
http_status_exit(403, http_status_exit(403, array("title" => t("Public access denied."),
array("title" => t("Public access denied."),
"description" => t("Only logged in users are permitted to perform a probing."))); "description" => t("Only logged in users are permitted to perform a probing.")));
killme(); killme();
} }
@ -20,12 +19,12 @@ function probe_content(App $a) {
$o .= '<br /><br />'; $o .= '<br /><br />';
if (x($_GET, 'addr')) { if (x($_GET, 'addr')) {
$addr = trim($_GET['addr']); $addr = trim($_GET['addr']);
$res = probe_url($addr); $res = probe_url($addr);
$o .= '<pre>'; $o .= '<pre>';
$o .= str_replace("\n", '<br />', print_r($res, true)); $o .= str_replace("\n", '<br />', print_r($res, true));
$o .= '</pre>'; $o .= '</pre>';
} }
return $o; return $o;
} }

View File

@ -3,7 +3,6 @@
require_once('include/contact_widgets.php'); require_once('include/contact_widgets.php');
require_once('include/redir.php'); require_once('include/redir.php');
function profile_init(App $a) { function profile_init(App $a) {
if(! x($a->page,'aside')) if(! x($a->page,'aside'))

View File

@ -9,10 +9,8 @@ function profile_photo_init(App $a) {
} }
profile_load($a,$a->user['nickname']); profile_load($a,$a->user['nickname']);
} }
function profile_photo_post(App $a) { function profile_photo_post(App $a) {
if (! local_user()) { if (! local_user()) {

View File

@ -48,4 +48,3 @@ function qsearch_init(App $a) {
echo json_encode((object) $results); echo json_encode((object) $results);
killme(); killme();
} }

View File

@ -9,10 +9,8 @@ require_once('include/salmon.php');
require_once('include/crypto.php'); require_once('include/crypto.php');
require_once('include/diaspora.php'); require_once('include/diaspora.php');
function receive_post(App $a) { function receive_post(App $a) {
$enabled = intval(get_config('system','diaspora_enabled')); $enabled = intval(get_config('system','diaspora_enabled'));
if(! $enabled) { if(! $enabled) {
logger('mod-diaspora: disabled'); logger('mod-diaspora: disabled');

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* @file mod/robots_text.php * @file mod/robots_text.php
* @brief Module which returns the default robots.txt * @brief Module which returns the default robots.txt
@ -13,7 +14,6 @@
*/ */
function robots_txt_init(App $a) function robots_txt_init(App $a)
{ {
$allDisalloweds = array( $allDisalloweds = array(
'/settings/', '/settings/',
'/admin/', '/admin/',

View File

@ -1,8 +1,8 @@
<?php <?php
function rsd_xml_content(App $a)
function rsd_xml_content(App $a) { {
header ("Content-Type: text/xml"); header ("Content-Type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?> echo '<?xml version="1.0" encoding="UTF-8"?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd"> <rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
@ -18,7 +18,7 @@ function rsd_xml_content(App $a) {
</api> </api>
</apis> </apis>
</service> </service>
</rsd> </rsd>';
';
die(); killme();
} }

View File

@ -14,8 +14,7 @@ function smilies_content(App $a) {
$results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]); $results[] = array('text' => $tmp['texts'][$i], 'icon' => $tmp['icons'][$i]);
} }
json_return_and_die($results); json_return_and_die($results);
} } else {
else {
return Smilies::replace('', true); return Smilies::replace('', true);
} }
} }

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* @file mod/statistics_json.php * @file mod/statistics_json.php
*/ */

View File

@ -4,7 +4,6 @@ require_once('include/security.php');
require_once('include/bbcode.php'); require_once('include/bbcode.php');
require_once('include/items.php'); require_once('include/items.php');
function subthread_content(App $a) { function subthread_content(App $a) {
if(! local_user() && ! remote_user()) { if(! local_user() && ! remote_user()) {

View File

@ -4,7 +4,6 @@ require_once('include/security.php');
require_once('include/bbcode.php'); require_once('include/bbcode.php');
require_once('include/items.php'); require_once('include/items.php');
function tagger_content(App $a) { function tagger_content(App $a) {
if(! local_user() && ! remote_user()) { if(! local_user() && ! remote_user()) {

View File

@ -16,4 +16,3 @@ function toggle_mobile_init(App $a) {
goaway($address); goaway($address);
} }

View File

@ -75,7 +75,6 @@ function _uexport_row($query) {
return $result; return $result;
} }
function uexport_account($a) { function uexport_account($a) {
$user = _uexport_row( $user = _uexport_row(

View File

@ -1,7 +1,7 @@
<?php <?php
/** /**
* View for user import * View for user import
* @TODO This file has DOS line endings!
*/ */
require_once("include/uimport.php"); require_once("include/uimport.php");

View File

@ -5,7 +5,6 @@ require_once('include/bbcode.php');
require_once('include/security.php'); require_once('include/security.php');
require_once('include/redir.php'); require_once('include/redir.php');
function videos_init(App $a) { function videos_init(App $a) {
if($a->argc > 1) if($a->argc > 1)

View File

@ -9,11 +9,10 @@
* to the url * to the url
*/ */
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once 'include/Photo.php'; require_once 'include/Photo.php';
function wall_upload_post(App $a, $desktopmode = true) { function wall_upload_post(App $a, $desktopmode = true) {
logger("wall upload: starting new upload", LOGGER_DEBUG); logger("wall upload: starting new upload", LOGGER_DEBUG);

View File

@ -1,6 +1,6 @@
<?php <?php
use \Friendica\Core\Config; use Friendica\Core\Config;
require_once("boot.php"); require_once("boot.php");

View File

@ -7,8 +7,8 @@
* Output to <path/to/messages.po> * Output to <path/to/messages.po>
*/ */
DEFINE("NORM_REGEXP", "|[\\\]|");
DEFINE("NORM_REGEXP", "|[\\\]|");
if(! class_exists('App')) { if(! class_exists('App')) {
class TmpA { class TmpA {
@ -201,4 +201,3 @@
} else { } else {
print $warnings; print $warnings;
} }

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Theme settings * Theme settings
*/ */

View File

@ -3,7 +3,7 @@
/** /**
* @file view/theme/frio/php/frio_boot.php * @file view/theme/frio/php/frio_boot.php
* *
* @brief This file contains functions for page contstruction * @brief This file contains functions for page construction
* *
*/ */

View File

@ -1,4 +1,5 @@
<?php <?php
/** /**
* Theme settings * Theme settings
*/ */

View File

@ -105,7 +105,6 @@ EOT;
} }
_js_in_foot(); _js_in_foot();
} }
if (! function_exists('_js_in_foot')) { if (! function_exists('_js_in_foot')) {