diff --git a/boot.php b/boot.php index 1d8a9e7f7..ed4fe10a3 100644 --- a/boot.php +++ b/boot.php @@ -38,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_CODENAME', 'Asparagus'); define ( 'FRIENDICA_VERSION', '3.5.2-dev' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1216 ); +define ( 'DB_UPDATE_VERSION', 1217 ); /** * @brief Constant with a HTML line break. @@ -382,6 +382,7 @@ define ( 'ACTIVITY_UPDATE', NAMESPACE_ACTIVITY_SCHEMA . 'update' ); define ( 'ACTIVITY_TAG', NAMESPACE_ACTIVITY_SCHEMA . 'tag' ); define ( 'ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite' ); define ( 'ACTIVITY_SHARE', NAMESPACE_ACTIVITY_SCHEMA . 'share' ); +define ( 'ACTIVITY_DELETE', NAMESPACE_ACTIVITY_SCHEMA . 'delete' ); define ( 'ACTIVITY_POKE', NAMESPACE_ZOT . '/activity/poke' ); define ( 'ACTIVITY_MOOD', NAMESPACE_ZOT . '/activity/mood' ); diff --git a/database.sql b/database.sql index e16971f88..24b7543fe 100644 --- a/database.sql +++ b/database.sql @@ -159,7 +159,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( `writable` tinyint(1) NOT NULL DEFAULT 0, `forum` tinyint(1) NOT NULL DEFAULT 0, `prv` tinyint(1) NOT NULL DEFAULT 0, - `contact-type` int(11) unsigned NOT NULL DEFAULT 0, + `contact-type` int(11) NOT NULL DEFAULT 0, `hidden` tinyint(1) NOT NULL DEFAULT 0, `archive` tinyint(1) NOT NULL DEFAULT 0, `pending` tinyint(1) NOT NULL DEFAULT 1, diff --git a/doc/KeyboardShortcuts.md b/doc/KeyboardShortcuts.md new file mode 100644 index 000000000..cf783b0da --- /dev/null +++ b/doc/KeyboardShortcuts.md @@ -0,0 +1,10 @@ +Keyboard shortcuts in Friendica +======================= + +* [Home](help) + +General +------- + +* j: Scroll to next thread +* k: Scroll to previous thread diff --git a/doc/Settings.md b/doc/Settings.md index 5055ed7d2..365256272 100644 --- a/doc/Settings.md +++ b/doc/Settings.md @@ -6,12 +6,10 @@ If you are the admin of a Friendica node, you have access to the so called **Adm On the front page of the admin panel you will see a summary of information about your node. These information include the amount of messages currently being processed in the queues. -The first number is the number of messages being actively sent. -This number should decrease quickly. -The second is the messages which could for various reasons not being delivered. +The first number is the number of messages which could not been delivered for various reasons. They will be resend later. You can have a quick glance into that second queus in the "Inspect Queue" section of the admin panel. -If you have activated the background workers, there is a third number representing the count of jobs queued for the workers. +The second number represents the current number of jobs for the background workers. These worker tasks are prioritised and are done accordingly. Then you get an overview of the accounts on your node, which can be moderated in the "Users" section of the panel. diff --git a/doc/database.md b/doc/database.md index f48404c17..4c6150520 100644 --- a/doc/database.md +++ b/doc/database.md @@ -14,7 +14,6 @@ Database Tables | [config](help/database/db_config) | main configuration storage | | [contact](help/database/db_contact) | contact table | | [conv](help/database/db_conv) | private messages | -| [deliverq](help/database/db_deliverq) | | | [event](help/database/db_event) | Events | | [fcontact](help/database/db_fcontact) | friend suggestion stuff | | [ffinder](help/database/db_ffinder) | friend suggestion stuff | diff --git a/doc/database/db_deliverq.md b/doc/database/db_deliverq.md deleted file mode 100644 index 533589957..000000000 --- a/doc/database/db_deliverq.md +++ /dev/null @@ -1,12 +0,0 @@ -Table deliverq -============== - -| Field | Description | Type | Null | Key | Default | Extra | -|---------|------------------|------------------|------|-----|---------|----------------| -| id | sequential ID | int(10) unsigned | NO | PRI | NULL | auto_increment | -| cmd | | varchar(32) | NO | | | | -| item | | int(11) | NO | | 0 | | -| contact | | int(11) | NO | | 0 | | - - -Return to [database documentation](help/database) diff --git a/doc/de/Settings.md b/doc/de/Settings.md index 2b7e89a52..68e17adc7 100644 --- a/doc/de/Settings.md +++ b/doc/de/Settings.md @@ -5,17 +5,14 @@ Wenn du der Administrator einer Friendica Instanz bist, hast du Zugriff auf das so genannte **Admin Panel** in dem du die Friendica Instanz konfigurieren kannst, Auf der Startseite des Admin Panels werden die Informationen zu der Instanz zusammengefasst. -Diese Informationen beinhalten die Anzahl der Nachrichten, die sich aktuell in den Warteschlangen befinden. -Hierbei ist die erste Zahl die Zahl der Nachrichten die gerade aktiv verteilt werden. -Diese Zahl sollte sich relativ schnell sinken. -Die zweite Zahl gibt die Anzahl von Nachrichten an, die nicht zugestellt werden konnten. +Die erste Zahl gibt die Anzahl von Nachrichten an, die nicht zugestellt werden konnten. Die Zustellung wird zu einem späteren Zeitpunkt noch einmal versucht. Unter dem Punkt "Warteschlange Inspizieren" kannst du einen schnellen Blick auf die zweite Warteschlange werfen. -Solltest du für die Hintergrundprozesse die Worker aktiviert haben, wird eine dritte Zahl angezeigt. -Diese repräsentiert die Anzahl der Aufgaben, die die Worker noch vor sich haben. +Die zweite Zahl steht für die Anzahl der Aufgaben, die die Worker noch vor sich haben. +Die Worker arbeiten Hintergrundprozesse ab. Die Aufgaben der Worker sind priorisiert und werden anhand dieser Prioritäten abgearbeitet. -Des weiteren findest du eine Übersicht über die Accounts auf dem Friendica Knoten, die unter dem Punkt "Nutzer" moderiert werden können. +Desweiteren findest du eine Übersicht über die Accounts auf dem Friendica Knoten, die unter dem Punkt "Nutzer" moderiert werden können. Sowie eine Liste der derzeit aktivierten Addons. Diese Liste ist verlinkt, so dass du schnellen Zugriff auf die Informationsseiten der einzelnen Addons hast. Abschließend findest du auf der Startseite des Admin Panels die installierte Version von Friendica. diff --git a/include/Probe.php b/include/Probe.php index c2136eec8..f67a821f9 100644 --- a/include/Probe.php +++ b/include/Probe.php @@ -364,9 +364,9 @@ class Probe { return self::mail($uri, $uid); } - if ($network == NETWORK_MAIL) + if ($network == NETWORK_MAIL) { return self::mail($uri, $uid); - + } // Remove "acct:" from the URI $uri = str_replace('acct:', '', $uri); @@ -391,37 +391,37 @@ class Probe { /// @todo Do we need the prefix "acct:" or "acct://"? foreach ($lrdd AS $key => $link) { - if ($webfinger) + if ($webfinger) { continue; + } + if (!in_array($key, array("lrdd", "lrdd-xml", "lrdd-json"))) { + continue; + } + // At first try it with the given uri + $path = str_replace('{uri}', urlencode($uri), $link); + $webfinger = self::webfinger($path); - if (!in_array($key, array("lrdd", "lrdd-xml", "lrdd-json"))) - continue; + // We cannot be sure that the detected address was correct, so we don't use the values + if ($webfinger AND ($uri != $addr)) { + $nick = ""; + $addr = ""; + } // Try webfinger with the address (user@domain.tld) - $path = str_replace('{uri}', urlencode($addr), $link); - $webfinger = self::webfinger($path); + if (!$webfinger) { + $path = str_replace('{uri}', urlencode($addr), $link); + $webfinger = self::webfinger($path); + } // Mastodon needs to have it with "acct:" if (!$webfinger) { $path = str_replace('{uri}', urlencode("acct:".$addr), $link); $webfinger = self::webfinger($path); } - - // If webfinger wasn't successful then try it with the URL - possibly in the format https://... - if (!$webfinger AND ($uri != $addr)) { - $path = str_replace('{uri}', urlencode($uri), $link); - $webfinger = self::webfinger($path); - - // Since the detection with the address wasn't successful, we delete it. - if ($webfinger) { - $nick = ""; - $addr = ""; - } - } - } - if (!$webfinger) + if (!$webfinger) { return self::feed($uri); + } $result = false; diff --git a/include/acl_selectors.php b/include/acl_selectors.php index f4b644d68..9c3eab58b 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -610,12 +610,18 @@ function acl_lookup(App $a, $out_type = 'json') { $items = array_merge($groups, $contacts); if ($conv_id) { - /* if $conv_id is set, get unknow contacts in thread */ - /* but first get know contacts url to filter them out */ - function _contact_link($i){ return dbesc($i['link']); } - $known_contacts = array_map(_contact_link, $contacts); - $unknow_contacts=array(); - $r = q("SELECT `author-avatar`,`author-name`,`author-link` + /* + * if $conv_id is set, get unknown contacts in thread + * but first get known contacts url to filter them out + */ + $known_contacts = array_map( + function ($i) { + return dbesc($i['link']); + } + , $contacts); + + $unknown_contacts = array(); + $r = q("SELECT `author-link` FROM `item` WHERE `parent` = %d AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%') AND `author-link` NOT IN ('%s') @@ -625,31 +631,29 @@ function acl_lookup(App $a, $out_type = 'json') { intval($conv_id), dbesc($search), dbesc($search), - implode("','", $known_contacts) + implode("', '", $known_contacts) ); - if (dbm::is_result($r)){ + if (dbm::is_result($r)) { foreach ($r as $row) { - // nickname.. - $up = parse_url($row['author-link']); - $nick = explode("/",$up['path']); - $nick = $nick[count($nick)-1]; - $nick .= "@".$up['host']; - // /nickname - $unknow_contacts[] = array( - 'type' => 'c', - 'photo' => proxy_url($row['author-avatar'], false, PROXY_SIZE_MICRO), - 'name' => htmlentities($row['author-name']), - 'id' => '', - 'network' => 'unknown', - 'link' => $row['author-link'], - 'nick' => htmlentities($nick), - 'forum' => false - ); + $contact = get_contact_details_by_url($row['author-link']); + + if (count($contact) > 0) { + $unknown_contacts[] = array( + 'type' => 'c', + 'photo' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO), + 'name' => htmlentities($contact['name']), + 'id' => intval($contact['cid']), + 'network' => $contact['network'], + 'link' => $contact['url'], + 'nick' => htmlentities($contact['nick'] ? : $contact['addr']), + 'forum' => $contact['forum'] + ); + } } } - $items = array_merge($items, $unknow_contacts); - $tot += count($unknow_contacts); + $items = array_merge($items, $unknown_contacts); + $tot += count($unknown_contacts); } $results = array( diff --git a/include/dbstructure.php b/include/dbstructure.php index c58c8c5df..373d6ddb0 100644 --- a/include/dbstructure.php +++ b/include/dbstructure.php @@ -698,7 +698,7 @@ function db_definition() { "writable" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), "forum" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), "prv" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), - "contact-type" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"), + "contact-type" => array("type" => "int(11)", "not null" => "1", "default" => "0"), "hidden" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), "archive" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"), "pending" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"), diff --git a/include/ostatus.php b/include/ostatus.php index 9b7849509..e0b33a1a4 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -355,6 +355,14 @@ class ostatus { $item["body"] = add_page_info_to_body(html2bbcode($xpath->query('atom:content/text()', $entry)->item(0)->nodeValue)); $item["object-type"] = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue; + $item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue; + + // Mastodon Content Warning + if (($item["verb"] == ACTIVITY_POST) AND $xpath->evaluate('boolean(atom:summary)', $entry)) { + $clear_text = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue; + + $item["body"] = html2bbcode($clear_text) . '[spoiler]' . $item["body"] . '[/spoiler]'; + } if (($item["object-type"] == ACTIVITY_OBJ_BOOKMARK) OR ($item["object-type"] == ACTIVITY_OBJ_EVENT)) { $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue; @@ -363,11 +371,10 @@ class ostatus { $item["title"] = $xpath->query('atom:title/text()', $entry)->item(0)->nodeValue; } $item["object"] = $xml; - $item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue; /// @TODO /// Delete a message - if ($item["verb"] == "qvitter-delete-notice") { + if ($item["verb"] == "qvitter-delete-notice" || $item["verb"] == ACTIVITY_DELETE) { // ignore "Delete" messages (by now) logger("Ignore delete message ".print_r($item, true)); continue; @@ -2052,7 +2059,7 @@ class ostatus { $mentioned = array(); - if (($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || (($item['thr-parent'] !== '') && ($item['thr-parent'] !== $item['uri']))) { + if (($item['parent'] != $item['id']) OR ($item['parent-uri'] !== $item['uri']) OR (($item['thr-parent'] !== '') AND ($item['thr-parent'] !== $item['uri']))) { $parent = q("SELECT `guid`, `author-link`, `owner-link` FROM `item` WHERE `id` = %d", intval($item["parent"])); $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); diff --git a/include/photos.php b/include/photos.php index 9d8d3309c..376be05c8 100644 --- a/include/photos.php +++ b/include/photos.php @@ -59,9 +59,8 @@ function photo_albums($uid, $update = false) { } else { // This query doesn't do the count and is much faster $albums = qu("SELECT DISTINCT(`album`), '' AS `total` - FROM `photo` - WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra - GROUP BY `album` ORDER BY `created` DESC", + FROM `photo` USE INDEX (`uid_album_scale_created`) + WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra", intval($uid), dbesc('Contact Photos'), dbesc(t('Contact Photos')) diff --git a/include/socgraph.php b/include/socgraph.php index 642d03d89..66533e151 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -2096,7 +2096,7 @@ function update_gcontact($contact) { fix_alternate_contact_address($contact); if (!isset($contact["updated"])) - $contact["updated"] = datetime_convert(); + $contact["updated"] = dbm::date(); if ($contact["server_url"] == "") { $server_url = $contact["url"]; @@ -2151,7 +2151,7 @@ function update_gcontact($contact) { dbesc($contact["gender"]), dbesc($contact["keywords"]), intval($contact["hide"]), intval($contact["nsfw"]), intval($contact["contact-type"]), dbesc($contact["alias"]), dbesc($contact["notify"]), dbesc($contact["url"]), dbesc($contact["location"]), - dbesc($contact["about"]), intval($contact["generation"]), dbesc($contact["updated"]), + dbesc($contact["about"]), intval($contact["generation"]), dbesc(dbm::date($contact["updated"])), dbesc($contact["server_url"]), dbesc($contact["connect"]), dbesc(normalise_link($contact["url"])), intval($contact["generation"])); diff --git a/js/main.js b/js/main.js index aaeef00cf..c85aab4a2 100644 --- a/js/main.js +++ b/js/main.js @@ -223,8 +223,11 @@ var nnm = $("#nav-notifications-menu"); nnm.html(notifications_all + notifications_mark); - var notification_lastitem = parseInt(localStorage.getItem("notification-lastitem")); + var lastItemStorageKey = "notification-lastitem:" + localUser; + var notification_lastitem = parseInt(localStorage.getItem(lastItemStorageKey)); var notification_id = 0; + + // Insert notifs into the notifications-menu $(data.notifications).each(function(key, notif){ var text = notif.message.format('' + notif.name + ''); var contact = ('' + notif.name + ''); @@ -232,19 +235,21 @@ var html = notifications_tpl.format( notif.href, // {0} // link to the source notif.photo, // {1} // photo of the contact - text, // {2} // preformatted text (autor + text) + text, // {2} // preformatted text (autor + text) notif.date, // {3} // date of notification (time ago) - seenclass, // {4} // visited status of the notification + seenclass, // {4} // visited status of the notification new Date(notif.timestamp*1000), // {5} // date of notification notif.url, // {6} // profile url of the contact notif.message.format(contact), // {7} // preformatted html (text including author profile url) - '' // {8} // Deprecated + '' // {8} // Deprecated ); nnm.append(html); }); + + // Desktop Notifications $(data.notifications.reverse()).each(function(key, e){ notification_id = parseInt(e.timestamp); - if (notification_lastitem !== null && notification_id > notification_lastitem) { + if (notification_lastitem !== null && notification_id > notification_lastitem && Number(e.seen) === 0) { if (getNotificationPermission() === "granted") { var notification = new Notification(document.title, { body: decodeHtml(e.message.replace('→ ', '').format(e.name)), @@ -259,7 +264,7 @@ }); notification_lastitem = notification_id; - localStorage.setItem("notification-lastitem", notification_lastitem) + localStorage.setItem(lastItemStorageKey, notification_lastitem) $("img[data-src]", nnm).each(function(i, el){ // Add src attribute for images with a data-src attribute @@ -285,7 +290,7 @@ $.jGrowl(message, {sticky: false, theme: 'info', life: 5000}); }); - /* update the js scrollbars */ + // Update the js scrollbars $('#nav-notifications-menu').perfectScrollbar('update'); }); @@ -317,6 +322,30 @@ } }); + // Scroll to the next/previous thread when pressing J and K + $(document).keydown(function (event) { + var threads = $('.thread_level_1'); + if ((event.keyCode === 74 || event.keyCode === 75) && !$(event.target).is('textarea, input')) { + var scrollTop = $(window).scrollTop(); + if (event.keyCode === 75) { + threads = $(threads.get().reverse()); + } + threads.each(function(key, item) { + var comparison; + var top = $(item).offset().top - 100; + if (event.keyCode === 74) { + comparison = top > scrollTop + 1; + } else if (event.keyCode === 75) { + comparison = top < scrollTop - 1; + } + if (comparison) { + $('html, body').animate({ scrollTop: top }, 200); + return false; + } + }); + } + }); + // Set an event listener for infinite scroll if(typeof infinite_scroll !== 'undefined') { $(window).scroll(function(e){ diff --git a/mod/acl.php b/mod/acl.php index 04aa9f50a..9220bc77a 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -1,7 +1,7 @@ t('Message queues'), 'deliverq' => $deliverq, 'queue' => $queue, 'workerq' => $workerqueue); + $queues = array('label' => t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue); $t = get_markup_template("admin_summary.tpl"); @@ -971,7 +968,7 @@ function admin_page_site(App $a) { '$banner' => array('banner', t("Banner/Logo"), $banner, ""), '$shortcut_icon' => array('shortcut_icon', t("Shortcut icon"), get_config('system','shortcut_icon'), t("Link to an icon that will be used for browsers.")), '$touch_icon' => array('touch_icon', t("Touch icon"), get_config('system','touch_icon'), t("Link to an icon that will be used for tablets and mobiles.")), - '$info' => array('info',t('Additional Info'), $info, sprintf(t('For public servers: you can add additional information here that will be listed at %s/siteinfo.'), get_server())), + '$info' => array('info', t('Additional Info'), $info, sprintf(t('For public servers: you can add additional information here that will be listed at %s/siteinfo.'), get_server())), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - change theme settings"), $theme_choices), '$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile-theme'), t("Theme for mobile devices"), $theme_choices_mobile), @@ -2058,8 +2055,8 @@ function admin_page_features(App $a) { $set = $f[3]; } $arr[$fname][1][] = array( - array('feature_' .$f[0],$f[1],$set,$f[2],array(t('Off'),t('On'))), - array('featurelock_' .$f[0],sprintf(t('Lock feature %s'),$f[1]),(($f[4] !== false) ? "1" : ''),'',array(t('Off'),t('On'))) + array('feature_' .$f[0],$f[1],$set,$f[2],array(t('Off'), t('On'))), + array('featurelock_' .$f[0],sprintf(t('Lock feature %s'),$f[1]),(($f[4] !== false) ? "1" : ''),'',array(t('Off'), t('On'))) ); } } diff --git a/mod/cal.php b/mod/cal.php index f43a4e8a7..7398426bc 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -269,8 +269,8 @@ function cal_content(App $a) { '$tabs' => $tabs, '$title' => t('Events'), '$view' => t('View'), - '$previous' => array(App::get_baseurl()."/events/$prevyear/$prevmonth",t('Previous'),'',''), - '$next' => array(App::get_baseurl()."/events/$nextyear/$nextmonth",t('Next'),'',''), + '$previous' => array(App::get_baseurl()."/events/$prevyear/$prevmonth", t('Previous'),'',''), + '$next' => array(App::get_baseurl()."/events/$nextyear/$nextmonth", t('Next'),'',''), '$calendar' => cal($y,$m,$links, ' eventcal'), '$events' => $events, diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 52b5eb9f9..f3875ed8e 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -872,7 +872,7 @@ function dfrn_request_content(App $a) { '$header' => t('Friend/Connection Request'), '$desc' => t('Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca'), '$pls_answer' => t('Please answer the following:'), - '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$a->profile['name']), false, '', array(t('No'),t('Yes'))), + '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$a->profile['name']), false, '', array(t('No'), t('Yes'))), /*'$does_know' => sprintf( t('Does %s know you?'),$a->profile['name']), '$yes' => t('Yes'), '$no' => t('No'), */ diff --git a/mod/follow.php b/mod/follow.php index 2b564c1bf..6e1f90694 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -110,7 +110,7 @@ function follow_content(App $a) { //'$photo' => proxy_url($ret["photo"], false, PROXY_SIZE_SMALL), '$desc' => "", '$pls_answer' => t('Please answer the following:'), - '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', array(t('No'),t('Yes'))), + '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', array(t('No'), t('Yes'))), '$add_note' => t('Add a personal note:'), '$page_desc' => "", '$friendica' => "", diff --git a/mod/group.php b/mod/group.php index 2b332e401..2042c765f 100644 --- a/mod/group.php +++ b/mod/group.php @@ -95,7 +95,7 @@ function group_content(App $a) { return replace_macros($tpl, $context + array( '$title' => t('Create a group of contacts/friends.'), - '$gname' => array('groupname',t('Group Name: '), '', ''), + '$gname' => array('groupname', t('Group Name: '), '', ''), '$gid' => 'new', '$form_security_token' => get_form_security_token("group_edit"), )); @@ -185,7 +185,7 @@ function group_content(App $a) { $context = $context + array( '$title' => t('Group Editor'), - '$gname' => array('groupname',t('Group Name: '),$group['name'], ''), + '$gname' => array('groupname', t('Group Name: '),$group['name'], ''), '$gid' => $group['id'], '$drop' => $drop_txt, '$form_security_token' => get_form_security_token('group_edit'), diff --git a/mod/manifest.php b/mod/manifest.php new file mode 100644 index 000000000..6dc0d10a2 --- /dev/null +++ b/mod/manifest.php @@ -0,0 +1,26 @@ + App::get_baseurl(), + '$touch_icon' => $touch_icon, + '$title' => Config::get('config', 'sitename', 'Friendica'), + )); + + echo $o; + + killme(); + + } +?> diff --git a/mod/photos.php b/mod/photos.php index ddf081467..3acd39b2a 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1581,9 +1581,9 @@ function photos_content(App $a) { '$album' => array('albname', t('New album name'), $album_e,''), '$caption' => array('desc', t('Caption'), $caption_e, ''), '$tags' => array('newtag', t('Add a Tag'), "", t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping')), - '$rotate_none' => array('rotate',t('Do not rotate'),0,'', true), - '$rotate_cw' => array('rotate',t('Rotate CW (right)'),1,''), - '$rotate_ccw' => array('rotate',t('Rotate CCW (left)'),2,''), + '$rotate_none' => array('rotate', t('Do not rotate'),0,'', true), + '$rotate_cw' => array('rotate', t('Rotate CW (right)'),1,''), + '$rotate_ccw' => array('rotate', t('Rotate CCW (left)'),2,''), '$nickname' => $a->data['user']['nickname'], '$resource_id' => $ph[0]['resource-id'], diff --git a/mod/probe.php b/mod/probe.php index 95f856bfa..8c951a7fc 100644 --- a/mod/probe.php +++ b/mod/probe.php @@ -4,6 +4,13 @@ require_once('include/Scrape.php'); function probe_content(App $a) { + if (!local_user()) { + http_status_exit(403, + array("title" => t("Public access denied."), + "description" => t("Only logged in users are permitted to perform a probing."))); + killme(); + } + $o .= '