From a36612866e591ff8521ddd3e66f803e768bd6e83 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 30 Nov 2009 14:55:02 -0800 Subject: [PATCH 01/10] Fix bad function call --- actions/apigroupshow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/apigroupshow.php b/actions/apigroupshow.php index f9b960747b..aae4d249c3 100644 --- a/actions/apigroupshow.php +++ b/actions/apigroupshow.php @@ -96,7 +96,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction switch($this->format) { case 'xml': - $this->show_single_xml_group($this->group); + $this->showSingleXmlGroup($this->group); break; case 'json': $this->showSingleJsonGroup($this->group); From 4003e51b9149f4b8538c5c107417eb9ca9e7f949 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 1 Dec 2009 09:57:47 -0800 Subject: [PATCH 02/10] Revert "Fix problem where screen_name and user_id parameters are being" The problem this was trying to fix is actually caused by a missing routing rule. Silly me. This reverts commit 2451192415ae93a329b412761cfbb26df8185474. --- lib/api.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/api.php b/lib/api.php index 539aac4af2..e2ea87b43e 100644 --- a/lib/api.php +++ b/lib/api.php @@ -1142,10 +1142,15 @@ class ApiAction extends Action function getTargetUser($id) { - if (!preg_match('/^[a-zA-Z0-9]+$/', $id)) { + if (empty($id)) { // Twitter supports these other ways of passing the user ID - if ($this->arg('user_id')) { + if (is_numeric($this->arg('id'))) { + return User::staticGet($this->arg('id')); + } else if ($this->arg('id')) { + $nickname = common_canonical_nickname($this->arg('id')); + return User::staticGet('nickname', $nickname); + } else if ($this->arg('user_id')) { // This is to ensure that a non-numeric user_id still // overrides screen_name even if it doesn't get used if (is_numeric($this->arg('user_id'))) { @@ -1154,12 +1159,6 @@ class ApiAction extends Action } else if ($this->arg('screen_name')) { $nickname = common_canonical_nickname($this->arg('screen_name')); return User::staticGet('nickname', $nickname); - - } else if (is_numeric($this->arg('id'))) { - return User::staticGet($this->arg('id')); - } else if ($this->arg('id')) { - $nickname = common_canonical_nickname($this->arg('id')); - return User::staticGet('nickname', $nickname); } else { // Fall back to trying the currently authenticated user return $this->auth_user; From 75914394512c8752017b8516c0d445a8ec33d1f3 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 1 Dec 2009 10:02:22 -0800 Subject: [PATCH 03/10] Add missing rule for /api/users/show.:format --- lib/router.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/router.php b/lib/router.php index beb98eb04d..1a090861e4 100644 --- a/lib/router.php +++ b/lib/router.php @@ -358,6 +358,10 @@ class Router // users + $m->connect('api/users/show.:format', + array('action' => 'ApiUserShow', + 'format' => '(xml|json)')); + $m->connect('api/users/show/:id.:format', array('action' => 'ApiUserShow', 'id' => '[a-zA-Z0-9]+', From e28e8cc1d7e3c6683237c86955b7c1da23c02696 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 12:31:21 -0800 Subject: [PATCH 04/10] typo fix: '$this' now spelled correctly. Looks like this'll fix acceptance of 'source' param for direct messages posted to API @fixme: there's duplication of reserved sources list between at least this and apistatusesupdate module --- actions/apidirectmessagenew.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/apidirectmessagenew.php b/actions/apidirectmessagenew.php index fed6acc30e..e6c39ce4ac 100644 --- a/actions/apidirectmessagenew.php +++ b/actions/apidirectmessagenew.php @@ -79,7 +79,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction $this->source = $this->trimmed('source'); // Not supported by Twitter. $reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api'); - if (empty($thtis->source) || in_array($this->source, $reserved_sources)) { + if (empty($this->source) || in_array($this->source, $reserved_sources)) { $source = 'api'; } From 46e14c762a81e8eb3fe197a6c87c10a6521a9cc1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 20:46:52 +0000 Subject: [PATCH 05/10] Fix makefile wildcards for locale compilation (now works on Ubuntu 8.04) --- locale/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/locale/Makefile b/locale/Makefile index 4f17f683f9..00700ada10 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -2,10 +2,12 @@ all : translations -translations : */LC_MESSAGES/statusnet.mo +trans = $(patsubst %.po,%.mo,$(wildcard */LC_MESSAGES/statusnet.po)) + +translations : $(trans) clean : - rm -f */LC_MESSAGES/statusnet.mo + rm -f $(trans) %.mo : %.po msgfmt -o $@ $< From 8b63717bf9828a4219578d05ce8eeb59616fde7d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 12:55:55 -0800 Subject: [PATCH 06/10] ticket 1100: add Drupal source link --- db/notice_source.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/notice_source.sql b/db/notice_source.sql index 10ff0d55aa..50660e9480 100644 --- a/db/notice_source.sql +++ b/db/notice_source.sql @@ -11,6 +11,7 @@ VALUES ('cliqset', 'Cliqset', 'http://www.cliqset.com/', now()), ('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()), ('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()), + ('drupal','Drupal','http://drupal.org/', now()), ('eventbox','EventBox','http://thecosmicmachine.com/eventbox/ ', now()), ('Facebook','Facebook','http://apps.facebook.com/identica/', now()), ('feed2omb','feed2omb','http://projects.ciarang.com/p/feed2omb/', now()), From 15a9c869794ea3948086afa5310696e1250d9a26 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 14:38:34 -0800 Subject: [PATCH 07/10] Ticket 2048: make OMB posting HTTP timeout configurable as $config['omb']['timeout']; defaults to 5 seconds instead of 20-second default in Yadis library --- lib/default.php | 2 ++ lib/omb.php | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/default.php b/lib/default.php index 95366e0b32..d4ef045ea5 100644 --- a/lib/default.php +++ b/lib/default.php @@ -226,4 +226,6 @@ $default = array('contentlimit' => null), 'location' => array('namespace' => 1), // 1 = geonames, 2 = Yahoo Where on Earth + 'omb' => + array('timeout' => 5), // HTTP request timeout in seconds when contacting remote hosts for OMB updates ); diff --git a/lib/omb.php b/lib/omb.php index e2a6d9f3f5..0f38a49369 100644 --- a/lib/omb.php +++ b/lib/omb.php @@ -167,6 +167,7 @@ class StatusNet_OMB_Service_Consumer extends OMB_Service_Consumer { $this->datastore = omb_oauth_datastore(); $this->oauth_consumer = omb_oauth_consumer(); $this->fetcher = Auth_Yadis_Yadis::getHTTPFetcher(); + $this->fetcher->timeout = intval(common_config('omb', 'timeout')); } } From a3a2168292855ce99246b6244084be58552e8172 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 15:44:07 -0800 Subject: [PATCH 08/10] Fix regression in password settings: users have been unable to change their passwords since introduction of ChangePassword event (later StartChangePassword) November 5 in commit d6ddb84132d7b9510ba82064c67f2a39822dab49 Logic was inversed; new password was only being saved if a plugin claimed the event; so when no auth plugin was present to take it, passwords never got saved. --- actions/passwordsettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/passwordsettings.php b/actions/passwordsettings.php index 4395f772bd..3bb8e3bb9f 100644 --- a/actions/passwordsettings.php +++ b/actions/passwordsettings.php @@ -170,7 +170,7 @@ class PasswordsettingsAction extends AccountSettingsAction } $success = false; - if(! Event::handle('StartChangePassword', array($user, $oldpassword, $newpassword))){ + if(Event::handle('StartChangePassword', array($user, $oldpassword, $newpassword))){ //no handler changed the password, so change the password internally $original = clone($user); From 2f0acd88e85d745b40423c1a6d9375fdb685a38f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 2 Dec 2009 11:22:30 +0100 Subject: [PATCH 09/10] Updated theme readme --- theme/{readme.txt => README} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename theme/{readme.txt => README} (87%) diff --git a/theme/readme.txt b/theme/README similarity index 87% rename from theme/readme.txt rename to theme/README index d030f2db4d..266a89fdf9 100644 --- a/theme/readme.txt +++ b/theme/README @@ -1,10 +1,10 @@ -/** Howto: create a statusnet theme +/** Howto: create a StatusNet theme * * @package StatusNet - * @author Sarven Capadisli - * @copyright 2009 Control Yourself, Inc. + * @author Sarven Capadisli + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ Location of key paths and files under theme/: From 14eeef4ac49e5f8c49446c1ac20654d6300ce00b Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 2 Dec 2009 13:45:54 +0100 Subject: [PATCH 10/10] Using box-shadow only on the current navigation item --- theme/default/css/display.css | 2 +- theme/identica/css/display.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/default/css/display.css b/theme/default/css/display.css index c29bff5b06..5ac04860cf 100644 --- a/theme/default/css/display.css +++ b/theme/default/css/display.css @@ -182,7 +182,7 @@ border-color:transparent; background-color:#FFFFFF; } -#site_nav_local_views li { +#site_nav_local_views li.current { box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css index cbad76fc53..768a11fb8b 100644 --- a/theme/identica/css/display.css +++ b/theme/identica/css/display.css @@ -182,7 +182,7 @@ border-color:transparent; background-color:#FFFFFF; } -#site_nav_local_views li { +#site_nav_local_views li.current { box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -moz-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5); -webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);