Merge pull request #5258 from Quix0r/rewrites/curly-braces-is-result-usage-002-split1
Curly braces, whitespaces and duplicate method invocation fixed
This commit is contained in:
commit
dd1e6dd4a5
|
@ -72,12 +72,12 @@ JavaScript addon hooks
|
||||||
---
|
---
|
||||||
|
|
||||||
#### PHP part
|
#### PHP part
|
||||||
Make sure your JavaScript addon file (addon/*addon_name*/*addon_name*.js) is listed in the document response.
|
Make sure your JavaScript addon file (addon/*addon_name*/*addon_name*.js) is listed in the document response.
|
||||||
|
|
||||||
In your addon install function, add:
|
In your addon install function, add:
|
||||||
|
|
||||||
Addon::registerHook('template_vars', 'addon/<addon_name>/<addon_name>.php', '<addon_name>_template_vars');
|
Addon::registerHook('template_vars', 'addon/<addon_name>/<addon_name>.php', '<addon_name>_template_vars');
|
||||||
|
|
||||||
In your addon uninstall function, add:
|
In your addon uninstall function, add:
|
||||||
|
|
||||||
Addon::unregisterHook('template_vars', 'addon/<addon_name>/<addon_name>.php', '<addon_name>_template_vars');
|
Addon::unregisterHook('template_vars', 'addon/<addon_name>/<addon_name>.php', '<addon_name>_template_vars');
|
||||||
|
@ -104,7 +104,7 @@ Register your addon hooks in file 'addon/*addon_name*/*addon_name*.js'.
|
||||||
No arguments are provided to your JavaScript callback function. Example:
|
No arguments are provided to your JavaScript callback function. Example:
|
||||||
|
|
||||||
function myhook_function() {
|
function myhook_function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Modules
|
Modules
|
||||||
|
@ -668,4 +668,4 @@ Here is a complete list of all hook callbacks with file locations (as of 01-Apr-
|
||||||
|
|
||||||
### view/js/main.js
|
### view/js/main.js
|
||||||
|
|
||||||
callAddonHooks("postprocess_liveupdate");
|
callAddonHooks("postprocess_liveupdate");
|
||||||
|
|
|
@ -18,7 +18,7 @@ You can tag **persons who are in your social circle** by adding the "@"-sign in
|
||||||
* @mike+151 - this form is used by the drop-down tag completion tool. It indicates the contact whose nickname is mike and whose contact identifier number is 151. The drop-down tool may be used to resolve people with duplicate nicknames.
|
* @mike+151 - this form is used by the drop-down tag completion tool. It indicates the contact whose nickname is mike and whose contact identifier number is 151. The drop-down tool may be used to resolve people with duplicate nicknames.
|
||||||
|
|
||||||
You can tag a person on a different network or one that is **not in your social circle** by using the following notation:
|
You can tag a person on a different network or one that is **not in your social circle** by using the following notation:
|
||||||
|
|
||||||
* @mike@macgirvin.com - This is called a "remote mention" and can only be an email-style locator, not a web URL.
|
* @mike@macgirvin.com - This is called a "remote mention" and can only be an email-style locator, not a web URL.
|
||||||
|
|
||||||
Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts.
|
Unless their system blocks unsolicited "mentions", the person tagged will likely receive a "Mention" post/activity or become a direct participant in the conversation in the case of public posts.
|
||||||
|
@ -27,7 +27,7 @@ The exception is an ongoing conversation started from a contact of both you and
|
||||||
This is a spam prevention measure.
|
This is a spam prevention measure.
|
||||||
|
|
||||||
Remote mentions are delivered using the OStatus protocol.
|
Remote mentions are delivered using the OStatus protocol.
|
||||||
This protocol is used by Friendica and GNU Social and several other systems like Mastodon, but is not currently implemented in Diaspora.
|
This protocol is used by Friendica and GNU Social and several other systems like Mastodon, but is not currently implemented in Diaspora.
|
||||||
As the OStatus protocol allows this Friendica user can be @-mentioned by users from platforms using this protocol in conversations if the "Enable OStatus support" is activated on the Friendica node.
|
As the OStatus protocol allows this Friendica user can be @-mentioned by users from platforms using this protocol in conversations if the "Enable OStatus support" is activated on the Friendica node.
|
||||||
These @-mentions wont be blocked, even if there is no relationship between the sender and the receiver of the message.
|
These @-mentions wont be blocked, even if there is no relationship between the sender and the receiver of the message.
|
||||||
|
|
||||||
|
@ -52,5 +52,5 @@ The same rules apply as with names that spaces within tags are represented by th
|
||||||
It is therefore not possible to create a tag whose target contains an underscore.
|
It is therefore not possible to create a tag whose target contains an underscore.
|
||||||
|
|
||||||
Topical tags are also not linked if they are purely numeric, e.g. #1.
|
Topical tags are also not linked if they are purely numeric, e.g. #1.
|
||||||
If you wish to use a numerica hashtag, please add some descriptive text such as #2012-elections.
|
If you wish to use a numerica hashtag, please add some descriptive text such as #2012-elections.
|
||||||
|
|
||||||
|
|
|
@ -1970,6 +1970,7 @@ function is_a_date_arg($s) {
|
||||||
*/
|
*/
|
||||||
function deindent($text, $chr = "[\t ]", $count = NULL) {
|
function deindent($text, $chr = "[\t ]", $count = NULL) {
|
||||||
$lines = explode("\n", $text);
|
$lines = explode("\n", $text);
|
||||||
|
|
||||||
if (is_null($count)) {
|
if (is_null($count)) {
|
||||||
$m = [];
|
$m = [];
|
||||||
$k = 0;
|
$k = 0;
|
||||||
|
|
|
@ -141,6 +141,7 @@ function message_content(App $a)
|
||||||
'$cancel' => L10n::t('Cancel'),
|
'$cancel' => L10n::t('Cancel'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now check how the user responded to the confirmation query
|
// Now check how the user responded to the confirmation query
|
||||||
if ($_REQUEST['canceled']) {
|
if ($_REQUEST['canceled']) {
|
||||||
goaway($_SESSION['return_url']);
|
goaway($_SESSION['return_url']);
|
||||||
|
@ -151,6 +152,7 @@ function message_content(App $a)
|
||||||
if (dba::delete('mail', ['id' => $a->argv[2], 'uid' => local_user()])) {
|
if (dba::delete('mail', ['id' => $a->argv[2], 'uid' => local_user()])) {
|
||||||
info(L10n::t('Message deleted.') . EOL);
|
info(L10n::t('Message deleted.') . EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//goaway(System::baseUrl(true) . '/message' );
|
//goaway(System::baseUrl(true) . '/message' );
|
||||||
goaway($_SESSION['return_url']);
|
goaway($_SESSION['return_url']);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1231,6 +1231,7 @@ function photos_content(App $a)
|
||||||
*/
|
*/
|
||||||
if (!Config::get('system', 'no_count', false)) {
|
if (!Config::get('system', 'no_count', false)) {
|
||||||
$order_field = defaults($_GET, 'order', '');
|
$order_field = defaults($_GET, 'order', '');
|
||||||
|
|
||||||
if ($order_field === 'posted') {
|
if ($order_field === 'posted') {
|
||||||
$order = 'ASC';
|
$order = 'ASC';
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -83,10 +83,9 @@ server {
|
||||||
# rewrite to front controller as default rule
|
# rewrite to front controller as default rule
|
||||||
location / {
|
location / {
|
||||||
if (!-e $request_filename) {
|
if (!-e $request_filename) {
|
||||||
rewrite ^(.*)$ /index.php?pagename=$1;
|
rewrite ^(.*)$ /index.php?pagename=$1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# make sure webfinger and other well known services aren't blocked
|
# make sure webfinger and other well known services aren't blocked
|
||||||
# by denying dot files and rewrite request to the front controller
|
# by denying dot files and rewrite request to the front controller
|
||||||
|
@ -96,7 +95,7 @@ server {
|
||||||
rewrite ^(.*)$ /index.php?pagename=$1;
|
rewrite ^(.*)$ /index.php?pagename=$1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include mime.types;
|
include mime.types;
|
||||||
|
|
||||||
# block these file types
|
# block these file types
|
||||||
|
|
|
@ -2080,9 +2080,7 @@ class DFRN
|
||||||
'confirm' => $relocate["confirm"], 'notify' => $relocate["notify"],
|
'confirm' => $relocate["confirm"], 'notify' => $relocate["notify"],
|
||||||
'poll' => $relocate["poll"], 'site-pubkey' => $relocate["sitepubkey"]];
|
'poll' => $relocate["poll"], 'site-pubkey' => $relocate["sitepubkey"]];
|
||||||
$condition = ["(`id` = ?) OR (`nurl` = ?)", $importer["id"], normalise_link($old["url"])];
|
$condition = ["(`id` = ?) OR (`nurl` = ?)", $importer["id"], normalise_link($old["url"])];
|
||||||
dba::update('contact', $fields, $condition);
|
|
||||||
|
|
||||||
// @TODO No dba:update here?
|
|
||||||
dba::update('contact', $fields, $condition);
|
dba::update('contact', $fields, $condition);
|
||||||
|
|
||||||
Contact::updateAvatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true);
|
Contact::updateAvatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
var introID = location.pathname.split("/").pop();
|
var introID = location.pathname.split("/").pop();
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
// Since only the DIV's inside the notification-list are marked
|
// Since only the DIV's inside the notification-list are marked
|
||||||
// with the class "unseen", we need some js to transfer this class
|
// with the class "unseen", we need some js to transfer this class
|
||||||
// to the parent li list-elements.
|
// to the parent li list-elements.
|
||||||
if($(".notif-item").hasClass("unseen")) {
|
if($(".notif-item").hasClass("unseen")) {
|
||||||
|
|
|
@ -66,22 +66,22 @@
|
||||||
<li id="nav-notifications-mark-all" class="toolbar"><a href="#" onclick="notifyMarkAll(); return false;" title="{{$nav.notifications.mark.3}}"><span class="icon s10 edit"></span></a></a><a href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.all.1}}"><span class="icon s10 plugin"></span></a></li>
|
<li id="nav-notifications-mark-all" class="toolbar"><a href="#" onclick="notifyMarkAll(); return false;" title="{{$nav.notifications.mark.3}}"><span class="icon s10 edit"></span></a></a><a href="{{$nav.notifications.all.0}}" title="{{$nav.notifications.all.1}}"><span class="icon s10 plugin"></span></a></li>
|
||||||
<li class="empty">{{$emptynotifications}}</li>
|
<li class="empty">{{$emptynotifications}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a>
|
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a>
|
||||||
<ul id="nav-site-menu" class="menu-popup">
|
<ul id="nav-site-menu" class="menu-popup">
|
||||||
{{if $nav.manage}}<li><a class="{{$nav.manage.2}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}">{{$nav.manage.1}}</a></li>{{/if}}
|
{{if $nav.manage}}<li><a class="{{$nav.manage.2}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}">{{$nav.manage.1}}</a></li>{{/if}}
|
||||||
|
|
||||||
{{if $nav.settings}}<li><a class="{{$nav.settings.2}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}">{{$nav.settings.1}}</a></li>{{/if}}
|
{{if $nav.settings}}<li><a class="{{$nav.settings.2}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}">{{$nav.settings.1}}</a></li>{{/if}}
|
||||||
{{if $nav.admin}}<li><a accesskey="a" class="{{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" >{{$nav.admin.1}}</a></li>{{/if}}
|
{{if $nav.admin}}<li><a accesskey="a" class="{{$nav.admin.2}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" >{{$nav.admin.1}}</a></li>{{/if}}
|
||||||
|
|
||||||
{{if $nav.logout}}<li><a class="menu-sep {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" >{{$nav.logout.1}}</a></li>{{/if}}
|
{{if $nav.logout}}<li><a class="menu-sep {{$nav.logout.2}}" href="{{$nav.logout.0}}" title="{{$nav.logout.3}}" >{{$nav.logout.1}}</a></li>{{/if}}
|
||||||
{{if $nav.login}}<li><a class="{{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" >{{$nav.login.1}}</a><li>{{/if}}
|
{{if $nav.login}}<li><a class="{{$nav.login.2}}" href="{{$nav.login.0}}" title="{{$nav.login.3}}" >{{$nav.login.1}}</a><li>{{/if}}
|
||||||
{{if $nav.tos}}<li><a class="menu-sep {{$nav.tos.2}}" href="{{$nav.tos.0}}" title="{{$nav.tos.3}}">{{$nav.tos.1}}</a></li>{{/if}}
|
{{if $nav.tos}}<li><a class="menu-sep {{$nav.tos.2}}" href="{{$nav.tos.0}}" title="{{$nav.tos.3}}">{{$nav.tos.1}}</a></li>{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{if $nav.help}}
|
{{if $nav.help}}
|
||||||
<li id="nav-help-link" class="nav-menu {{$sel.help}}">
|
<li id="nav-help-link" class="nav-menu {{$sel.help}}">
|
||||||
<a class="{{$nav.help.2}}" target="friendica-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" >{{$nav.help.1}}</a>
|
<a class="{{$nav.help.2}}" target="friendica-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" >{{$nav.help.1}}</a>
|
||||||
|
|
Loading…
Reference in a new issue