Bug fix.
authorRichard Whitehouse <github@richardwhiuk.com>
Fri, 4 Feb 2011 15:14:20 +0000 (15:14 +0000)
committerRichard Whitehouse <github@richardwhiuk.com>
Fri, 4 Feb 2011 15:14:20 +0000 (15:14 +0000)
pages/index.php
templates/index.php

index 0bdd559f23a7d5e06c31fa27e06c0b1bc240ebe8..24907200ed694611439adf86a0b9203557b10de2 100644 (file)
@@ -55,16 +55,15 @@ class Page_Index extends Page {
                        $types = Type::Get_All();
 
                        $template->types = array();
-
                        foreach($types as $type){
-                               $template->types[$type->id()] == array(
+                               $template->types[$type->id()] = array(
                                        'name' => $type->name(),
                                        'price' => $type->price(),
                                        'tickets_left' => $type->left()
                                );
                        }
 
-                       $templates->add = $system->url('add');
+                       $template->add = $system->url('add');
 
 
                        $system->database()->commit();
index 801e7bb124da33be653328d705fe4c2b18195fd8..3ecd65672fc9161f47f7af9e80fa1baa8b3c1cb9 100644 (file)
@@ -17,6 +17,7 @@ class Template_Index extends Template {
 </div>
 </div>
 <?php
+               echo '<pre>'; print_r($this); echo '</pre>';
        }
 
 }