]> git.mxchange.org Git - friendica.git/blobdiff - mod/admin.php
Some more ...
[friendica.git] / mod / admin.php
index 70ef5f75116c1be7e0c2d68e9233628f6c33426c..7f9000807be62021fa9535778bdc5bd5972b5c97 100644 (file)
@@ -114,7 +114,16 @@ function admin_post(&$a){
 /**
  * @brief Generates content of the admin panel pages
  *
- * This function generates the content for the admin panel.
+ * This function generates the content for the admin panel. It consists of the
+ * aside menu (same for the entire admin panel) and the code for the soecified
+ * subpage of the panel.
+ *
+ * The structure of the adress is: /admin/subpage/details though "details" is
+ * only necessary for some subpages, like themes or addons where it is the name
+ * of one theme resp. addon from which the details should be shown. Content for
+ * the subpages is generated in separate functions for each of the subpages.
+ *
+ * The returned string hold the generated HTML code of the page.
  *
  * @param App $a
  * @return string
@@ -262,6 +271,7 @@ function admin_page_federation(&$a) {
        // displayed on the stats page.
        $platforms = array('Friendica', 'Diaspora', '%%red%%', 'Hubzilla', 'GNU Social', 'StatusNet');
        $counts = array();
+       $total = 0;
 
        foreach ($platforms as $p) {
                // get a total count for the platform, the name and version of the
@@ -269,6 +279,7 @@ function admin_page_federation(&$a) {
                $c = q('SELECT count(*) AS total, platform, network, version FROM gserver
                        WHERE platform LIKE "%s" AND last_contact > last_failure
                        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
@@ -346,7 +357,7 @@ function admin_page_federation(&$a) {
                '$autoactive' => get_config('system', 'poco_completion'),
                '$counts' => $counts,
                '$version' => FRIENDICA_VERSION,
-               '$legendtext' => t('Currently this node is aware of nodes from the following platforms:'),
+               '$legendtext' => sprintf(t('Currently this node is aware of %d nodes from the following platforms:'), $total),
                '$baseurl' => $a->get_baseurl(),
        ));
 }