diff options
| author | lsces <lester@lsces.co.uk> | 2026-03-09 20:21:12 +0000 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-03-09 20:21:12 +0000 |
| commit | f0e03115d345cf3497ae2804d09037bcf9f32aff (patch) | |
| tree | 5e56d5d3e7e48818ea69c510d4cfede1bd3b0ed3 /includes | |
| parent | 0b7bc39d45c39f36e13e704ac126f9246a9be62f (diff) | |
| download | articles-f0e03115d345cf3497ae2804d09037bcf9f32aff.tar.gz articles-f0e03115d345cf3497ae2804d09037bcf9f32aff.tar.bz2 articles-f0e03115d345cf3497ae2804d09037bcf9f32aff.zip | |
I had forgotten that the medw site has a lot of articles which have not been displayed recently, so have applied all the Smarty5 and PHP8.4 fixes on mass which gets displaying and editing working, but the list function is currently broken
Diffstat (limited to 'includes')
| -rwxr-xr-x | includes/classes/BitArticle.php | 10 | ||||
| -rwxr-xr-x | includes/lookup_article_inc.php | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/includes/classes/BitArticle.php b/includes/classes/BitArticle.php index 7b1a285..6ad6a38 100755 --- a/includes/classes/BitArticle.php +++ b/includes/classes/BitArticle.php @@ -284,7 +284,7 @@ class BitArticle extends LibertyMime $pParamHash['article_store']['expire_date'] = $pParamHash['expire_date']; } - if (@$this->verifyId( $pParamHash['status_id'] )) { + if ( !empty($pParamHash['status_id']) and @$this->verifyId( $pParamHash['status_id'] )) { $pParamHash['article_store']['status_id'] = ( $pParamHash['status_id'] > ARTICLE_STATUS_PENDING ) ? ( $gBitUser->hasPermission( 'p_articles_approve_submission' ) ) ? (int) ( $pParamHash['status_id'] ) : ARTICLE_STATUS_PENDING : (int) ( $pParamHash['status_id'] ); } elseif (@$this->verifyId( $this->mInfo['status_id'] )) { @@ -453,18 +453,18 @@ class BitArticle extends LibertyMime // or a string $whereSql .= " AND UPPER( lc.`title` ) LIKE ? "; $bindVars[] = '%'.strtoupper( $find ).'%'; - } elseif ( @$this->verifyId( $pParamHash['user_id'] ) ) { + } elseif ( @$this->verifyId( $pParamHash['user_id'] ?? 0 ) ) { // or gate on a user $whereSql .= " AND lc.`user_id` = ? "; $bindVars[] = (int) $pParamHash['user_id']; } - if ( @$this->verifyId( $pParamHash['status_id'] ) ) { + if ( @$this->verifyId( $pParamHash['status_id'] ?? 0 ) ) { $whereSql .= " AND a.`status_id` = ? "; $bindVars[] = $pParamHash['status_id']; } - if ( @$this->verifyId( $pParamHash['type_id'] ) ) { + if ( @$this->verifyId( $pParamHash['type_id'] ?? 0 ) ) { $whereSql .= " AND a.`article_type_id` = ? "; $bindVars[] = (int) $pParamHash['type_id']; } @@ -510,7 +510,7 @@ class BitArticle extends LibertyMime $bindVars[] = 'y'; } - if ( @$this->verifyId( $pParamHash['topic_id'] ) ) { + if ( @$this->verifyId( $pParamHash['topic_id'] ?? 0 ) ) { $whereSql .= " AND a.`topic_id` = ? "; $bindVars[] = (int) $pParamHash['topic_id']; } elseif ( !empty( $pParamHash['topic'] ) ) { diff --git a/includes/lookup_article_inc.php b/includes/lookup_article_inc.php index cdd5902..45461ac 100755 --- a/includes/lookup_article_inc.php +++ b/includes/lookup_article_inc.php @@ -14,9 +14,9 @@ require_once( LIBERTY_PKG_INCLUDE_PATH.'lookup_content_inc.php' ); // if we already have a gContent, we assume someone else created it for us, and has properly loaded everything up. if( empty( $gContent ) || !is_object( $gContent ) ) { - if (@BitBase::verifyId( $_REQUEST['article_id'] ) ) { + if (@BitBase::verifyId( $_REQUEST['article_id'] ?? 0 ) ) { $gContent = new BitArticle( $_REQUEST['article_id'] ); - } elseif( @BitBase::verifyId( $_REQUEST['content_id'] ) ) { + } elseif( @BitBase::verifyId( $_REQUEST['content_id'] ?? 0 ) ) { $gContent = new BitArticle( NULL, $_REQUEST['content_id'] ); } else { $gContent = new BitArticle(); |
