aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2018-04-19 09:51:58 +0200
committerGitHub <noreply@github.com>2018-04-19 09:51:58 +0200
commitc8ff773b9609f723217712f0faf451238d41327d (patch)
tree4127afeee7d8a3b710863d9ad022fed2b82a8ebc /include/text.php
parent283e5d3a5c9557195a640de5f0acefc884e904bb (diff)
parent92b08f1f07a25976342dc885331ecb1531e256aa (diff)
downloadvolse-hubzilla-c8ff773b9609f723217712f0faf451238d41327d.tar.gz
volse-hubzilla-c8ff773b9609f723217712f0faf451238d41327d.tar.bz2
volse-hubzilla-c8ff773b9609f723217712f0faf451238d41327d.zip
Merge pull request #9 from redmatrix/dev
Dev
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 13c4bb819..55fc49560 100644
--- a/include/text.php
+++ b/include/text.php
@@ -531,7 +531,7 @@ function paginate(&$a) {
}
-function alt_pager(&$a, $i, $more = '', $less = '') {
+function alt_pager($i, $more = '', $less = '') {
if(! $more)
$more = t('older');
@@ -2324,6 +2324,23 @@ function stringify_array_elms(&$arr, $escape = false) {
$arr[$x] = "'" . (($escape) ? dbesc($arr[$x]) : $arr[$x]) . "'";
}
+
+/**
+ * @brief Similar to stringify_array_elms but returns a string. If $escape is true, dbesc() each element before adding quotes.
+ *
+ * @param array $arr
+ * @param boolean $escape (optional) default false
+ * @return string
+ */
+function stringify_array($arr, $escape = false) {
+ if($arr) {
+ stringify_array_elms($arr);
+ return(implode(',',$arr));
+ }
+ return EMPTY_STR;
+}
+
+
/**
* @brief Indents a flat JSON string to make it more human-readable.
*
@@ -2387,7 +2404,7 @@ function jindent($json) {
*/
function design_tools() {
- $channel = App::get_channel();
+ $channel = channelx_by_n(App::$profile['profile_uid']);
$sys = false;
if(App::$is_sys && is_site_admin()) {