From 0b6994516c91890753a1b18404f77a60de543980 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Fri, 5 Jun 2009 01:01:25 -0400 Subject: Cleaning up comments at top of favor.php. --- actions/favor.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/actions/favor.php b/actions/favor.php index 3b7d979eb..a7aff87f2 100644 --- a/actions/favor.php +++ b/actions/favor.php @@ -12,8 +12,6 @@ * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://laconi.ca/ * - -/* * Laconica - a distributed open-source microblogging tool * Copyright (C) 2008, Controlez-Vous, Inc. * -- cgit v1.2.3-54-g00ecf From 40e05a3e86559bb9bd7094519003d3c7d90501a5 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Fri, 5 Jun 2009 12:53:17 -0400 Subject: Bringing users/show in line with Twitter as far as specifying user. --- actions/twitapiusers.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/actions/twitapiusers.php b/actions/twitapiusers.php index b90bbfa98..0461efcb4 100644 --- a/actions/twitapiusers.php +++ b/actions/twitapiusers.php @@ -35,20 +35,13 @@ class TwitapiusersAction extends TwitterapiAction $user = null; $email = $this->arg('email'); - $user_id = $this->arg('user_id'); // XXX: email field deprecated in Twitter's API - // XXX: Also: need to add screen_name param - if ($email) { $user = User::staticGet('email', $email); - } elseif ($user_id) { - $user = $this->get_user($user_id); - } elseif (isset($apidata['api_arg'])) { + } else { $user = $this->get_user($apidata['api_arg']); - } elseif (isset($apidata['user'])) { - $user = $apidata['user']; } if (!$user) { -- cgit v1.2.3-54-g00ecf From 10d4191bd103d177734ce4cf8006cd7af88e139b Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 11 Jun 2009 13:07:41 +0000 Subject: Add site-wide option to change the length at which URLs are auto-shortened --- README | 3 +++ lib/Shorturl_api.php | 2 +- lib/common.php | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README b/README index 769c416d3..679a096b3 100644 --- a/README +++ b/README @@ -901,6 +901,9 @@ sslserver: use an alternate server name for SSL URLs, like parameters correctly so that both the SSL server and the "normal" server can access the session cookie and preferably other cookies as well. +shorturllength: Length of URL at which URLs in a message exceeding 140 + characters will be sent to the user's chosen + shortening service. db -- diff --git a/lib/Shorturl_api.php b/lib/Shorturl_api.php index fe106cb83..d1fc5eb6d 100644 --- a/lib/Shorturl_api.php +++ b/lib/Shorturl_api.php @@ -39,7 +39,7 @@ class ShortUrlApi } private function is_long($url) { - return strlen($url) >= 30; + return strlen($url) >= common_config('site', 'shorturllength'); } protected function http_post($data) { diff --git a/lib/common.php b/lib/common.php index 01d2c78ea..151b31d80 100644 --- a/lib/common.php +++ b/lib/common.php @@ -89,6 +89,7 @@ $config = 'private' => false, 'ssl' => 'never', 'sslserver' => null, + 'shorturllength' => 30, 'dupelimit' => 60), # default for same person saying the same thing 'syslog' => array('appname' => 'laconica', # for syslog -- cgit v1.2.3-54-g00ecf From 91684830e55dd0e6a9e069ff140e17a929dd2364 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 6 Jul 2009 15:49:26 -0700 Subject: fix bad function call --- actions/twitapiusers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/twitapiusers.php b/actions/twitapiusers.php index 0461efcb4..a47fdfbc3 100644 --- a/actions/twitapiusers.php +++ b/actions/twitapiusers.php @@ -45,7 +45,7 @@ class TwitapiusersAction extends TwitterapiAction } if (!$user) { - $this->client_error(_('Not found.'), 404, $apidata['content-type']); + $this->clientError(_('Not found.'), 404, $apidata['content-type']); return; } -- cgit v1.2.3-54-g00ecf