stable too, fixes #204
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@674 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
		
							parent
							
								
									c49fd1178a
								
							
						
					
					
						commit
						6e8b618c8d
					
				@ -19,10 +19,10 @@ class Layout {
 | 
			
		||||
		foreach($page->blocks as $block) {
 | 
			
		||||
			switch($block->section) {
 | 
			
		||||
				case "left":
 | 
			
		||||
					$left_block_html .= $this->block_to_html($block, true);
 | 
			
		||||
					$left_block_html .= $this->block_to_html($block, true, "left");
 | 
			
		||||
					break;
 | 
			
		||||
				case "main":
 | 
			
		||||
					$main_block_html .= $this->block_to_html($block, false);
 | 
			
		||||
					$main_block_html .= $this->block_to_html($block, false, "main");
 | 
			
		||||
					break;
 | 
			
		||||
				default:
 | 
			
		||||
					print "<p>error: {$block->header} using an unknown section ({$block->section})";
 | 
			
		||||
@ -73,11 +73,11 @@ $header_html
 | 
			
		||||
EOD;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function block_to_html($block, $hidable=false) {
 | 
			
		||||
	function block_to_html($block, $hidable=false, $salt="") {
 | 
			
		||||
		$h = $block->header;
 | 
			
		||||
		$b = $block->body;
 | 
			
		||||
		$html = "";
 | 
			
		||||
		$i = str_replace(' ', '_', $h);
 | 
			
		||||
		$i = str_replace(' ', '_', $h) . $salt;
 | 
			
		||||
		if($hidable) {
 | 
			
		||||
			$toggle = " onclick=\"toggle('$i')\"";
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user