aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorDominik Dröscher <dhn2@users.sourceforge.net>2006-11-27 12:45:26 +0000
committerDominik Dröscher <dhn2@users.sourceforge.net>2006-11-27 12:45:26 +0000
commit61e2a3f5c1d43fd64e283e0fe79beee92f605999 (patch)
tree8516afd85f5aa1ca07c3ea35696fe13024680353 /phpBB/includes/functions.php
parent85a5dc01fecf98e36c1f39d9f67e8d8f2ddb534d (diff)
downloadforums-61e2a3f5c1d43fd64e283e0fe79beee92f605999.tar
forums-61e2a3f5c1d43fd64e283e0fe79beee92f605999.tar.gz
forums-61e2a3f5c1d43fd64e283e0fe79beee92f605999.tar.bz2
forums-61e2a3f5c1d43fd64e283e0fe79beee92f605999.tar.xz
forums-61e2a3f5c1d43fd64e283e0fe79beee92f605999.zip
#4892
git-svn-id: file:///svn/phpbb/trunk@6667 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index bf1883e96f..59c3d240ce 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -686,13 +686,17 @@ function tz_select($default = '', $truncate = false)
{
if ($truncate)
{
- $zone = (utf8_strlen($zone) > 70) ? utf8_substr($zone, 0, 70) . '...' : $zone;
+ $zone_trunc = truncate_string($zone, 50, false, "...");
+ }
+ else
+ {
+ $zone_trunc = $zone;
}
if (is_numeric($offset))
{
$selected = ($offset == $default) ? ' selected="selected"' : '';
- $tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
+ $tz_select .= '<option title="'.$zone.'" value="' . $offset . '"' . $selected . '>' . $zone_trunc . '</option>';
}
}
@@ -2737,11 +2741,12 @@ function get_preg_expression($mode)
* Truncates string while retaining special characters if going over the max length
* The default max length is 60 at the moment
*/
-function truncate_string($string, $max_length = 60, $allow_reply = true)
+function truncate_string($string, $max_length = 60, $allow_reply = true, $append = '')
{
$chars = array();
$strip_reply = false;
+ $stripped = false;
if ($allow_reply && strpos($string, 'Re: ') === 0)
{
$strip_reply = true;
@@ -2756,12 +2761,18 @@ function truncate_string($string, $max_length = 60, $allow_reply = true)
{
// Cut off the last elements from the array
$string = implode('', array_slice($chars, 0, $max_length));
+ $stripped = true;
}
if ($strip_reply)
{
$string = 'Re: ' . $string;
}
+
+ if ($append != '' && $stripped)
+ {
+ $string = $string . $append;
+ }
return $string;
}
-rw-r--r--perl-install/share/po/am.po2
-rw-r--r--perl-install/share/po/ar.po2
-rw-r--r--perl-install/share/po/az.po2
-rw-r--r--perl-install/share/po/be.po2
-rw-r--r--perl-install/share/po/bg.po2
-rw-r--r--perl-install/share/po/bn.po2
-rw-r--r--perl-install/share/po/br.po2
-rw-r--r--perl-install/share/po/bs.po2
-rw-r--r--perl-install/share/po/ca.po2
-rw-r--r--perl-install/share/po/cs.po2
-rw-r--r--perl-install/share/po/cy.po2
-rw-r--r--perl-install/share/po/da.po2
-rw-r--r--perl-install/share/po/de.po2
-rw-r--r--perl-install/share/po/el.po2
-rw-r--r--perl-install/share/po/eo.po2
-rw-r--r--perl-install/share/po/es.po2
-rw-r--r--perl-install/share/po/et.po2
-rw-r--r--perl-install/share/po/eu.po2
-rw-r--r--perl-install/share/po/fa.po2
-rw-r--r--perl-install/share/po/fi.po2
-rw-r--r--perl-install/share/po/fr.po2
-rw-r--r--perl-install/share/po/fur.po2
-rw-r--r--perl-install/share/po/ga.po2
-rw-r--r--perl-install/share/po/gl.po2
-rw-r--r--perl-install/share/po/he.po2
-rw-r--r--perl-install/share/po/hi.po2
-rw-r--r--perl-install/share/po/hr.po2
-rw-r--r--perl-install/share/po/hu.po2
-rw-r--r--perl-install/share/po/id.po2
-rw-r--r--perl-install/share/po/is.po2
-rw-r--r--perl-install/share/po/it.po2
-rw-r--r--perl-install/share/po/ja.po2
-rw-r--r--perl-install/share/po/ko.po2
-rw-r--r--perl-install/share/po/ky.po2
-rw-r--r--perl-install/share/po/libDrakX.pot2
-rw-r--r--perl-install/share/po/lt.po2
-rw-r--r--perl-install/share/po/ltg.po2
-rw-r--r--perl-install/share/po/lv.po2
-rw-r--r--perl-install/share/po/mk.po2
-rw-r--r--perl-install/share/po/mn.po2
-rw-r--r--perl-install/share/po/ms.po2
-rw-r--r--perl-install/share/po/mt.po2
-rw-r--r--perl-install/share/po/nb.po2
-rw-r--r--perl-install/share/po/nl.po2
-rw-r--r--perl-install/share/po/nn.po2
-rw-r--r--perl-install/share/po/pa_IN.po2
-rw-r--r--perl-install/share/po/pl.po2
-rw-r--r--perl-install/share/po/pt.po2
-rw-r--r--perl-install/share/po/pt_BR.po2
-rw-r--r--perl-install/share/po/ro.po2
-rw-r--r--perl-install/share/po/ru.po2
-rw-r--r--perl-install/share/po/sc.po2
-rw-r--r--perl-install/share/po/sk.po2
-rw-r--r--perl-install/share/po/sl.po2
-rw-r--r--perl-install/share/po/sq.po2
-rw-r--r--perl-install/share/po/sr.po2
-rw-r--r--perl-install/share/po/sr@Latn.po2
-rw-r--r--perl-install/share/po/sv.po2
-rw-r--r--perl-install/share/po/ta.po2
-rw-r--r--perl-install/share/po/tg.po2
-rw-r--r--perl-install/share/po/th.po2
-rw-r--r--perl-install/share/po/tl.po2
-rw-r--r--perl-install/share/po/tr.po2
-rw-r--r--perl-install/share/po/uk.po2
-rw-r--r--perl-install/share/po/uz.po2
-rw-r--r--perl-install/share/po/uz@cyrillic.po2
-rw-r--r--perl-install/share/po/vi.po2
-rw-r--r--perl-install/share/po/wa.po2
-rw-r--r--perl-install/share/po/zh_CN.po2
-rw-r--r--perl-install/share/po/zh_TW.po2
72 files changed, 72 insertions, 72 deletions
diff --git a/perl-install/diskdrake/smbnfs_gtk.pm b/perl-install/diskdrake/smbnfs_gtk.pm
index 74489766a..d260ce12b 100644
--- a/perl-install/diskdrake/smbnfs_gtk.pm
+++ b/perl-install/diskdrake/smbnfs_gtk.pm
@@ -208,7 +208,7 @@ sub import_tree {
gtksignal_connect($search,
clicked => sub {
$add_server->($_) foreach sort { $a->{name} cmp $b->{name} } $kind->find_servers;
- gtkset($search, text => N("Search new servers"));
+ gtkset($search, text => N("Search for new servers"));
}));
}
diff --git a/perl-install/share/po/af.po b/perl-install/share/po/af.po
index d10fc445b..bd77e3bc7 100644
--- a/perl-install/share/po/af.po
+++ b/perl-install/share/po/af.po
@@ -2278,7 +2278,7 @@ msgstr "Soek bedieners"
#: diskdrake/smbnfs_gtk.pm:211
#, c-format
-msgid "Search new servers"
+msgid "Search for new servers"
msgstr "Deursoek netnuus-bedieners"
#: do_pkgs.pm:19 do_pkgs.pm:57
diff --git a/perl-install/share/po/am.po b/perl-install/share/po/am.po
index bd4184c3a..064ee2ea7 100644
--- a/perl-install/share/po/am.po
+++ b/perl-install/share/po/am.po
@@ -2204,7 +2204,7 @@ msgstr "ሰርቨሮችን ፈልግ"
#: diskdrake/smbnfs_gtk.pm:211
#, c-format
-msgid "Search new servers"
+msgid "Search for new servers"
msgstr "አዲስ ሰርቨሮችን ፈልግ"
#: do_pkgs.pm:19 do_pkgs.pm:57
diff --git a/perl-install/share/po/ar.po b/perl-install/share/po/ar.po
index e915174a7..c7b950e21 100644
--- a/perl-install/share/po/ar.po
+++ b/perl-install/share/po/ar.po
@@ -2284,7 +2284,7 @@ msgstr "بحث في أجهزة الخادم"
#: diskdrake/smbnfs_gtk.pm:211
#, c-format
-msgid "Search new servers"
+msgid "Search for new servers"
msgstr "البحث عن خادمات جديدة"
#: do_pkgs.pm:19 do_pkgs.pm:57
diff --git a/perl-install/share/po/az.po b/perl-install/share/po/az.po
index 70fc19b87..36e9aac80 100644
--- a/perl-install/share/po/az.po
+++ b/perl-install/share/po/az.po
@@ -2282,7 +2282,7 @@ msgstr "Vericiləri axtar"
#: diskdrake/smbnfs_gtk.pm:211
#, c-format
-msgid "Search new servers"
+msgid "Search for new servers"
msgstr "Yeni vericiləri axtar"
#: do_pkgs.pm:19 do_pkgs.pm:57
diff --git a/perl-install/share/po/be.po b/perl-install/share/po/be.po
index 6557a3909..aa1c6f0aa 100644
--- a/perl-install/share/po/be.po
+++ b/perl-install/share/po/be.po
@@ -2215,7 +2215,7 @@ msgstr "Адшукаць файлы на дыску"
#: diskdrake/smbnfs_gtk.pm:211
#, c-format
-msgid "Search new servers"
+msgid "Search for new servers"
msgstr ""
#: do_pkgs.pm:19 do_pkgs.pm:57
diff --git a/perl-install/share/po/bg.po b/perl-install/share/po/bg.po
index 198820062..4a77a2cd8 100644
--- a/perl-install/share/po/bg.po
+++ b/perl-install/share/po/bg.po
@@ -2318,7 +2318,7 @@ msgstr "Търси сървъри"
#: diskdrake/smbnfs_gtk.pm:211
#, c-format
-msgid "Search new servers"
+msgid "Search for new servers"
msgstr "Търси нови сървъри"
#: do_pkgs.pm:19 do_pkgs.pm:57
diff --git a/perl-install/share/po/bn.po b/perl-install/share/po/bn.po
index 110698631..864933e80 100644
--- a/perl-install/share/po/bn.po
+++ b/perl-install/share/po/bn.po
@@ -2288,7 +2288,7 @@ msgstr "সার্ভার খোজো"
#: diskdrake/smbnfs_gtk.pm:211
#, c-format
-msgid "Search new servers"
+msgid "Search for new servers"
msgstr "নতুন সার্ভারের খোজ করো"
#: do_pkgs.pm:19 do_pkgs.pm:57
diff --git a/perl-install/share/po/br.po b/perl-install/share/po/br.po
index 2e33e7b1f..247114062 100644
--- a/perl-install/share/po/br.po
+++ b/perl-install/share/po/br.po