aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorZach Prezkuta <fermion@gmx.com>2012-07-07 18:47:13 -0600
committerZach Prezkuta <fermion@gmx.com>2012-07-07 18:50:33 -0600
commitda2ccebed8f1c87b0481ba476b4d13e601ce5feb (patch)
tree285173179d117fc8812d3389b01f393112b6281d /include/items.php
parent173b3a1b9ad926937ec152e41756c5b63f6c5951 (diff)
downloadvolse-hubzilla-da2ccebed8f1c87b0481ba476b4d13e601ce5feb.tar.gz
volse-hubzilla-da2ccebed8f1c87b0481ba476b4d13e601ce5feb.tar.bz2
volse-hubzilla-da2ccebed8f1c87b0481ba476b4d13e601ce5feb.zip
fix bugs
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index 7bb33d943..eb3f27a16 100755
--- a/include/items.php
+++ b/include/items.php
@@ -326,7 +326,7 @@ function limit_body_size($body) {
}
else {
$new_body = $new_body . substr($orig_body, 0, $img_start);
- $textlen += $img_start
+ $textlen += $img_start;
}
$new_body = $new_body . substr($orig_body, $img_start, $img_end - $img_start);
@@ -3192,7 +3192,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
$img_start = strpos($orig_body, '[img');
$img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
- $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false);
+ $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start + $img_st_close + 1), '[/img]') : false);
while( ($img_st_close !== false) && ($img_len !== false) ) {
$img_st_close++; // make it point to AFTER the closing bracket
@@ -3277,10 +3277,10 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
$img_start = strpos($orig_body, '[img');
$img_st_close = ($img_start !== false ? strpos(substr($orig_body, $img_start), ']') : false);
- $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start), '[/img]') : false);
+ $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start + $img_st_close + 1), '[/img]') : false);
}
- $new_body = $new_body + $orig_body;
+ $new_body = $new_body . $orig_body;
return($new_body);
}