aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorChristian Vogeley <christian.vogeley@hotmail.de>2014-03-15 21:54:10 +0100
committerChristian Vogeley <christian.vogeley@hotmail.de>2014-03-15 21:54:10 +0100
commit521b091779ddb2a4ca58c28af9312cb5bcf2dd9f (patch)
tree27d854c5b8668470a3005425e428b8c115550aad /mod
parentf0736fc955e69d4650f95dc937f26be222967199 (diff)
parent3cb179aff19d803b91261e410c50b36e4bae1246 (diff)
downloadvolse-hubzilla-521b091779ddb2a4ca58c28af9312cb5bcf2dd9f.tar.gz
volse-hubzilla-521b091779ddb2a4ca58c28af9312cb5bcf2dd9f.tar.bz2
volse-hubzilla-521b091779ddb2a4ca58c28af9312cb5bcf2dd9f.zip
merge
Diffstat (limited to 'mod')
-rw-r--r--mod/dirsearch.php3
-rw-r--r--mod/filer.php14
-rw-r--r--mod/help.php10
-rw-r--r--mod/post.php4
4 files changed, 24 insertions, 7 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 1f2ec1108..801be6189 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -31,7 +31,6 @@ function dirsearch_content(&$a) {
$tables = array('name','address','locale','region','postcode','country','gender','marital','sexual','keywords');
-
if($_REQUEST['query']) {
$advanced = dir_parse_query($_REQUEST['query']);
if($advanced) {
@@ -122,7 +121,7 @@ function dirsearch_content(&$a) {
}
- $perpage = (($_REQUEST['n']) ? $_REQUEST['n'] : 300);
+ $perpage = (($_REQUEST['n']) ? $_REQUEST['n'] : 80);
$page = (($_REQUEST['p']) ? intval($_REQUEST['p'] - 1) : 0);
$startrec = (($page+1) * $perpage) - $perpage;
$limit = (($_REQUEST['limit']) ? intval($_REQUEST['limit']) : 0);
diff --git a/mod/filer.php b/mod/filer.php
index adc6245e1..3340fc999 100644
--- a/mod/filer.php
+++ b/mod/filer.php
@@ -19,6 +19,20 @@ function filer_content(&$a) {
if($item_id && strlen($term)){
// file item
store_item_tag(local_user(),$item_id,TERM_OBJ_POST,TERM_FILE,$term,'');
+
+ // protect the entire conversation from periodic expiration
+
+ $r = q("select parent from item where id = %d and uid = %d limit 1",
+ intval($item_id),
+ intval(local_user())
+ );
+ if($r) {
+ $x = q("update item set item_flags = ( item_flags | %d ) where id = %d and uid = %d limit 1",
+ intval(ITEM_RETAINED),
+ intval($r[0]['parent']),
+ intval(local_user())
+ );
+ }
}
else {
$filetags = array();
diff --git a/mod/help.php b/mod/help.php
index aa0ee8ae6..81ecd6ba9 100644
--- a/mod/help.php
+++ b/mod/help.php
@@ -76,14 +76,18 @@ function help_content(&$a) {
$text = preg_replace_callback("/#include (.*?)\;/ism", 'preg_callback_help_include', $text);
if($doctype === 'html')
- return $text;
+ $content = $text;
if($doctype === 'markdown')
- return Markdown($text);
+ $content = Markdown($text);
if($doctype === 'bbcode') {
require_once('include/bbcode.php');
- return bbcode($text);
+ $content = bbcode($text);
}
+ return replace_macros(get_markup_template("help.tpl"), array(
+ '$content' => $content
+ ));
+
}
diff --git a/mod/post.php b/mod/post.php
index 54d0d8db9..95c984b40 100644
--- a/mod/post.php
+++ b/mod/post.php
@@ -265,7 +265,7 @@ function post_init(&$a) {
} else {
if($test) {
$ret['message'] .= 'auth failure. ' . print_r($_REQUEST,true) . print_r($j,true) . EOL;
- json_return_and_dir($ret);
+ json_return_and_die($ret);
}
logger('mod_zot: magic-auth failure - not authenticated: ' . $x[0]['xchan_addr']);
@@ -281,7 +281,7 @@ function post_init(&$a) {
if($test) {
$ret['message'] .= 'auth failure fallthrough ' . print_r($_REQUEST,true) . print_r($j,true) . EOL;
- json_return_and_dir($ret);
+ json_return_and_die($ret);
}
if(strstr($desturl,z_root() . '/rmagic'))