1
1
Fork 0

Merge remote-tracking branch 'upstream/develop' into 1602-diaspora

This commit is contained in:
Michael Vogel 2016-03-02 11:59:13 +01:00
commit 1f7f964bb7
14 changed files with 31 additions and 25 deletions

View file

@ -465,11 +465,12 @@ class App {
public $plugins;
public $apps = array();
public $identities;
public $is_mobile;
public $is_tablet;
public $is_mobile = false;
public $is_tablet = false;
public $is_friendica_app;
public $performance = array();
public $callstack = array();
public $theme_info = array();
public $nav_sel;
@ -1046,11 +1047,21 @@ class App {
function save_timestamp($stamp, $value) {
$duration = (float)(microtime(true)-$stamp);
if (!isset($this->performance[$value])) {
// Prevent ugly E_NOTICE
$this->performance[$value] = 0;
}
$this->performance[$value] += (float)$duration;
$this->performance["marktime"] += (float)$duration;
$callstack = $this->callstack();
if (!isset($this->callstack[$value][$callstack])) {
// Prevent ugly E_NOTICE
$this->callstack[$value][$callstack] = 0;
}
$this->callstack[$value][$callstack] += (float)$duration;
}

View file

@ -1691,13 +1691,13 @@
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item`, `contact`
FROM `item` FORCE INDEX (`uid_id`), `contact`
WHERE `item`.`uid` = %d AND `verb` = '%s'
AND NOT (`item`.`author-link` IN ('https://%s', 'http://%s'))
AND `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
AND `item`.`visible` AND NOT `item`.`moderated` AND NOT `item`.`deleted`
AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`parent` IN (SELECT `iid` from thread where uid = %d AND `mention` AND !`ignored`)
AND NOT `contact`.`blocked` AND NOT `contact`.`pending`
AND `item`.`parent` IN (SELECT `iid` FROM `thread` WHERE `uid` = %d AND `mention` AND !`ignored`)
$sql_extra
AND `item`.`id`>%d
ORDER BY `item`.`id` DESC LIMIT %d ,%d ",

View file

@ -237,6 +237,7 @@ function profile_sidebar($profile, $block = 0) {
if ($connect AND ($profile['network'] != NETWORK_DFRN) AND !isset($profile['remoteconnect']))
$connect = false;
$remoteconnect = NULL;
if (isset($profile['remoteconnect']))
$remoteconnect = $profile['remoteconnect'];
@ -292,9 +293,9 @@ function profile_sidebar($profile, $block = 0) {
// check if profile is a forum
if((intval($profile['page-flags']) == PAGE_COMMUNITY)
|| (intval($profile['page-flags']) == PAGE_PRVGROUP)
|| (intval($profile['forum']))
|| (intval($profile['prv']))
|| (intval($profile['community'])))
|| (isset($profile['forum']) && intval($profile['forum']))
|| (isset($profile['prv']) && intval($profile['prv']))
|| (isset($profile['community']) && intval($profile['community'])))
$account_type = t('Forum');
else
$account_type = "";

View file

@ -72,7 +72,8 @@ if(!$install) {
(intval(get_config('system','ssl_policy')) == SSL_POLICY_FULL) AND
(substr($a->get_baseurl(), 0, 8) == "https://")) {
header("HTTP/1.1 302 Moved Temporarily");
header("location: ".$a->get_baseurl()."/".$a->query_string);
header("Location: ".$a->get_baseurl()."/".$a->query_string);
exit();
}
require_once("include/session.php");

View file

@ -283,14 +283,14 @@ function admin_page_federation(&$a) {
// get a total count for the platform, the name and version of the
// highest version and the protocol tpe
$c = q('SELECT count(*) AS total, platform, network, version FROM gserver
WHERE platform LIKE "%s" AND last_contact > last_failure
WHERE platform LIKE "%s" AND last_contact > last_failure AND `version` != ""
ORDER BY version ASC;', $p);
$total = $total + $c[0]['total'];
// what versions for that platform do we know at all?
// again only the active nodes
$v = q('SELECT count(*) AS total, version FROM gserver
WHERE last_contact > last_failure AND platform LIKE "%s"
WHERE last_contact > last_failure AND platform LIKE "%s" AND `version` != ""
GROUP BY version
ORDER BY version;', $p);
@ -344,6 +344,9 @@ function admin_page_federation(&$a) {
$v = $newVv;
}
foreach ($v as $key => $vv)
$v[$key]["version"] = trim(strip_tags($vv["version"]));
// the 3rd array item is needed for the JavaScript graphs as JS does
// not like some characters in the names of variables...
$counts[$p]=array($c[0], $v, str_replace(array(' ','%'),'',$p), $colors[$p]);

View file

@ -18,13 +18,13 @@
{{/if}}
{{if $request}}
<form action="{{$request}}" method="post" />
<form action="{{$request}}" method="post">
{{else}}
<form action="dfrn_request/{{$nickname}}" method="post" />
<form action="dfrn_request/{{$nickname}}" method="post">
{{/if}}
{{if $photo}}
<img src="{{$photo}}" alt="" id="dfrn-request-photo">
<img src="{{$photo}}" alt="" id="dfrn-request-photo" />
{{/if}}
{{if $url}}<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$zrl}}">{{$url}}</a></dd></dl>{{/if}}

View file

@ -10,7 +10,6 @@
*/
function decaf_mobile_init(&$a) {
$a->theme_info = array();
$a->sourcename = 'Friendica mobile web';
$a->videowidth = 250;
$a->videoheight = 200;

View file

@ -2,7 +2,6 @@
function duepuntozero_init(&$a) {
$a->theme_info = array();
set_template_engine($a, 'smarty3');
$colorset = get_pconfig( local_user(), 'duepuntozero','colorset');

View file

@ -1,7 +1,6 @@
<?php
function facepark_init(&$a) {
$a->theme_info = array();
set_template_engine($a, 'smarty3');
$a->page['htmlhead'] .= <<< EOT

View file

@ -10,7 +10,6 @@
*/
function frost_mobile_init(&$a) {
$a->theme_info = array();
$a->sourcename = 'Friendica mobile web';
$a->videowidth = 250;
$a->videoheight = 200;

View file

@ -10,7 +10,6 @@
*/
function frost_init(&$a) {
$a->theme_info = array();
$a->videowidth = 400;
$a->videoheight = 330;
$a->theme_thread_allow = false;

View file

@ -8,8 +8,6 @@
*/
function quattro_init(&$a) {
$a->theme_info = array();
$a->page['htmlhead'] .= '<script src="'.$a->get_baseurl().'/view/theme/quattro/tinycon.min.js"></script>';
$a->page['htmlhead'] .= '<script src="'.$a->get_baseurl().'/view/theme/quattro/js/quattro.js"></script>';;
}

View file

@ -11,7 +11,6 @@
*/
function smoothly_init(&$a) {
$a->theme_info = array();
set_template_engine($a, 'smarty3');
$cssFile = null;

View file

@ -19,8 +19,6 @@ function vier_init(&$a) {
set_template_engine($a, 'smarty3');
$a->theme_info = array();
if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
vier_community_info();