aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2014-02-21 08:54:46 +0100
committerzottel <github@zottel.net>2014-02-21 08:54:46 +0100
commit8bd006bea83b3dbc02d94b4714a658e8742d9633 (patch)
tree078e9d4b634d583de8359ddae94c69d86ec19d17 /mod
parent79c566bda33645f42f8545fdc6e55af35c4a7d5c (diff)
parent44d7047fce57085fe63ad5e1088911e9fc07a32e (diff)
downloadvolse-hubzilla-8bd006bea83b3dbc02d94b4714a658e8742d9633.tar.gz
volse-hubzilla-8bd006bea83b3dbc02d94b4714a658e8742d9633.tar.bz2
volse-hubzilla-8bd006bea83b3dbc02d94b4714a658e8742d9633.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php2
-rw-r--r--mod/photos.php2
-rw-r--r--mod/wall_attach.php17
-rw-r--r--mod/wall_upload.php11
4 files changed, 7 insertions, 25 deletions
diff --git a/mod/item.php b/mod/item.php
index dc005bb20..2feb64a37 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -269,7 +269,7 @@ function item_post(&$a) {
$coord = $orig_post['coord'];
$verb = $orig_post['verb'];
$app = $orig_post['app'];
- $title = escape_tags(trim($_REQUEST['title']));
+ $title = $_REQUEST['title'];
$body = $_REQUEST['body'];
$private = $orig_post['item_private'];
$item_flags = $orig_post['item_flags'];
diff --git a/mod/photos.php b/mod/photos.php
index 2fe2d8a74..e2279188a 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -27,7 +27,7 @@ function photos_init(&$a) {
if(! $channelx)
return;
- $a->data['channel'] = $channelx[0];
+ $a->data['channel'] = $channelx;
$observer = $a->get_observer();
$a->data['observer'] = $observer;
diff --git a/mod/wall_attach.php b/mod/wall_attach.php
index 6e9443f12..47c097416 100644
--- a/mod/wall_attach.php
+++ b/mod/wall_attach.php
@@ -1,23 +1,12 @@
<?php
require_once('include/attach.php');
-require_once('include/datetime.php');
+require_once('include/identity.php');
function wall_attach_post(&$a) {
- // Figure out who owns the page and if they allow attachments
-
- if(argc() > 1) {
- $nick = argv(1);
- $r = q("SELECT channel.* from channel where channel_address = '%s' limit 1",
- dbesc($nick)
- );
- if(! $r)
- killme();
- $channel = $r[0];
-
- }
-
+ if(argc() > 1)
+ $channel = get_channel_by_nick(argv(1));
else
killme();
diff --git a/mod/wall_upload.php b/mod/wall_upload.php
index dd5d760b3..2939cf0d1 100644
--- a/mod/wall_upload.php
+++ b/mod/wall_upload.php
@@ -1,6 +1,7 @@
<?php
require_once('include/photo/photo_driver.php');
+require_once('include/identity.php');
require_once('include/photos.php');
@@ -19,15 +20,7 @@ function wall_upload_post(&$a) {
$nick = argv(1);
}
- $channel = null;
-
- if($nick) {
- $r = q("SELECT channel.* from channel where channel_address = '%s' limit 1",
- dbesc($nick)
- );
- if($r)
- $channel = $r[0];
- }
+ $channel = (($nick) ? get_channel_by_nick($nick) : false);
if(! $channel) {
if($using_api)