X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=535c36d235f0fe81ac87c03def37bf9b937df46d;hb=12d7ca9b84cfbdae25144770d48092c58f46d783;hp=f77f81e7d7f70c5165e9b6eacdc3a9a7663454fb;hpb=be40d9d265185d58d83c8f70ba1b7a60a9d68c56;p=friendica.git diff --git a/include/text.php b/include/text.php index f77f81e7d7..535c36d235 100644 --- a/include/text.php +++ b/include/text.php @@ -276,17 +276,17 @@ function paginate_data(&$a, $count=null) { $stripped = trim($stripped,'/'); $pagenum = $a->pager['page']; - if (($a->page_offset != "") AND !strstr($stripped, "&offset=")) + if (($a->page_offset != "") AND !preg_match('/[?&].offset=/', $stripped)) $stripped .= "&offset=".urlencode($a->page_offset); - if (!strpos($stripped, "?")) { - if ($pos = strpos($stripped, "&")) - $stripped = substr($stripped, 0, $pos)."?".substr($stripped, $pos + 1); - } $url = $a->get_baseurl() . '/' . $stripped; $data = array(); function _l(&$d, $name, $url, $text, $class="") { + if (!strpos($url, "?")) { + if ($pos = strpos($url, "&")) + $url = substr($url, 0, $pos)."?".substr($url, $pos + 1); + } $d[$name] = array('url'=>$url, 'text'=>$text, 'class'=>$class); } @@ -385,6 +385,18 @@ function alt_pager(&$a, $i) { }} +if(! function_exists('scroll_loader')) { +/** + * Loader for infinite scrolling + * @return string html for loader + */ +function scroll_loader() { + $tpl = get_markup_template("scroll_loader.tpl"); + return replace_macros($tpl, array( + 'wait' => t('Loading more entries...'), + 'end' => t('The end') + )); +}} if(! function_exists('expand_acl')) { /**