Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x

This commit is contained in:
Evan Prodromou 2009-12-02 11:07:57 -05:00
commit 4205d25d22
12 changed files with 28 additions and 19 deletions

View File

@ -79,7 +79,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction
$this->source = $this->trimmed('source'); // Not supported by Twitter. $this->source = $this->trimmed('source'); // Not supported by Twitter.
$reserved_sources = array('web', 'omb', 'mail', 'xmpp', 'api'); $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'; $source = 'api';
} }

View File

@ -96,7 +96,7 @@ class ApiGroupShowAction extends ApiPrivateAuthAction
switch($this->format) { switch($this->format) {
case 'xml': case 'xml':
$this->show_single_xml_group($this->group); $this->showSingleXmlGroup($this->group);
break; break;
case 'json': case 'json':
$this->showSingleJsonGroup($this->group); $this->showSingleJsonGroup($this->group);

View File

@ -170,7 +170,7 @@ class PasswordsettingsAction extends AccountSettingsAction
} }
$success = false; $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 //no handler changed the password, so change the password internally
$original = clone($user); $original = clone($user);

View File

@ -11,6 +11,7 @@ VALUES
('cliqset', 'Cliqset', 'http://www.cliqset.com/', now()), ('cliqset', 'Cliqset', 'http://www.cliqset.com/', now()),
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', 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()), ('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()), ('eventbox','EventBox','http://thecosmicmachine.com/eventbox/ ', now()),
('Facebook','Facebook','http://apps.facebook.com/identica/', now()), ('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
('feed2omb','feed2omb','http://projects.ciarang.com/p/feed2omb/', now()), ('feed2omb','feed2omb','http://projects.ciarang.com/p/feed2omb/', now()),

View File

@ -1142,10 +1142,15 @@ class ApiAction extends Action
function getTargetUser($id) function getTargetUser($id)
{ {
if (!preg_match('/^[a-zA-Z0-9]+$/', $id)) { if (empty($id)) {
// Twitter supports these other ways of passing the user 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 // This is to ensure that a non-numeric user_id still
// overrides screen_name even if it doesn't get used // overrides screen_name even if it doesn't get used
if (is_numeric($this->arg('user_id'))) { if (is_numeric($this->arg('user_id'))) {
@ -1154,12 +1159,6 @@ class ApiAction extends Action
} else if ($this->arg('screen_name')) { } else if ($this->arg('screen_name')) {
$nickname = common_canonical_nickname($this->arg('screen_name')); $nickname = common_canonical_nickname($this->arg('screen_name'));
return User::staticGet('nickname', $nickname); 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 { } else {
// Fall back to trying the currently authenticated user // Fall back to trying the currently authenticated user
return $this->auth_user; return $this->auth_user;

View File

@ -226,4 +226,6 @@ $default =
array('contentlimit' => null), array('contentlimit' => null),
'location' => 'location' =>
array('namespace' => 1), // 1 = geonames, 2 = Yahoo Where on Earth 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
); );

View File

@ -167,6 +167,7 @@ class StatusNet_OMB_Service_Consumer extends OMB_Service_Consumer {
$this->datastore = omb_oauth_datastore(); $this->datastore = omb_oauth_datastore();
$this->oauth_consumer = omb_oauth_consumer(); $this->oauth_consumer = omb_oauth_consumer();
$this->fetcher = Auth_Yadis_Yadis::getHTTPFetcher(); $this->fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
$this->fetcher->timeout = intval(common_config('omb', 'timeout'));
} }
} }

View File

@ -358,6 +358,10 @@ class Router
// users // users
$m->connect('api/users/show.:format',
array('action' => 'ApiUserShow',
'format' => '(xml|json)'));
$m->connect('api/users/show/:id.:format', $m->connect('api/users/show/:id.:format',
array('action' => 'ApiUserShow', array('action' => 'ApiUserShow',
'id' => '[a-zA-Z0-9]+', 'id' => '[a-zA-Z0-9]+',

View File

@ -2,10 +2,12 @@
all : translations all : translations
translations : */LC_MESSAGES/statusnet.mo trans = $(patsubst %.po,%.mo,$(wildcard */LC_MESSAGES/statusnet.po))
translations : $(trans)
clean : clean :
rm -f */LC_MESSAGES/statusnet.mo rm -f $(trans)
%.mo : %.po %.mo : %.po
msgfmt -o $@ $< msgfmt -o $@ $<

View File

@ -1,10 +1,10 @@
/** Howto: create a statusnet theme /** Howto: create a StatusNet theme
* *
* @package StatusNet * @package StatusNet
* @author Sarven Capadisli <csarven@status.net> * @author Sarven Capadisli <csarven@status.net>
* @copyright 2009 Control Yourself, Inc. * @copyright 2009 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @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/: Location of key paths and files under theme/:

View File

@ -182,7 +182,7 @@ border-color:transparent;
background-color:#FFFFFF; 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); box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);
-moz-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); -webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);

View File

@ -182,7 +182,7 @@ border-color:transparent;
background-color:#FFFFFF; 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); box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);
-moz-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); -webkit-box-shadow:3px 7px 5px rgba(194, 194, 194, 0.5);