summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2025-04-27 16:04:23 -0400
committerspiderr <spiderr@bitweaver.org>2025-04-27 16:04:23 -0400
commit38573e1d540368c9d710eaa8c09f2fa2bf908d7b (patch)
tree737976e22ca7ad2cd2a43d168ba3208698842abc
parent6deee7f9133fa1a49132b3925e0ecfefd83302d3 (diff)
downloadwiki-38573e1d540368c9d710eaa8c09f2fa2bf908d7b.tar.gz
wiki-38573e1d540368c9d710eaa8c09f2fa2bf908d7b.tar.bz2
wiki-38573e1d540368c9d710eaa8c09f2fa2bf908d7b.zip
verifyIdParameter; empty(maxlen) check
-rw-r--r--includes/classes/BitPage.php8
-rw-r--r--modules/mod_recent_page_changes.tpl2
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}
<li>
<a href="{$modLastModif[ix].display_url}" title="{$modLastModif[ix].title|escape} - {displayname user=$modLastModif[ix].modifier_user real_name=$modLastModif[ix].modifier_real_name nolink=1}, {$modLastModif[ix].last_modified|bit_short_date}">
- {if $maxlen gt 0}
+ {if !empty($maxlen)}
{$modLastModif[ix].title|escape|truncate:$maxlen:"...":true}
{else}
{$modLastModif[ix].title|escape}