All pastes #582523 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-22 00:17 UTC
rendered paste body
<?php
	for($p=0;$p<$maxpages;$p++){
		$posts=$db->GetAssoc("SELECT * FROM ".SQL_PREFIX."Posts WHERE brdID='{$this->id}' AND threadID=0 ORDER BY pstPinned, pstBumped DESC Limit ".$threadsperpage*$p.",".$threadsperpage));
		foreach($posts as $post) {
			//OP?
			if(intval($post['threadID'])==0)
			{
				//Use the Post ID instead
				$post['threadID']=$post['pstID'];
			}
			$tid=$post['threadID'];
			$this->threads[$tid]->processpost($post);
		}