From 35a5934503542d585447e3eef3bebc38af8c1931 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 2 Jul 2009 15:38:25 +0000 Subject: [PATCH 1/6] Changed sioc:reply_to to sioc:reply_of --- lib/rssaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rssaction.php b/lib/rssaction.php index 6f6c9a8cb0..0c8188e880 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -214,7 +214,7 @@ class Rss10Action extends Action $this->element('cc:licence', array('rdf:resource' => common_config('license', 'url'))); if ($notice->reply_to) { $replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to)); - $this->element('sioc:reply_to', array('rdf:resource' => $replyurl)); + $this->element('sioc:reply_of', array('rdf:resource' => $replyurl)); } $this->elementEnd('item'); $this->creators[$creator_uri] = $profile; From a9c83b064f38a2a1c431710c20eef611057711e8 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 2 Jul 2009 16:06:06 +0000 Subject: [PATCH 2/6] Added event to let the site owner add more information into
for contact e.g., email, location, tagline --- EVENTS.txt | 9 +++++++-- lib/action.php | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/EVENTS.txt b/EVENTS.txt index 8e917f11de..2c43469d46 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -1,5 +1,4 @@ -InitializePlugin: a chance to initialize a plugin in a complete - environment +InitializePlugin: a chance to initialize a plugin in a complete environment CleanupPlugin: a chance to cleanup a plugin at the end of a program @@ -117,3 +116,9 @@ EndLogout: After logging out ArgsInitialized: After the argument array has been initialized - $args: associative array of arguments, can be modified + +StartAddressData: Allows the site owner to provide additional information about themselves for contact (e.g., tagline, email, location) +- $action: the current action + +EndAddressData: At the end of
+- $action: the current action diff --git a/lib/action.php b/lib/action.php index 3bfa6ba15b..c89fe180ab 100644 --- a/lib/action.php +++ b/lib/action.php @@ -383,15 +383,18 @@ class Action extends HTMLOutputter // lawsuit { $this->elementStart('address', array('id' => 'site_contact', 'class' => 'vcard')); - $this->elementStart('a', array('class' => 'url home bookmark', - 'href' => common_local_url('public'))); - if (common_config('site', 'logo') || file_exists(theme_file('logo.png'))) { - $this->element('img', array('class' => 'logo photo', - 'src' => (common_config('site', 'logo')) ? common_config('site', 'logo') : theme_path('logo.png'), - 'alt' => common_config('site', 'name'))); + if (Event::handle('StartAddressData', array($this))) { + $this->elementStart('a', array('class' => 'url home bookmark', + 'href' => common_local_url('public'))); + if (common_config('site', 'logo') || file_exists(theme_file('logo.png'))) { + $this->element('img', array('class' => 'logo photo', + 'src' => (common_config('site', 'logo')) ? common_config('site', 'logo') : theme_path('logo.png'), + 'alt' => common_config('site', 'name'))); + } + $this->element('span', array('class' => 'fn org'), common_config('site', 'name')); + $this->elementEnd('a'); + Event::handle('EndAddressData', array($this)); } - $this->element('span', array('class' => 'fn org'), common_config('site', 'name')); - $this->elementEnd('a'); $this->elementEnd('address'); } From bb404c9be23f01002ec33cd0b42cc4c091e488e8 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 2 Jul 2009 21:29:03 +0000 Subject: [PATCH 3/6] Disabled textarea focus for conversation page since most entrances to this page is with 'in context' link (which includes a fragment identifier) --- js/util.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/util.js b/js/util.js index 638104c1c5..9bb7c91288 100644 --- a/js/util.js +++ b/js/util.js @@ -49,8 +49,9 @@ $(document).ready(function(){ // run once in case there's something in there counter(); - // set the focus - $("#notice_data-text").focus(); + if($('body')[0].id != 'conversation') { + $("#notice_data-text").focus(); + } } // XXX: refactor this code From bca3b3d36fb19c8583435febd2843a386a1469e6 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 2 Jul 2009 15:09:48 -0700 Subject: [PATCH 4/6] Send null as 2nd arg, not 3rd. --- actions/conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/conversation.php b/actions/conversation.php index cd6f263294..468409189b 100644 --- a/actions/conversation.php +++ b/actions/conversation.php @@ -107,7 +107,7 @@ class ConversationAction extends Action function showContent() { - $notices = Notice::conversationStream($this->id, 0, null); + $notices = Notice::conversationStream($this->id, null); $ct = new ConversationTree($notices, $this); From d80c553e5f6e523de380d7c9dc0bbdb9d06cb45e Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 2 Jul 2009 16:06:13 -0700 Subject: [PATCH 5/6] Make logging facility configurable --- config.php.sample | 3 +++ lib/common.php | 3 ++- lib/util.php | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config.php.sample b/config.php.sample index a23b41b319..4f8f715beb 100644 --- a/config.php.sample +++ b/config.php.sample @@ -36,6 +36,9 @@ $config['site']['path'] = 'laconica'; // If you want logging sent to a file instead of syslog // $config['site']['logfile'] = '/tmp/laconica.log'; +// Change the syslog facility that Laconica logs to +// $config['syslog']['facility'] = LOG_LOCAL7; + // Enables extra log information, for example full details of PEAR DB errors // $config['site']['logdebug'] = true; diff --git a/lib/common.php b/lib/common.php index 5d451463b9..14be747bc7 100644 --- a/lib/common.php +++ b/lib/common.php @@ -124,7 +124,8 @@ $config = 'dupelimit' => 60), # default for same person saying the same thing 'syslog' => array('appname' => 'laconica', # for syslog - 'priority' => 'debug'), # XXX: currently ignored + 'priority' => 'debug', # XXX: currently ignored + 'facility' => LOG_USER), 'queue' => array('enabled' => false, 'subsystem' => 'db', # default to database, or 'stomp' diff --git a/lib/util.php b/lib/util.php index 461ca15c15..d4d79afb30 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1098,7 +1098,8 @@ function common_ensure_syslog() { static $initialized = false; if (!$initialized) { - openlog(common_config('syslog', 'appname'), 0, LOG_USER); + openlog(common_config('syslog', 'appname'), 0, + common_config('syslog', 'facility')); $initialized = true; } } From f73d93fa7ae79f1e0b47d73fbdc1b214c6e559ae Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 3 Jul 2009 01:26:21 -0400 Subject: [PATCH 6/6] only show subscription controls to owner --- actions/subscriptions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/actions/subscriptions.php b/actions/subscriptions.php index 4124abea4d..42bdae10f7 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -159,7 +159,10 @@ class SubscriptionsListItem extends SubscriptionListItem $this->showBio(); $this->showTags(); // Relevant portion! - $this->showOwnerControls(); + $cur = common_current_user(); + if (!empty($cur) && $cur->id == $this->owner->id) { + $this->showOwnerControls(); + } $this->endProfile(); }