Results 1 to 4 of 4

Thread: Problem with replaceGalleryInsertTags

  1. #1
    New user BugBuster's Avatar
    Join Date
    09-27-09.
    Location
    Berlin, Germany
    Posts
    22

    Default Problem with replaceGalleryInsertTags

    I have a big problem with Contao_gallery_80009_17.zip.
    Method "replaceGalleryInsertTags" has a bug, it is missing there the "return false", if the insert tag is not for this method.
    The chain of processing with other modules is interrupted!
    Here the new code, look for "return false; //not for me"

    Code:
    	public function replaceGalleryInsertTags($strTag)
    	{
    		$elements = explode('::', $strTag);
    
    		if (strtolower($elements[0]) == 'insert_gallery' && intval($elements[1]) && intval($elements[2]))
    		{
    			$intId = $elements[1];
    			$modId = $elements[2];
    
    			// Generate module
    			$objModule = $this->Database->prepare("SELECT * FROM tl_module WHERE id=?")
    										->limit(1)
    										->execute($modId);
    
    			if ($objModule->numRows)
    			{
    				$objModule = new ModuleGallerySingle($objModule);
    				$objModule->gallery = $intId;
    				$strBuffer = $objModule->generate();
    	
    				return $strBuffer;
    			}
    		}
    		return false; //not for me
    	}
    Best regards, BugBuster [contao.ninja]
    Modules: Banner, Visitors, Integrity Check, Stardate, Bot Detection, ...

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Problem with replaceGalleryInsertTags

    I've corrected this. I was a bit rusty on the insert_tag coding it seems.
    Thanks for the Bug Busting!

    Just make a repair!

  3. #3
    New user BugBuster's Avatar
    Join Date
    09-27-09.
    Location
    Berlin, Germany
    Posts
    22

    Default Re: Problem with replaceGalleryInsertTags

    Ok, Thanks.
    Another Problem was found in german forum:
    Change this:
    Code:
    $GLOBALS['TL_HOOKS']['removeOldFeeds'][] = array('gallery', 'removeOldFeeds');
    in this:
    Code:
    $GLOBALS['TL_HOOKS']['removeOldFeeds'][] = array('Gallery', 'removeOldFeeds');
    (Case)

    File /system/modules/gallery/config/config.php
    Best regards, BugBuster [contao.ninja]
    Modules: Banner, Visitors, Integrity Check, Stardate, Bot Detection, ...

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Problem with replaceGalleryInsertTags

    I've updated that as well. Thanks again. I'm not hearing anything in the English forum, so I'm thinking it's not even being used -- dud release....

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •