From 55ad954b15d0d2d855c4cb8db5da95d3c2d0dbfb Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 17 Sep 2010 16:38:12 -0700 Subject: Basic license admin panel (maybe we can make it fancier later) --- lib/adminpanelaction.php | 8 ++++++++ lib/default.php | 2 +- lib/router.php | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php index 41cfe5851..043219a1f 100644 --- a/lib/adminpanelaction.php +++ b/lib/adminpanelaction.php @@ -409,6 +409,14 @@ class AdminPanelNav extends Widget $menu_title, $action_name == 'snapshotadminpanel', 'nav_snapshot_admin_panel'); } + if (AdminPanelAction::canAdmin('license')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Set site license'); + // TRANS: Menu item for site administration + $this->out->menuItem(common_local_url('licenseadminpanel'), _('License'), + $menu_title, $action_name == 'licenseadminpanel', 'nav_license_admin_panel'); + } + Event::handle('EndAdminPanelNav', array($this)); } $this->action->elementEnd('ul'); diff --git a/lib/default.php b/lib/default.php index 45a4560ff..6200abada 100644 --- a/lib/default.php +++ b/lib/default.php @@ -300,7 +300,7 @@ $default = 'OpenID' => null), ), 'admin' => - array('panels' => array('design', 'site', 'user', 'paths', 'access', 'sessions', 'sitenotice')), + array('panels' => array('design', 'site', 'user', 'paths', 'access', 'sessions', 'sitenotice', 'license')), 'singleuser' => array('enabled' => false, 'nickname' => null), diff --git a/lib/router.php b/lib/router.php index 7e1e6a2a4..fb5a3c7c3 100644 --- a/lib/router.php +++ b/lib/router.php @@ -690,6 +690,8 @@ class Router $m->connect('admin/sessions', array('action' => 'sessionsadminpanel')); $m->connect('admin/sitenotice', array('action' => 'sitenoticeadminpanel')); $m->connect('admin/snapshot', array('action' => 'snapshotadminpanel')); + $m->connect('admin/license', array('action' => 'licenseadminpanel')); + $m->connect('getfile/:filename', array('action' => 'getfile'), -- cgit v1.2.3-54-g00ecf From 28fdc733a7e90146ae7803d61c352c1758285bd8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 21 Sep 2010 14:09:46 -0400 Subject: change the location and title of the feeds section --- lib/action.php | 8 ++++---- lib/feedlist.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/action.php b/lib/action.php index e50397514..dc21c75e5 100644 --- a/lib/action.php +++ b/lib/action.php @@ -715,14 +715,14 @@ class Action extends HTMLOutputter // lawsuit { $this->elementStart('div', array('id' => 'aside_primary', 'class' => 'aside')); - if (Event::handle('StartShowExportData', array($this))) { - $this->showExportData(); - Event::handle('EndShowExportData', array($this)); - } if (Event::handle('StartShowSections', array($this))) { $this->showSections(); Event::handle('EndShowSections', array($this)); } + if (Event::handle('StartShowExportData', array($this))) { + $this->showExportData(); + Event::handle('EndShowExportData', array($this)); + } $this->elementEnd('div'); } diff --git a/lib/feedlist.php b/lib/feedlist.php index 9ae83f5e8..7493e3575 100644 --- a/lib/feedlist.php +++ b/lib/feedlist.php @@ -61,7 +61,7 @@ class FeedList extends Widget { $this->out->elementStart('div', array('id' => 'export_data', 'class' => 'section')); - $this->out->element('h2', null, _('Export data')); + $this->out->element('h2', null, _('Feeds')); $this->out->elementStart('ul', array('class' => 'xoxo')); foreach ($feeds as $feed) { -- cgit v1.2.3-54-g00ecf From 94de78fa0f795e7eecb8dc59a3abfeaf131f05c3 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 21 Sep 2010 12:38:04 -0700 Subject: Workaround for #2485: in profile output on feeds, fall back to the Twitter 73x73 avatar instead of going straight to the 96x96 default image on twitter-import profiles. --- lib/activityobject.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib') diff --git a/lib/activityobject.php b/lib/activityobject.php index 677a48197..444577775 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -430,6 +430,17 @@ class ActivityObject $alink->height = $size; $alink->width = $size; $alink->url = Avatar::defaultImage($size); + + if ($size == AVATAR_PROFILE_SIZE) { + // Hack for Twitter import: we don't have a 96x96 image, + // but we do have a 73x73 image. For now, fake it with that. + $avatar = $profile->getAvatar(73); + if ($avatar) { + $alink = AvatarLink::fromAvatar($avatar); + $alink->height= $size; + $alink->width = $size; + } + } } $object->avatarLinks[] = $alink; -- cgit v1.2.3-54-g00ecf