aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-28 04:50:16 -0700
committerfriendica <info@friendica.com>2013-05-28 04:50:16 -0700
commit08a4ffd6633896a75f1aa66c7c310fc6fd991912 (patch)
treedd6bcff6137bceef34283ecfc684b2435b5bd406 /include/items.php
parente81e11382f9c746c59fa11b3baef401f8c328cd4 (diff)
downloadvolse-hubzilla-08a4ffd6633896a75f1aa66c7c310fc6fd991912.tar.gz
volse-hubzilla-08a4ffd6633896a75f1aa66c7c310fc6fd991912.tar.bz2
volse-hubzilla-08a4ffd6633896a75f1aa66c7c310fc6fd991912.zip
convert most red photos to zmg
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/items.php b/include/items.php
index bb0ec31a5..9c3c3f096 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4170,9 +4170,9 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
$orig_body = $s;
$new_body = '';
- $img_start = strpos($orig_body, '[img');
+ $img_start = strpos($orig_body, '[zmg');
$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_st_close + 1), '[/img]') : false);
+ $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start + $img_st_close + 1), '[/zmg]') : false);
while( ($img_st_close !== false) && ($img_len !== false) ) {
$img_st_close++; // make it point to AFTER the closing bracket
@@ -4222,7 +4222,7 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
$type = $r[0]['type'];
// If a custom width and height were specified, apply before embedding
- if(preg_match("/\[img\=([0-9]*)x([0-9]*)\]/is", substr($orig_body, $img_start, $img_st_close), $match)) {
+ if(preg_match("/\[zmg\=([0-9]*)x([0-9]*)\]/is", substr($orig_body, $img_start, $img_st_close), $match)) {
logger('fix_private_photos: scaling photo', LOGGER_DEBUG);
$width = intval($match[1]);
@@ -4244,14 +4244,14 @@ function fix_private_photos($s, $uid, $item = null, $cid = 0) {
}
}
- $new_body = $new_body . substr($orig_body, 0, $img_start + $img_st_close) . $image . '[/img]';
- $orig_body = substr($orig_body, $img_start + $img_st_close + $img_len + strlen('[/img]'));
+ $new_body = $new_body . substr($orig_body, 0, $img_start + $img_st_close) . $image . '[/zmg]';
+ $orig_body = substr($orig_body, $img_start + $img_st_close + $img_len + strlen('[/zmg]'));
if($orig_body === false)
$orig_body = '';
- $img_start = strpos($orig_body, '[img');
+ $img_start = strpos($orig_body, '[zmg');
$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_st_close + 1), '[/img]') : false);
+ $img_len = ($img_start !== false ? strpos(substr($orig_body, $img_start + $img_st_close + 1), '[/zmg]') : false);
}
$new_body = $new_body . $orig_body;