summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-29 13:23:45 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-29 13:23:45 -0700
commitdd1fc46f0986e5675d24208199b88150f643925d (patch)
treeb19ecc1c4f60882f5cc231214398e57190d6ce14 /actions
parentf65015b24a8448ecbb12b3897992cdaf6b563212 (diff)
parent5b8e40aaa9bdb0c07cce0cf53cd913b0c397fdc4 (diff)
Merge branch '0.8.x' into design_reset
* 0.8.x: (32 commits) admin indicators in groups show section with admins in sidebar of group update to latest (r76) version of XMPPHP better output for common error handler fix logging error note when going background change name of constructor for xmppdaemon add a lot more logging to xmppdaemon error in get_option_value wasn't returning a value reformat commandline.inc if not in daemon mode, xmppdaemon sends log to stdout extract log-line formatting to its own function got my background/foreground logic backwards twitter status fetcher takes an id argument more efficient fixup of conversations commandline processing handles errors better xmppdaemon.php can stay in foreground command line arg handling a little more flexible Daemon can optionally not go into the background don't canonicalize people's text into URLs ... Conflicts: theme/base/css/display.css
Diffstat (limited to 'actions')
-rw-r--r--actions/api.php4
-rw-r--r--actions/groupmembers.php9
-rw-r--r--actions/showgroup.php44
3 files changed, 56 insertions, 1 deletions
diff --git a/actions/api.php b/actions/api.php
index 1fe5875ad..08f5fadad 100644
--- a/actions/api.php
+++ b/actions/api.php
@@ -67,7 +67,9 @@ class ApiAction extends Action
$this->process_command();
} else {
# basic authentication failed
- common_log(LOG_WARNING, "Failed API auth attempt, nickname: $nickname.");
+ list($proxy, $ip) = common_client_ip();
+
+ common_log(LOG_WARNING, "Failed API auth attempt, nickname = $nickname, proxy = $proxy, ip = $ip.");
$this->show_basic_auth_error();
}
}
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index d132cdf96..be7a9e81c 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -167,6 +167,15 @@ class GroupMemberListItem extends ProfileListItem
$this->group = $group;
}
+ function showFullName()
+ {
+ parent::showFullName();
+ if ($this->profile->isAdmin($this->group)) {
+ $this->out->text(' ');
+ $this->out->element('span', 'admin_indicator', _('Admin'));
+ }
+ }
+
function showActions()
{
$this->startActions();
diff --git a/actions/showgroup.php b/actions/showgroup.php
index b6a0f4844..ce11d574e 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -331,6 +331,7 @@ class ShowgroupAction extends GroupDesignAction
{
$this->showMembers();
$this->showStatistics();
+ $this->showAdmins();
$cloud = new GroupTagCloudSection($this, $this->group);
$cloud->show();
}
@@ -370,6 +371,18 @@ class ShowgroupAction extends GroupDesignAction
}
/**
+ * Show list of admins
+ *
+ * @return void
+ */
+
+ function showAdmins()
+ {
+ $adminSection = new GroupAdminSection($this, $this->group);
+ $adminSection->show();
+ }
+
+ /**
* Show some statistics
*
* @return void
@@ -423,3 +436,34 @@ class ShowgroupAction extends GroupDesignAction
$this->elementEnd('div');
}
}
+
+class GroupAdminSection extends ProfileSection
+{
+ var $group;
+
+ function __construct($out, $group)
+ {
+ parent::__construct($out);
+ $this->group = $group;
+ }
+
+ function getProfiles()
+ {
+ return $this->group->getAdmins();
+ }
+
+ function title()
+ {
+ return _('Admins');
+ }
+
+ function divId()
+ {
+ return 'group_admins';
+ }
+
+ function moreUrl()
+ {
+ return null;
+ }
+} \ No newline at end of file