summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php2
-rw-r--r--lib/groupnav.php6
-rw-r--r--lib/language.php81
-rw-r--r--lib/logingroupnav.php2
-rw-r--r--lib/subs.php34
-rw-r--r--lib/twitterapi.php2
-rw-r--r--lib/util.php2
7 files changed, 58 insertions, 71 deletions
diff --git a/lib/common.php b/lib/common.php
index 1068d4c13..a2f9b9bfe 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -19,7 +19,7 @@
if (!defined('LACONICA')) { exit(1); }
-define('LACONICA_VERSION', '0.6.4.1');
+define('LACONICA_VERSION', '0.7.0');
define('AVATAR_PROFILE_SIZE', 96);
define('AVATAR_STREAM_SIZE', 48);
diff --git a/lib/groupnav.php b/lib/groupnav.php
index 32803fd42..90bdc1014 100644
--- a/lib/groupnav.php
+++ b/lib/groupnav.php
@@ -101,6 +101,12 @@ class GroupNav extends Widget
sprintf(_('Edit %s group properties'), $nickname),
$action_name == 'editgroup',
'nav_group_admin');
+ $this->out->menuItem(common_local_url('grouplogo', array('nickname' =>
+ $nickname)),
+ _('Logo'),
+ sprintf(_('Add or edit %s logo'), $nickname),
+ $action_name == 'grouplogo',
+ 'nav_group_logo');
}
$this->out->elementEnd('ul');
}
diff --git a/lib/language.php b/lib/language.php
index 1d00cc31e..a73b73f28 100644
--- a/lib/language.php
+++ b/lib/language.php
@@ -99,54 +99,35 @@ function get_nice_language_list()
*
* @return array mapping of language codes to language info
*/
-
-function get_all_languages()
-{
- return
- array('en-us' => array('q' => 1, 'lang' => 'en_US',
- 'name' => 'English (US)', 'direction' => 'ltr'),
- 'en-nz' => array('q' => 1, 'lang' => 'en_NZ',
- 'name' => 'English (NZ)', 'direction' => 'ltr'),
- 'en-gb' => array('q' => 1, 'lang' => 'en_GB',
- 'name' => 'English (British)', 'direction' => 'ltr'),
- 'en' => array('q' => 1, 'lang' => 'en',
- 'name' => 'English', 'direction' => 'ltr'),
- 'da' => array('q' => 0.1, 'lang' => 'da_DK',
- 'name' => 'Danish', 'direction' => 'ltr'),
- 'nl' => array('q' => 1, 'lang' => 'nl_NL',
- 'name' => 'Dutch', 'direction' => 'ltr'),
- 'eo' => array('q' => 0.1, 'lang' => 'eo',
- 'name' => 'Esperanto', 'direction' => 'ltr'),
- 'fr-fr' => array('q' => 0.9, 'lang' => 'fr_FR',
- 'name' => 'French', 'direction' => 'ltr'),
- 'de' => array('q' => 1, 'lang' => 'de_DE',
- 'name' => 'German', 'direction' => 'ltr'),
- 'it' => array('q' => 1, 'lang' => 'it_IT',
- 'name' => 'Italian', 'direction' => 'ltr'),
- 'ko' => array('q' => 0.1, 'lang' => 'ko',
- 'name' => 'Korean', 'direction' => 'ltr'),
- 'nb' => array('q' => 1, 'lang' => 'nb_NO',
- 'name' => 'Norwegian (bokmal)', 'direction' => 'ltr'),
- 'pt' => array('q' => 0.2, 'lang' => 'pt',
- 'name' => 'Portuguese', 'direction' => 'ltr'),
- 'pt-br' => array('q' => 1, 'lang' => 'pt_BR',
- 'name' => 'Portuguese Brazil', 'direction' => 'ltr'),
- 'es' => array('q' => 1, 'lang' => 'es',
- 'name' => 'Spanish', 'direction' => 'ltr'),
- 'tr' => array('q' => 1, 'lang' => 'tr_TR',
- 'name' => 'Turkish', 'direction' => 'ltr'),
- 'uk' => array('q' => 1, 'lang' => 'uk_UA',
- 'name' => 'Ukrainian', 'direction' => 'ltr'),
- 'pl' => array('q' => 1, 'lang' => 'pl_PL',
- 'name' => 'Polish', 'direction' => 'ltr'),
- 'mk' => array('q' => 1, 'lang' => 'mk_MK',
- 'name' => 'Macedonian', 'direction' => 'ltr'),
- 'jp' => array('q' => 0.1, 'lang' => 'ja_JP',
- 'name' => 'Japanese', 'direction' => 'ltr'),
- 'cs' => array('q' => 1, 'lang' => 'cs_CZ',
- 'name' => 'Czech', 'direction' => 'ltr'),
- 'ca' => array('q' => 1, 'lang' => 'ca_ES',
- 'name' => 'Catalan', 'direction' => 'ltr'),
- );
+function get_all_languages() {
+ return array(
+ 'bg' => array('q' => 0.8, 'lang' => 'bg_BG', 'name' => 'Bulgarian', 'direction' => 'ltr'),
+ 'ca' => array('q' => 0.5, 'lang' => 'ca_ES', 'name' => 'Catalan', 'direction' => 'ltr'),
+ 'cs' => array('q' => 0.5, 'lang' => 'cs_CZ', 'name' => 'Czech', 'direction' => 'ltr'),
+ 'de' => array('q' => 0.5, 'lang' => 'de_DE', 'name' => 'German', 'direction' => 'ltr'),
+ 'el' => array('q' => 0.1, 'lang' => 'el', 'name' => 'Greek', 'direction' => 'ltr'),
+ 'en-us' => array('q' => 1, 'lang' => 'en_US', 'name' => 'English (US)', 'direction' => 'ltr'),
+ 'en-gb' => array('q' => 0.3, 'lang' => 'en_GB', 'name' => 'English (British)', 'direction' => 'ltr'),
+ 'en' => array('q' => 1, 'lang' => 'en', 'name' => 'English', 'direction' => 'ltr'),
+ 'es' => array('q' => 0.5, 'lang' => 'es', 'name' => 'Spanish', 'direction' => 'ltr'),
+ 'fr-fr' => array('q' => 0.2, 'lang' => 'fr_FR', 'name' => 'French', 'direction' => 'ltr'),
+ 'he' => array('q' => 0.5, 'lang' => 'he_IL', 'name' => 'Hebrew', 'direction' => 'ltr'),
+ 'it' => array('q' => 0.9, 'lang' => 'it_IT', 'name' => 'Italian', 'direction' => 'rtl'),
+ 'jp' => array('q' => 0.5, 'lang' => 'ja_JP', 'name' => 'Japanese', 'direction' => 'ltr'),
+# 'ko' => array('q' => 0, 'lang' => 'ko', 'name' => 'Korean', 'direction' => 'ltr'),
+ 'mk' => array('q' => 0.5, 'lang' => 'mk_MK', 'name' => 'Macedonian', 'direction' => 'ltr'),
+ 'nb' => array('q' => 0.1, 'lang' => 'nb_NO', 'name' => 'Norwegian (bokmal)', 'direction' => 'ltr'),
+ 'nl' => array('q' => 0.5, 'lang' => 'nl_NL', 'name' => 'Dutch', 'direction' => 'ltr'),
+ 'pl' => array('q' => 0.5, 'lang' => 'pl_PL', 'name' => 'Polish', 'direction' => 'ltr'),
+# 'pt' => array('q' => 0, 'lang' => 'pt', 'name' => 'Portuguese', 'direction' => 'ltr'),
+ 'pt-br' => array('q' => 0.7, 'lang' => 'pt_BR', 'name' => 'Portuguese Brazil', 'direction' => 'ltr'),
+ 'ru' => array('q' => 0.1, 'lang' => 'ru_RU', 'name' => 'Russian', 'direction' => 'ltr'),
+ 'sv' => array('q' => 0.9, 'lang' => 'sv_SE', 'name' => 'Swedish', 'direction' => 'ltr'),
+ 'te' => array('q' => 0.3, 'lang' => 'te_IN', 'name' => 'Telugu', 'direction' => 'ltr'),
+ 'tr' => array('q' => 0.5, 'lang' => 'tr_TR', 'name' => 'Turkish', 'direction' => 'ltr'),
+ 'uk' => array('q' => 0.7, 'lang' => 'uk_UA', 'name' => 'Ukrainian', 'direction' => 'ltr'),
+ 'vi' => array('q' => 0.7, 'lang' => 'vi_VN', 'name' => 'Vietnamese', 'direction' => 'ltr'),
+ 'zh-cn' => array('q' => 0.9, 'lang' => 'zh_CN', 'name' => 'Chinese (Simplified)', 'direction' => 'ltr'),
+ 'zh-hant' => array('q' => 0.2, 'lang' => 'zh_hant', 'name' => 'Chinese (Taiwanese)', 'direction' => 'ltr'),
+ );
}
-
diff --git a/lib/logingroupnav.php b/lib/logingroupnav.php
index 8c03eccea..fd909581f 100644
--- a/lib/logingroupnav.php
+++ b/lib/logingroupnav.php
@@ -77,7 +77,7 @@ class LoginGroupNav extends Widget
'register' =>
array(_('Register'),
_('Sign up for a new account')),
- 'openid' =>
+ 'openidlogin' =>
array(_('OpenID'),
_('Login or register with OpenID')));
diff --git a/lib/subs.php b/lib/subs.php
index 6fa1dcad3..0e7b9ded5 100644
--- a/lib/subs.php
+++ b/lib/subs.php
@@ -60,23 +60,22 @@ function subs_subscribe_to($user, $other)
subs_notify($other, $user);
- if (common_config('memcached', 'enabled')) {
- $cache = new Memcache();
- if ($cache->connect(common_config('memcached', 'server'), common_config('memcached', 'port'))) {
- $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
- }
- }
+ $cache = common_memcache();
+
+ if ($cache) {
+ $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
+ }
+
if ($other->autosubscribe && !$other->isSubscribed($user) && !$user->hasBlocked($other)) {
if (!$other->subscribeTo($user)) {
return _('Could not subscribe other to you.');
}
- if (common_config('memcached', 'enabled')) {
- $cache = new Memcache();
- if ($cache->connect(common_config('memcached', 'server'), common_config('memcached', 'port'))) {
- $cache->delete(common_cache_key('user:notices_with_friends:' . $other->id));
- }
- }
+ $cache = common_memcache();
+
+ if ($cache) {
+ $cache->delete(common_cache_key('user:notices_with_friends:' . $other->id));
+ }
subs_notify($user, $other);
}
@@ -134,12 +133,11 @@ function subs_unsubscribe_to($user, $other)
if (!$sub->delete())
return _('Couldn\'t delete subscription.');
- if (common_config('memcached', 'enabled')) {
- $cache = new Memcache();
- if ($cache->connect(common_config('memcached', 'server'), common_config('memcached', 'port'))) {
- $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
- }
- }
+ $cache = common_memcache();
+
+ if ($cache) {
+ $cache->delete(common_cache_key('user:notices_with_friends:' . $user->id));
+ }
return true;
}
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index 27d84a880..da8b8b1e5 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -690,4 +690,4 @@ class TwitterapiAction extends Action
}
-} \ No newline at end of file
+}
diff --git a/lib/util.php b/lib/util.php
index 4b77f7c19..723b2f250 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -900,6 +900,8 @@ function common_fancy_url($action, $args=null)
return common_path('group/'.$args['nickname'].'/rss');
case 'groupmembers':
return common_path('group/'.$args['nickname'].'/members');
+ case 'grouplogo':
+ return common_path('group/'.$args['nickname'].'/logo');
case 'usergroups':
return common_path($args['nickname'].'/groups');
case 'groups':