Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 XThread error!: SHOWTHREAD IN GALLERY
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #21
RE: XThread error!: SHOWTHREAD IN GALLERY
I'm not sure as I haven't checked, but a quick scan of the plugin, and I suspect these lines (appears in multiple locations):

PHP Code:
				$templates->cache('postbit');
				$templates->cache('postbit_classic');

This probably conflicts with XThreads first post handling, but the above code is incorrect, for a number of reasons:

  1. It's already cached by earlier bits of the code:

    PHP Code:
    450
    451
    452
    453
    454
    	if(!$templates->cache['postbit'])
    		$templates->cache('postbit');
    		
    	if(!$templates->cache['postbit_classic'])
    		$templates->cache('postbit_classic');

  2. The two calls really should be one, so that it doesn't double query
  3. It doesn't check for any previously cached variable, effectively adding two queries for nothing most of the time
  4. It overwrites any previously cached variable (effectively destroying any modification applied to it before)


You can safely delete all 12 instances of the code above in the first code box.

My Blog
(This post was last modified: 11-18-2010 09:30 AM by ZiNgA BuRgA.)
11-18-2010 09:28 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: XThread error!: SHOWTHREAD IN GALLERY - ZiNgA BuRgA - 11-18-2010 09:28 AM

 Standard Tools
Forum Jump: