aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-08 16:03:30 -0800
committerfriendica <info@friendica.com>2015-01-08 16:03:30 -0800
commitfab09ef1bc7ebd74055f62350e7012dec09c817b (patch)
tree51ea03d8bf877a8eee3ccdeaf8c9ac441d2a3f09 /include/text.php
parent0657195125675700eeb9bcd1bc92f4299cac0304 (diff)
parent836223bf5b60a8b0db27dac9e5c183c77fa6a2e1 (diff)
downloadvolse-hubzilla-fab09ef1bc7ebd74055f62350e7012dec09c817b.tar.gz
volse-hubzilla-fab09ef1bc7ebd74055f62350e7012dec09c817b.tar.bz2
volse-hubzilla-fab09ef1bc7ebd74055f62350e7012dec09c817b.zip
Merge branch 'master' into trinidad
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php30
1 files changed, 15 insertions, 15 deletions
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 .= '<div class="pager">';
- if($a->pager['page'] != 1)
+ if($a->pager['page'] != 1)
$o .= '<span class="pager_prev">'."<a href=\"$url".'&page='.($a->pager['page'] - 1).'">' . t('prev') . '</a></span> ';
$o .= "<span class=\"pager_first\"><a href=\"$url"."&page=1\">" . t('first') . "</a></span> ";
- $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 .= '<span class="pager_current">'.(($i < 10) ? '&nbsp;'.$i : $i);
else
$o .= "<span class=\"pager_n\"><a href=\"$url"."&page=$i\">".(($i < 10) ? '&nbsp;'.$i : $i)."</a>";
@@ -350,7 +350,7 @@ function paginate(&$a) {
$lastpage = (($numpages > intval($numpages)) ? intval($numpages)+1 : $numpages);
$o .= "<span class=\"pager_last\"><a href=\"$url"."&page=$lastpage\">" . t('last') . "</a></span> ";
- if(($a->pager['total'] - ($a->pager['itemspage'] * $a->pager['page'])) > 0)
+ if(($a->pager['total'] - ($a->pager['itemspage'] * $a->pager['page'])) > 0)
$o .= '<span class="pager_next">'."<a href=\"$url"."&page=".($a->pager['page'] + 1).'">' . t('next') . '</a></span>';
$o .= '</div>'."\r\n";
}