Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x

This commit is contained in:
Evan Prodromou 2009-05-26 15:22:59 -04:00
commit 1306deff38
2 changed files with 33 additions and 33 deletions

View File

@ -17,7 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
if (!defined('LACONICA')) { exit(1); } if (!defined('LACONICA')) {
exit(1);
}
require_once(INSTALLDIR.'/lib/facebookaction.php'); require_once(INSTALLDIR.'/lib/facebookaction.php');
@ -67,7 +69,7 @@ class FacebookinviteAction extends FacebookAction
function showSuccessContent() function showSuccessContent()
{ {
$this->element('h2', null, sprintf(_('Thanks for inviting your friends to use %s'), $this->element('h2', null, sprintf(_('Thanks for inviting your friends to use %s'),
common_config('site', 'name'))); common_config('site', 'name')));
$this->element('p', null, _('Invitations have been sent to the following users:')); $this->element('p', null, _('Invitations have been sent to the following users:'));
@ -89,16 +91,6 @@ class FacebookinviteAction extends FacebookAction
function showFormContent() function showFormContent()
{ {
// Get a list of users who are already using the app for exclusion
$exclude_ids = $this->facebook->api_client->friends_getAppUsers();
$exclude_ids_csv = null;
// fbml needs these as a csv string, not an array
if ($exclude_ids) {
$exclude_ids_csv = implode(',', $exclude_ids);
}
$content = sprintf(_('You have been invited to %s'), common_config('site', 'name')) . $content = sprintf(_('You have been invited to %s'), common_config('site', 'name')) .
htmlentities('<fb:req-choice url="' . $this->app_uri . '" label="Add"/>'); htmlentities('<fb:req-choice url="' . $this->app_uri . '" label="Add"/>');
@ -109,36 +101,43 @@ class FacebookinviteAction extends FacebookAction
'content' => $content)); 'content' => $content));
$this->hidden('invite', 'true'); $this->hidden('invite', 'true');
$actiontext = sprintf(_('Invite your friends to use %s'), common_config('site', 'name')); $actiontext = sprintf(_('Invite your friends to use %s'), common_config('site', 'name'));
$multi_params = array('showborder' => 'false'); $multi_params = array('showborder' => 'false');
$multi_params['actiontext'] = $actiontext; $multi_params['actiontext'] = $actiontext;
$multi_params['bypass'] = 'cancel';
if ($exclude_ids_csv) {
// Get a list of users who are already using the app for exclusion
$exclude_ids = $this->facebook->api_client->friends_getAppUsers();
$exclude_ids_csv = null;
// fbml needs these as a csv string, not an array
if ($exclude_ids) {
$exclude_ids_csv = implode(',', $exclude_ids);
$multi_params['exclude_ids'] = $exclude_ids_csv; $multi_params['exclude_ids'] = $exclude_ids_csv;
} }
$multi_params['bypass'] = 'cancel';
$this->element('fb:multi-friend-selector', $multi_params); $this->element('fb:multi-friend-selector', $multi_params);
$this->elementEnd('fb:request-form'); $this->elementEnd('fb:request-form');
$this->element('h2', null, sprintf(_('Friends already using %s:'), if ($exclude_ids) {
common_config('site', 'name')));
$this->elementStart('ul', array('id' => 'facebook-friends'));
foreach ($exclude_ids as $friend) {
$this->elementStart('li');
$this->element('fb:profile-pic', array('uid' => $friend, 'size' => 'square'));
$this->element('fb:name', array('uid' => $friend,
'capitalize' => 'true'));
$this->elementEnd('li');
}
$this->elementEnd("ul"); $this->element('h2', null, sprintf(_('Friends already using %s:'),
common_config('site', 'name')));
$this->elementStart('ul', array('id' => 'facebook-friends'));
foreach ($exclude_ids as $friend) {
$this->elementStart('li');
$this->element('fb:profile-pic', array('uid' => $friend, 'size' => 'square'));
$this->element('fb:name', array('uid' => $friend,
'capitalize' => 'true'));
$this->elementEnd('li');
}
$this->elementEnd("ul");
}
} }
function title() function title()
{ {
return sprintf(_('Send invitations')); return sprintf(_('Send invitations'));
} }

View File

@ -7,6 +7,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()),
('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()),
('gravity', 'Gravity', 'http://mobileways.de/gravity', now()), ('gravity', 'Gravity', 'http://mobileways.de/gravity', now()),