aboutsummaryrefslogtreecommitdiffstats
path: root/mod/thing.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-07-02 18:36:39 +0100
committerThomas Willingham <founder@kakste.com>2013-07-02 18:36:39 +0100
commitd1cae2da2abc3a602f682114bc02cce08a7e7578 (patch)
treeef3147f9db85bdde8e26303971a40d86e10bb508 /mod/thing.php
parent33696cc8392daeb08d011aa3b1209f3b121898ea (diff)
parentb86253c655f974920c4d3de0915611a7e66c7336 (diff)
downloadvolse-hubzilla-d1cae2da2abc3a602f682114bc02cce08a7e7578.tar.gz
volse-hubzilla-d1cae2da2abc3a602f682114bc02cce08a7e7578.tar.bz2
volse-hubzilla-d1cae2da2abc3a602f682114bc02cce08a7e7578.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/thing.php')
-rw-r--r--mod/thing.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/mod/thing.php b/mod/thing.php
new file mode 100644
index 000000000..723b069bc
--- /dev/null
+++ b/mod/thing.php
@@ -0,0 +1,43 @@
+<?php /** @file */
+
+
+
+function thing_init(&$a) {
+
+ if(! local_user())
+ return;
+
+ $account_id = $a->get_account();
+
+ $name = escape_tags($_REQUEST['term']);
+ $url = $_REQUEST['link'];
+ $photo = $_REQUEST['photo'];
+
+ $hash = random_string();
+
+
+ if(! $name)
+ return;
+
+ $r = q("insert into term ( aid, uid, oid, otype, type, term, url, imgurl, term_hash )
+ values( %d, %d, %d, %d, %d, '%s', '%s', '%s', '%s' ) ",
+ intval($account_id),
+ intval(local_user()),
+ 0,
+ TERM_OBJ_THING,
+ TERM_THING,
+ dbesc($name),
+ dbesc(($url) ? $url : z_root() . '/thing/' . $hash),
+ dbesc(($photo) ? $photo : ''),
+ dbesc($hash)
+ );
+
+}
+
+
+function thing_content(&$a) {
+
+
+
+
+}