From 9cab8ae58a29ecf7387e6865aa170715caeabf04 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Tue, 30 Dec 2014 19:57:12 +0100 Subject: Language names via intl library. Fixes #773 --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index cd34fd88d..ca9c51bc3 100644 --- a/include/text.php +++ b/include/text.php @@ -1629,7 +1629,7 @@ function lang_selector() { $ll = substr($l,5); $ll = substr($ll,0,strrpos($ll,'/')); $selected = (($ll === $a->language && (x($_SESSION, 'language'))) ? $ll : $selected); - $lang_options[$ll]=$ll; + $lang_options[$ll] = get_language_name($ll, $ll) . " ($ll)"; } } -- cgit v1.2.3 From 4f35efa0bad4ae6489b63f3eebafe6542d654094 Mon Sep 17 00:00:00 2001 From: RedMatrix Date: Wed, 31 Dec 2014 10:43:19 +1100 Subject: Revert "Language names via intl library." --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index ca9c51bc3..cd34fd88d 100644 --- a/include/text.php +++ b/include/text.php @@ -1629,7 +1629,7 @@ function lang_selector() { $ll = substr($l,5); $ll = substr($ll,0,strrpos($ll,'/')); $selected = (($ll === $a->language && (x($_SESSION, 'language'))) ? $ll : $selected); - $lang_options[$ll] = get_language_name($ll, $ll) . " ($ll)"; + $lang_options[$ll]=$ll; } } -- cgit v1.2.3 From 7bf7f8180dbc3a89824815de3bc1e4f40857d2f6 Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Wed, 31 Dec 2014 10:42:08 +0100 Subject: Revert "Revert "Language names via intl library."" This reverts commit 4f35efa0bad4ae6489b63f3eebafe6542d654094. --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index cd34fd88d..ca9c51bc3 100644 --- a/include/text.php +++ b/include/text.php @@ -1629,7 +1629,7 @@ function lang_selector() { $ll = substr($l,5); $ll = substr($ll,0,strrpos($ll,'/')); $selected = (($ll === $a->language && (x($_SESSION, 'language'))) ? $ll : $selected); - $lang_options[$ll]=$ll; + $lang_options[$ll] = get_language_name($ll, $ll) . " ($ll)"; } } -- cgit v1.2.3 From 1cfff44535678276d83ded807e5c1c7e7c6f18b1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 6 Jan 2015 13:42:55 -0800 Subject: lines reversed in handle_tag() --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index ca9c51bc3..edcd087a6 100644 --- a/include/text.php +++ b/include/text.php @@ -2207,10 +2207,10 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag) { if(strrpos($newname,'+')) { //get the id + $tagcid = substr($newname,strrpos($newname,'+') + 1); + if(strrpos($tagcid,' ')) $tagcid = substr($tagcid,0,strrpos($tagcid,' ')); - - $tagcid = substr($newname,strrpos($newname,'+') + 1); if(strlen($tagcid) < 16) $abook_id = intval($tagcid); -- cgit v1.2.3 From aa490a39bb32aed4f8ea4ffcf7134b900d245b5c Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 8 Jan 2015 16:02:15 -0800 Subject: include channel clones in PM deliveries (also some whitespace edits) --- include/text.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index edcd087a6..e0bf393e5 100644 --- a/include/text.php +++ b/include/text.php @@ -6,8 +6,8 @@ require_once("include/smarty.php"); /** * This is our template processor - * - * @param string|FriendicaSmarty $s the string requiring macro substitution, + * + * @param string|FriendicaSmarty $s the string requiring macro substitution, * or an instance of FriendicaSmarty * @param array $r key value pairs (search => replace) * @return string substituted string @@ -17,10 +17,10 @@ function replace_macros($s,$r) { $arr = array('template' => $s, 'params' => $r); call_hooks('replace_macros', $arr); - + $t = $a->template_engine(); $output = $t->replace_macros($arr['template'],$arr['params']); - + return $output; } @@ -40,7 +40,7 @@ function random_string($size = 64,$type = RANDOM_STRING_HEX) { } /** - * This is our primary input filter. + * This is our primary input filter. * * The high bit hack only involved some old IE browser, forget which (IE5/Mac?) * that had an XSS attack vector due to stripping the high-bit on an 8-bit character @@ -105,7 +105,7 @@ function z_input_filter($channel_id,$s,$type = 'text/bbcode') { return purify_html($s); return escape_tags($s); - + } @@ -316,23 +316,23 @@ function paginate(&$a) { if($a->pager['total'] > $a->pager['itemspage']) { $o .= '
'; - if($a->pager['page'] != 1) + if($a->pager['page'] != 1) $o .= ''."pager['page'] - 1).'">' . t('prev') . ' '; $o .= "" . t('first') . " "; - $numpages = $a->pager['total'] / $a->pager['itemspage']; + $numpages = $a->pager['total'] / $a->pager['itemspage']; $numstart = 1; - $numstop = $numpages; + $numstop = $numpages; - if($numpages > 14) { - $numstart = (($pagenum > 7) ? ($pagenum - 7) : 1); - $numstop = (($pagenum > ($numpages - 7)) ? $numpages : ($numstart + 14)); - } + if($numpages > 14) { + $numstart = (($pagenum > 7) ? ($pagenum - 7) : 1); + $numstop = (($pagenum > ($numpages - 7)) ? $numpages : ($numstart + 14)); + } for($i = $numstart; $i <= $numstop; $i++){ - if($i == $a->pager['page']) + if($i == $a->pager['page']) $o .= ''.(($i < 10) ? ' '.$i : $i); else $o .= "".(($i < 10) ? ' '.$i : $i).""; @@ -350,7 +350,7 @@ function paginate(&$a) { $lastpage = (($numpages > intval($numpages)) ? intval($numpages)+1 : $numpages); $o .= "" . t('last') . " "; - if(($a->pager['total'] - ($a->pager['itemspage'] * $a->pager['page'])) > 0) + if(($a->pager['total'] - ($a->pager['itemspage'] * $a->pager['page'])) > 0) $o .= ''."pager['page'] + 1).'">' . t('next') . ''; $o .= '
'."\r\n"; } -- cgit v1.2.3