diff options
| author | lsces <lester@lsces.co.uk> | 2026-04-02 10:05:01 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-04-02 10:05:01 +0100 |
| commit | ba0cd3868f23ec846154aa5881f42a03c283a155 (patch) | |
| tree | 030e1c279b41e82143a96bde7248381e5bff5268 | |
| parent | d9c3c2d4768f5fa4de8ad27e6250c0f686bd1f4b (diff) | |
| download | liberty-ba0cd3868f23ec846154aa5881f42a03c283a155.tar.gz liberty-ba0cd3868f23ec846154aa5881f42a03c283a155.tar.bz2 liberty-ba0cd3868f23ec846154aa5881f42a03c283a155.zip | |
static function calls, but still need to clear an error
| -rwxr-xr-x | includes/classes/LibertyContent.php | 2 | ||||
| -rwxr-xr-x | includes/classes/LibertyMime.php | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/includes/classes/LibertyContent.php b/includes/classes/LibertyContent.php index 1424e61..58ae668 100755 --- a/includes/classes/LibertyContent.php +++ b/includes/classes/LibertyContent.php @@ -3379,7 +3379,7 @@ class LibertyContent extends LibertyBase implements BitCacheable { * @param array $pParamHash * @return bool true on success, false on failure - mErrors will contain reason for failure */ - public function storeActionLogFromHash( $pParamHash = null ): void { + public static function storeActionLogFromHash( $pParamHash = null ): void { global $gBitSystem; if( $gBitSystem->isFeatureActive( 'liberty_action_log' ) && $this->verifyActionLog( $pParamHash ) ) { diff --git a/includes/classes/LibertyMime.php b/includes/classes/LibertyMime.php index e860599..3c187d2 100755 --- a/includes/classes/LibertyMime.php +++ b/includes/classes/LibertyMime.php @@ -90,8 +90,8 @@ class LibertyMime extends LibertyContent { foreach( $pParamHash['upload_store']['files'] as $key => $upload ) { // if we don't have an upload, we'll simply update the file settings using the mime plugins - if( empty( $upload['tmp_name'] )) { - if( BitBase::verifyId( $upload['attachment_id'] )) { + if( empty( $upload['tmp_name'] ) ) { + if( BitBase::verifyId( $upload['attachment_id'] ?? -3 )) { // since the form might have all options unchecked, we need to call the update function regardless // currently i can't think of a better way to get the plugin guid back when $pParamHash[plugin] is // empty. - xing - Friday Jul 11, 2008 20:21:18 CEST @@ -786,7 +786,7 @@ class LibertyMime extends LibertyContent { * @param string $pPrefName * @param string $pPrefValue Value for the prefs hash key */ - public function storeAttachmentPreference( int $pAttachmentId, string $pPrefName, string $pPrefValue = ''): bool { + public static function storeAttachmentPreference( int $pAttachmentId, string $pPrefName, string $pPrefValue = ''): bool { global $gBitSystem; $ret = false; if( BitBase::verifyId( $pAttachmentId ) && !empty( $pPrefName )) { @@ -800,9 +800,9 @@ class LibertyMime extends LibertyContent { } // this function might be called statically - if( !empty( $this ) && $this->isValid() ) { - $this->mStoragePrefs[$pAttachmentId][$pPrefName] = $pPrefValue; - } +// if( !empty( $this ) && $this->isValid() ) { +// $this->mStoragePrefs[$pAttachmentId][$pPrefName] = $pPrefValue; +// } $ret = true; } @@ -852,7 +852,7 @@ class LibertyMime extends LibertyContent { * @param array $pAttachmentId attachemnt we want to remove the prefs for * @return bool true on success, false on failure */ - public function expungeAttachmentPreferences( $pAttachmentId ) { + public static function expungeAttachmentPreferences( $pAttachmentId ) { global $gBitSystem; $ret = false; if( BitBase::verifyId( $pAttachmentId ) ) { @@ -1025,10 +1025,10 @@ class LibertyMime extends LibertyContent { * @param int $pAttachmentId Attachment ID of attachment * @return bool */ - public function expungeMetaData( $pAttachmentId ) { + public static function expungeMetaData( $pAttachmentId ) { global $gBitSystem; if( BitBase::verifyId( $pAttachmentId )) { - return $gBitSystem->mDb->query( "DELETE FROM `".BIT_DB_PREFIX."liberty_attachment_meta_data` WHERE `attachment_id` = ?", array( $pAttachmentId )); + return $gBitSystem->mDb->query( "DELETE FROM `".BIT_DB_PREFIX."liberty_attachment_meta_data` WHERE `attachment_id` = ?", [ $pAttachmentId ]); } return false; } |
