From 38573e1d540368c9d710eaa8c09f2fa2bf908d7b Mon Sep 17 00:00:00 2001 From: spiderr Date: Sun, 27 Apr 2025 16:04:23 -0400 Subject: verifyIdParameter; empty(maxlen) check --- includes/classes/BitPage.php | 8 ++++---- modules/mod_recent_page_changes.tpl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/classes/BitPage.php b/includes/classes/BitPage.php index e0fd7cb..c3a7c5d 100644 --- a/includes/classes/BitPage.php +++ b/includes/classes/BitPage.php @@ -306,7 +306,7 @@ class BitPage extends LibertyMime implements BitCacheable { $pParamHash['content_type_guid'] = $this->mContentTypeGuid; } - if( @$this->verifyId( $pParamHash['content_id'] ) ) { + if( @$this->verifyIdParameter( $pParamHash, 'content_id' ) ) { $pParamHash['page_store']['content_id'] = $pParamHash['content_id']; } @@ -517,7 +517,7 @@ class BitPage extends LibertyMime implements BitCacheable { $ret = $this->getField('title'); if( $this->isValid() ) { $ret = static::getTitleFromHash( $this->mInfo ); - $requestPage = strtoupper( self::getParameter( $_REQUEST, 'page' ) ); + $requestPage = strtoupper( self::getParameter( $_REQUEST, 'page' ) ?? '' ); if( $requestPage && $requestPage != strtoupper( $this->mInfo['title'] ) ) { $aliases = $this->getAliases( TRUE ); if( in_array( $requestPage, $aliases ) ) { @@ -860,7 +860,7 @@ class BitPage extends LibertyMime implements BitCacheable { // ...page... functions function countSubPages( $pData ) { - return(( preg_match_all( '/'.( defined( 'PAGE_SEP' ) ? preg_quote( PAGE_SEP ) : '\.\.\.page\.\.\.').'/', $pData, $matches ) + 1 )); + return(( preg_match_all( '/'.( defined( 'PAGE_SEP' ) ? preg_quote( PAGE_SEP ) : '\.\.\.page\.\.\.').'/', $pData ?? '', $matches ) + 1 )); } /** @@ -995,7 +995,7 @@ class BitPage extends LibertyMime implements BitCacheable { * @access public * @return boolean TRUE on success, FALSE on failure - $this->mErrors will contain reason for failure */ - function linkStructureGraph( $pLinkStructure = array(), $pParams = array(), &$pGraphViz ) { + function linkStructureGraph( $pLinkStructure = array(), $pParams = array(), $pGraphViz = null ) { if( !empty( $pLinkStructure ) && !empty( $pGraphViz )) { $pParams['graph']['URL'] = WIKI_PKG_URL.'index.php'; $pGraphViz->addAttributes( $pParams['graph'] ); diff --git a/modules/mod_recent_page_changes.tpl b/modules/mod_recent_page_changes.tpl index 27fa56c..9a4b45c 100644 --- a/modules/mod_recent_page_changes.tpl +++ b/modules/mod_recent_page_changes.tpl @@ -5,7 +5,7 @@ {section name=ix loop=$modLastModif}
  • - {if $maxlen gt 0} + {if !empty($maxlen)} {$modLastModif[ix].title|escape|truncate:$maxlen:"...":true} {else} {$modLastModif[ix].title|escape} -- cgit v1.3