From a36612866e591ff8521ddd3e66f803e768bd6e83 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 30 Nov 2009 14:55:02 -0800 Subject: 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 f9b960747..aae4d249c 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); -- cgit v1.2.3-54-g00ecf From 4003e51b9149f4b8538c5c107417eb9ca9e7f949 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 1 Dec 2009 09:57:47 -0800 Subject: 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 539aac4af..e2ea87b43 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; -- cgit v1.2.3-54-g00ecf From 75914394512c8752017b8516c0d445a8ec33d1f3 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 1 Dec 2009 10:02:22 -0800 Subject: 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 beb98eb04..1a090861e 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]+', -- cgit v1.2.3-54-g00ecf From e28e8cc1d7e3c6683237c86955b7c1da23c02696 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 12:31:21 -0800 Subject: 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 fed6acc30..e6c39ce4a 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'; } -- cgit v1.2.3-54-g00ecf From 46e14c762a81e8eb3fe197a6c87c10a6521a9cc1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 20:46:52 +0000 Subject: 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 4f17f683f..00700ada1 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 $@ $< -- cgit v1.2.3-54-g00ecf From 8b63717bf9828a4219578d05ce8eeb59616fde7d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 12:55:55 -0800 Subject: 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 10ff0d55a..50660e948 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()), -- cgit v1.2.3-54-g00ecf From 15a9c869794ea3948086afa5310696e1250d9a26 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 14:38:34 -0800 Subject: 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 95366e0b3..d4ef045ea 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 e2a6d9f3f..0f38a4936 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')); } } -- cgit v1.2.3-54-g00ecf From a3a2168292855ce99246b6244084be58552e8172 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 1 Dec 2009 15:44:07 -0800 Subject: 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 4395f772b..3bb8e3bb9 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); -- cgit v1.2.3-54-g00ecf From 2f0acd88e85d745b40423c1a6d9375fdb685a38f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 2 Dec 2009 11:22:30 +0100 Subject: Updated theme readme --- theme/README | 38 ++++++++++++++++++++++++++++++++++++++ theme/readme.txt | 38 -------------------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 theme/README delete mode 100644 theme/readme.txt diff --git a/theme/README b/theme/README new file mode 100644 index 000000000..266a89fdf --- /dev/null +++ b/theme/README @@ -0,0 +1,38 @@ +/** Howto: create a StatusNet theme + * + * @package StatusNet + * @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://status.net/ + */ + +Location of key paths and files under theme/: + +./base/css/ +./base/css/display.css +./base/images/ + +./default/css/ +./default/css/display.css +./default/images/ + +./base/display.css contains layout, typography rules: +Only alter this file if you want to change the layout of the site. Please note that, any updates to this in future statusnet releases may not be compatible with your version. + +./default/css/display.css contains only the background images and colour rules: +This file is a good basis for creating your own theme. + +Let's create a theme: + +1. To start off, copy over the default theme: +cp -r default mytheme + +2. Edit your mytheme stylesheet: +nano mytheme/css/display.css + +a) Search and replace your colours and background images, or +b) Create your own layout either importing a separate stylesheet (e.g., change to @import url(base.css);) or simply place it before the rest of the rules. + +4. Set /config.php to load 'mytheme': +$config['site']['theme'] = 'mytheme'; diff --git a/theme/readme.txt b/theme/readme.txt deleted file mode 100644 index d030f2db4..000000000 --- a/theme/readme.txt +++ /dev/null @@ -1,38 +0,0 @@ -/** Howto: create a statusnet theme - * - * @package StatusNet - * @author Sarven Capadisli - * @copyright 2009 Control Yourself, Inc. - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ - */ - -Location of key paths and files under theme/: - -./base/css/ -./base/css/display.css -./base/images/ - -./default/css/ -./default/css/display.css -./default/images/ - -./base/display.css contains layout, typography rules: -Only alter this file if you want to change the layout of the site. Please note that, any updates to this in future statusnet releases may not be compatible with your version. - -./default/css/display.css contains only the background images and colour rules: -This file is a good basis for creating your own theme. - -Let's create a theme: - -1. To start off, copy over the default theme: -cp -r default mytheme - -2. Edit your mytheme stylesheet: -nano mytheme/css/display.css - -a) Search and replace your colours and background images, or -b) Create your own layout either importing a separate stylesheet (e.g., change to @import url(base.css);) or simply place it before the rest of the rules. - -4. Set /config.php to load 'mytheme': -$config['site']['theme'] = 'mytheme'; -- cgit v1.2.3-54-g00ecf From 14eeef4ac49e5f8c49446c1ac20654d6300ce00b Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 2 Dec 2009 13:45:54 +0100 Subject: 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 c29bff5b0..5ac04860c 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 cbad76fc5..768a11fb8 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); -- cgit v1.2.3-54-g00ecf