# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: Joomla root # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. --- modules/mod_cbpblatest/mod_cbpblatest.php +++ modules/mod_cbpblatest/mod_cbpblatest.php @@ -155,57 +155,59 @@ /** * Parses posts content with substitution parser replaceUserVars */ -class cbpblatest_replacer { - /** - * Poster should be used to store posters - * @var cbUser - */ - var $poster = null; - /** - * User should be used to store recipients - * @var cbUser - */ - var $user = null; - /** - * Entry should be used to store entries substitution array - * @var array - */ - var $entry = null; +if ( ! class_exists( 'cbpblatest_replacer' ) ) { + class cbpblatest_replacer { + /** + * Poster should be used to store posters + * @var cbUser + */ + var $poster = null; + /** + * User should be used to store recipients + * @var cbUser + */ + var $user = null; + /** + * Entry should be used to store entries substitution array + * @var array + */ + var $entry = null; - /** - * Replace posts content with posters substitution data - * - * @param string $matches - * @return string - */ - function replace_poster( $matches ) { - return $this->poster->replaceUserVars( $matches[1] ); - } + /** + * Replace posts content with posters substitution data + * + * @param string $matches + * @return string + */ + function replace_poster( $matches ) { + return $this->poster->replaceUserVars( $matches[1] ); + } - /** - * Replace posts content with recipient substitution data - * - * @param string $matches - * @return string - */ - function replace_user( $matches ) { - return $this->user->replaceUserVars( $matches[1] ); - } + /** + * Replace posts content with recipient substitution data + * + * @param string $matches + * @return string + */ + function replace_user( $matches ) { + return $this->user->replaceUserVars( $matches[1] ); + } - /** - * Replace posts content with posts substitution data - * - * @param string $matches - * @return string - */ - function replace_entry( $matches ) { - $entry = $matches[1]; + /** + * Replace posts content with posts substitution data + * + * @param string $matches + * @return string + */ + function replace_entry( $matches ) { + $entry = $matches[1]; - foreach ( $this->entry as $k => $v ) { - $entry = str_replace( $k, $v, $entry ); - } + foreach ( $this->entry as $k => $v ) { + $entry = str_replace( $k, $v, $entry ); + } - return $entry; + return $entry; + } } } ?>