Did I REALLY parsed entry TWICE in comments and permalinks??
added 'localcache' field in FPDB_Query, keeps a hash with last "fullparsed" entries
This commit is contained in:
		
							parent
							
								
									9acf583332
								
							
						
					
					
						commit
						3c94284f70
					
				@ -144,6 +144,7 @@
 | 
				
			|||||||
		
 | 
							
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		var $lastentry  = array(null, array()); 
 | 
							var $lastentry  = array(null, array()); 
 | 
				
			||||||
 | 
							var $localcache  = array(); 
 | 
				
			||||||
		var $nextid		= '';
 | 
							var $nextid		= '';
 | 
				
			||||||
		var $previd		= '';
 | 
							var $previd		= '';
 | 
				
			||||||
		var $currentid	= '';		
 | 
							var $currentid	= '';		
 | 
				
			||||||
@ -376,7 +377,7 @@
 | 
				
			|||||||
				
 | 
									
 | 
				
			||||||
				$v = $idx->getitem($key);
 | 
									$v = $idx->getitem($key);
 | 
				
			||||||
				if ($qp->fullparse) {
 | 
									if ($qp->fullparse) {
 | 
				
			||||||
					$entry = entry_parse($qp->id);
 | 
										$entry = isset($this->localcache[ $qp->id ]) ? $this->localcache[ $qp->id ] : entry_parse($qp->id);
 | 
				
			||||||
					if ($entry && $qp->comments) {
 | 
										if ($entry && $qp->comments) {
 | 
				
			||||||
						$this->comments = new FPDB_CommentList($qp->id, comment_getlist($qp->id));
 | 
											$this->comments = new FPDB_CommentList($qp->id, comment_getlist($qp->id));
 | 
				
			||||||
						$entry['comments'] = $this->comments->getCount();
 | 
											$entry['comments'] = $this->comments->getCount();
 | 
				
			||||||
@ -448,7 +449,7 @@
 | 
				
			|||||||
				// full parse: reads the whole array from file
 | 
									// full parse: reads the whole array from file
 | 
				
			||||||
				$cont = array();
 | 
									$cont = array();
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
				$cont = entry_parse($id);
 | 
									$cont = isset($this->localcache[ $id ]) ? $this->localcache[ $id ] : entry_parse($id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user