JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
new options (don't do anything yet)
[wfpl.git] / metaform / template.php
index 945942e..aea7bd6 100644 (file)
@@ -90,24 +90,23 @@ function ~file_name~_display_main() {
                message('Error: Broken link');
                return './~file_name~';
        }
-       $row = db_get_assoc('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'where id=%i', $id);
-       if(!$row) {
+       $data = db_get_assoc('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'where id=%i', $id);
+       if(!$data) {
                message('Error: ~singular cap~ not found');
                return './~file_name~';
        }
-       tem_set('display', $row);
+       tem_set('display', $data);
 }
 
 function ~file_name~_edit_main() {<!--~}~--><!--~pulldowns {~-->
-       pulldown('~name~', ~pulldown_options~);
-<!--~}~--><!--~opt_db {~-->
+       pulldown('~name~', ~pulldown_options~);<!--~}~--><!--~opt_db {~-->
        $edit_id = format_int($_REQUEST['~file_name~_edit_id']);
        unset($_REQUEST['~file_name~_edit_id']);
        if($edit_id) {
                # add hidden field for database id of row we're editing
                tem_set('~file_name~_edit_id', $edit_id);
-               tem_set('editing', 'show');
-               tem_set('edit_msg', 'show');
+               tem_set('editing');
+               tem_set('edit_msg');
        }
 
        $delete_id = format_int($_REQUEST['~file_name~_delete_id']);
@@ -126,7 +125,7 @@ function ~file_name~_edit_main() {<!--~}~--><!--~pulldowns {~-->
                        return;
                }
 <!--~}~-->
-               tem_set('new_msg', 'show');
+               tem_set('new_msg');
        }
 <!--~}~-->
        if(isset($_POST['~always_field~'])) {
@@ -184,7 +183,7 @@ function ~file_name~_edit_main() {<!--~}~--><!--~pulldowns {~-->
        tem_set('upload_max_filesize', upload_max_filesize());<!--~}~-->
 
        tem_set('form', $data);<!--~show_extra_headers {~-->
-       tem_set('extra_headers', 'show');<!--~}~-->
+       tem_set('extra_headers');<!--~}~-->
 }
 
 ?>