mirror of
https://github.com/friendica/friendica
synced 2024-11-10 09:42:54 +00:00
Merge remote-tracking branch 'upstream/develop' into 1512-ostatus-picture-posts
This commit is contained in:
commit
540d217134
7 changed files with 81 additions and 17 deletions
|
@ -46,6 +46,7 @@ Friendica Documentation and Resources
|
||||||
* [Plugin Development](help/Plugins)
|
* [Plugin Development](help/Plugins)
|
||||||
* [Theme Development](help/themes)
|
* [Theme Development](help/themes)
|
||||||
* [Smarty 3 Templates](help/smarty3-templates)
|
* [Smarty 3 Templates](help/smarty3-templates)
|
||||||
|
* [Code - Reference(Doxygen generated - sets cookies)](doc/html/)
|
||||||
|
|
||||||
**External Resources**
|
**External Resources**
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ Friendica - Dokumentation und Ressourcen
|
||||||
* [Plugin Development](help/Plugins)
|
* [Plugin Development](help/Plugins)
|
||||||
* [Theme Development](help/themes)
|
* [Theme Development](help/themes)
|
||||||
* [Smarty 3 Templates](help/smarty3-templates)
|
* [Smarty 3 Templates](help/smarty3-templates)
|
||||||
|
* [Code-Referenz (mit doxygen generiert - setzt Cookies)](doc/html/)
|
||||||
|
|
||||||
**Externe Ressourcen**
|
**Externe Ressourcen**
|
||||||
|
|
||||||
|
|
16
doc/html/index.php
Normal file
16
doc/html/index.php
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>$Projectname Doxygen API Documentation</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>$Projectname Doxygen API Documentation not rendered</h1>
|
||||||
|
|
||||||
|
To get the Doxygen API Documentation you must render it with the program <a href="http://www.doxygen.org">Doxygen</a> (included in most distributions).
|
||||||
|
<pre>
|
||||||
|
$ doxygen util/Doxyfile
|
||||||
|
</pre>
|
||||||
|
<br>
|
||||||
|
<a href="javascript:history.back()">back</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -340,3 +340,30 @@ function groups_containing($uid,$c) {
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @brief count unread group items
|
||||||
|
*
|
||||||
|
* Count unread items of each groups
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* 'id' => group id
|
||||||
|
* 'name' => group name
|
||||||
|
* 'count' => counted unseen group items
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function groups_count_unseen() {
|
||||||
|
|
||||||
|
$r = q("SELECT `group`.`id`, `group`.`name`, COUNT(`item`.`id`) AS `count` FROM `group`, `group_member`, `item`
|
||||||
|
WHERE `group`.`uid` = %d
|
||||||
|
AND `item`.`uid` = %d
|
||||||
|
AND `item`.`unseen` AND `item`.`visible`
|
||||||
|
AND NOT `item`.`deleted`
|
||||||
|
AND `item`.`contact-id` = `group_member`.`contact-id`
|
||||||
|
AND `group_member`.`gid` = `group`.`id`
|
||||||
|
GROUP BY `group`.`id` ",
|
||||||
|
intval(local_user()),
|
||||||
|
intval(local_user())
|
||||||
|
);
|
||||||
|
|
||||||
|
return $r;
|
||||||
|
}
|
26
mod/ping.php
26
mod/ping.php
|
@ -2,6 +2,7 @@
|
||||||
require_once("include/datetime.php");
|
require_once("include/datetime.php");
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
require_once('include/forums.php');
|
require_once('include/forums.php');
|
||||||
|
require_once('include/group.php');
|
||||||
require_once("mod/proxy.php");
|
require_once("mod/proxy.php");
|
||||||
|
|
||||||
function ping_init(&$a) {
|
function ping_init(&$a) {
|
||||||
|
@ -34,7 +35,7 @@ function ping_init(&$a) {
|
||||||
|
|
||||||
$home = 0;
|
$home = 0;
|
||||||
$network = 0;
|
$network = 0;
|
||||||
$network_group = array();
|
$groups_unseen = array();
|
||||||
$forums_unseen = array();
|
$forums_unseen = array();
|
||||||
|
|
||||||
$r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`wall`, `item`.`author-name`,
|
$r = q("SELECT `item`.`id`,`item`.`parent`, `item`.`verb`, `item`.`wall`, `item`.`author-name`,
|
||||||
|
@ -88,20 +89,11 @@ function ping_init(&$a) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $network )
|
if($network) {
|
||||||
{
|
if(intval(feature_enabled(local_user(),'groups'))) {
|
||||||
# Find out how unseen network posts are spread across groups
|
// Find out how unseen network posts are spread across groups
|
||||||
$sql = "SELECT g.id, g.name, count(i.id) count " .
|
$groups_unseen = groups_count_unseen();
|
||||||
"FROM `group` g, group_member gm, item i " .
|
}
|
||||||
"WHERE g.uid = %d " .
|
|
||||||
"AND i.uid = %d " .
|
|
||||||
"AND i.unseen AND i.visible " .
|
|
||||||
"AND NOT i.deleted " .
|
|
||||||
"AND i.`contact-id` = gm.`contact-id` " .
|
|
||||||
"AND gm.gid = g.id GROUP BY g.id";
|
|
||||||
#echo '<SQL id="' . intval(local_user()) . '">' . $sql . '</SQL>';
|
|
||||||
$network_group = q($sql, intval(local_user()), intval(local_user()));
|
|
||||||
#echo '<COUNT R="' . count($network_group) . '"/>';
|
|
||||||
|
|
||||||
if(intval(feature_enabled(local_user(),'forumlist_widget'))) {
|
if(intval(feature_enabled(local_user(),'forumlist_widget'))) {
|
||||||
$forums_unseen = forums_count_unseen();
|
$forums_unseen = forums_count_unseen();
|
||||||
|
@ -227,9 +219,9 @@ function ping_init(&$a) {
|
||||||
<home>$home</home>\r\n";
|
<home>$home</home>\r\n";
|
||||||
if ($register!=0) echo "<register>$register</register>";
|
if ($register!=0) echo "<register>$register</register>";
|
||||||
|
|
||||||
if ( count($network_group) ) {
|
if ( count($groups_unseen) ) {
|
||||||
echo '<groups>';
|
echo '<groups>';
|
||||||
foreach ($network_group as $it) {
|
foreach ($groups_unseen as $it) {
|
||||||
echo '<group id="' . $it['id'] . '">' . $it['count'] . "</group>";
|
echo '<group id="' . $it['id'] . '">' . $it['count'] . "</group>";
|
||||||
}
|
}
|
||||||
echo "</groups>";
|
echo "</groups>";
|
||||||
|
|
23
util/Doxyfile
Normal file
23
util/Doxyfile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
INPUT = README.md index.php boot.php testargs.php update.php mod/ object/ include/ js/ util/ view/ version.inc
|
||||||
|
RECURSIVE = YES
|
||||||
|
PROJECT_NAME = "Friendica"
|
||||||
|
PROJECT_LOGO = images/friendica-64.jpg
|
||||||
|
EXCLUDE = .htconfig.php library/ doc/ .git/ log/ util/zotsh/easywebdav/ addon/ report/ privacy_image_cache/ photo/ proxy/ local/
|
||||||
|
EXCLUDE_PATTERNS = *smarty3* *strings.php*.log *.out *test*
|
||||||
|
OUTPUT_DIRECTORY = doc
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html/
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
GENERATE_LATEX = NO
|
||||||
|
EXTRACT_ALL = YES
|
||||||
|
EXTRACT_PRIVATE = YES
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
USE_MDFILE_AS_MAINPAGE = README.md
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
GENERATE_TREEVIEW = YES
|
||||||
|
HTML_FOOTER = util/Doxygen.footer
|
||||||
|
ALIASES += "license=@par License:\n"
|
||||||
|
ALIASES += "fixme=\xrefitem fixme \"Fixme\" \"Fixme List\""
|
||||||
|
ALIASES += "FIXME=\fixme"
|
||||||
|
ALIASES += "TODO=\todo"
|
||||||
|
ALIASES += "BUG=\bug"
|
4
util/Doxygen.footer
Normal file
4
util/Doxygen.footer
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue