Skip to content

Commit

Permalink
Fixed issue with not displaying footer. Need to update wfMessage func…
Browse files Browse the repository at this point in the history
…tion now
  • Loading branch information
jamesmontalvo3 committed Nov 20, 2014
1 parent 117212d commit a06c320
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions HeaderFooter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,38 @@ public static function hOutputPageParserOutput( &$op, $parserOutput )

return true;
}

/**
* Verifies & Strips ''disable command'', returns $content if all OK.
*/
static function conditionalInclude( &$text, $disableWord, &$msgId )
{
// is there a disable command lurking around?
$disable = strpos( $text, $disableWord ) !== false ;
static function conditionalInclude( &$text, $disableWord, &$msgId )
{
// is there a disable command lurking around?
$disable = strpos( $text, $disableWord ) !== false;

// if there is, get rid of it
// make sure that the disableWord does not break the REGEX below!
$text = preg_replace('/'.$disableWord.'/si', '', $text );
// if there is, get rid of it
// make sure that the disableWord does not break the REGEX below!
$text = preg_replace('/'.$disableWord.'/si', '', $text );

// if there is a disable command, then don't return anything
if ($disable)
return null;

$msgText = wfMessage( $msgId, array( 'parseinline' ) );
// if there is a disable command, then don't return anything
if ($disable)
return null;

// FIXME: make it look like this (though this doesn't work)
// $msgText = wfMessage( $msgId, array( 'parseinline' ) );
$msgText = wfMsgExt( $msgId, array( 'parseinline' ) );

// don't need to bother if there is no content.
if (empty( $msgText ))
return null;
// don't need to bother if there is no content.
if (empty( $msgText ))
return null;

if (wfMessage( $msgId, $msgText ))
return null;
// FIXME: make it look like this (though this may not work)
// if (wfMessage( $msgId, $msgText ))
if (wfEmptyMsg( $msgId, $msgText ))
return null;

return $msgText;
}
return $msgText;
}


} // END CLASS DEFINITION

0 comments on commit a06c320

Please sign in to comment.