diff options
-rw-r--r-- | Zotlabs/Update/_1246.php | 24 | ||||
-rw-r--r-- | Zotlabs/Update/_1247.php | 23 | ||||
-rw-r--r-- | boot.php | 4 | ||||
-rw-r--r-- | include/attach.php | 4 | ||||
-rw-r--r-- | include/photos.php | 10 |
5 files changed, 56 insertions, 9 deletions
diff --git a/Zotlabs/Update/_1246.php b/Zotlabs/Update/_1246.php new file mode 100644 index 000000000..3023c45dd --- /dev/null +++ b/Zotlabs/Update/_1246.php @@ -0,0 +1,24 @@ +<?php + +namespace Zotlabs\Update; + +class _1246 { + + function run() { + + q("START TRANSACTION"); + + $r1 = dbq("UPDATE xchan SET xchan_deleted = 2 WHERE xchan_network = 'zot' AND xchan_deleted = 0"); + $r2 = dbq("UPDATE hubloc SET hubloc_deleted = 2 WHERE hubloc_network = 'zot' AND hubloc_deleted = 0"); + + if($r1 && $r2) { + q("COMMIT"); + return UPDATE_SUCCESS; + } + + q("ROLLBACK"); + return UPDATE_FAILED; + + } + +} diff --git a/Zotlabs/Update/_1247.php b/Zotlabs/Update/_1247.php new file mode 100644 index 000000000..e776a52f4 --- /dev/null +++ b/Zotlabs/Update/_1247.php @@ -0,0 +1,23 @@ +<?php + +namespace Zotlabs\Update; + +class _1247 { + + function run() { + + q("START TRANSACTION"); + + $r = dbq("DELETE FROM updates WHERE ud_addr = '' OR ud_hash = '' OR ud_guid = ''"); + + if($r) { + q("COMMIT"); + return UPDATE_SUCCESS; + } + + q("ROLLBACK"); + return UPDATE_FAILED; + + } + +} @@ -53,10 +53,10 @@ require_once('include/bbcode.php'); require_once('include/items.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '5.9.7' ); +define ( 'STD_VERSION', '5.9.9' ); define ( 'ZOT_REVISION', '6.0' ); -define ( 'DB_UPDATE_VERSION', 1245 ); +define ( 'DB_UPDATE_VERSION', 1247 ); define ( 'PROJECT_BASE', __DIR__ ); diff --git a/include/attach.php b/include/attach.php index db7046ef0..09d4005e8 100644 --- a/include/attach.php +++ b/include/attach.php @@ -668,8 +668,8 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { $def_extension = '.jpg'; if($gis[2] === IMAGETYPE_PNG) $def_extension = '.png'; - if($gis[2] === IMAGETYPE_WEBP) - $def_extension = '.webp'; + if($gis[2] === IMAGETYPE_WEBP) + $def_extension = '.webp'; } // If we know it's a photo, over-ride the type in case the source system could not determine what it was diff --git a/include/photos.php b/include/photos.php index a783875bb..cfa29a253 100644 --- a/include/photos.php +++ b/include/photos.php @@ -259,7 +259,7 @@ function photo_upload($channel, $observer, $args) { if($args['description']) $p['description'] = $args['description']; - $link = array(); + $url = []; $r0 = $ph->save($p); $url[0] = array( @@ -360,14 +360,14 @@ function photo_upload($channel, $observer, $args) { if($large_photos) { $scale = 1; - $width = $link[1]['width']; - $height = $link[1]['height']; + $width = $url[1]['width']; + $height = $url[1]['height']; $tag = (($r1) ? '[zmg=' . $width . 'x' . $height . ']' : '[zmg]'); } else { $scale = 2; - $width = $link[2]['width']; - $height = $link[2]['height']; + $width = $url[2]['width']; + $height = $url[2]['height']; $tag = (($r2) ? '[zmg=' . $width . 'x' . $height . ']' : '[zmg]'); } |