X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=metaform%2Ftemplate.php;h=aea7bd6d50c5642c28eefdda6237b5515876c3b4;hb=a72cc638463765aa10fc4b106efce295d7d44457;hp=1bb7e65ef0e341d685112f802a21afc4b0cb3fd3;hpb=193a9819b97b9fc3d9b331a2aa307eb00370c3aa;p=wfpl.git diff --git a/metaform/template.php b/metaform/template.php index 1bb7e65..aea7bd6 100644 --- a/metaform/template.php +++ b/metaform/template.php @@ -90,17 +90,16 @@ 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() { - pulldown('~name~', ~pulldown_options~); - + pulldown('~name~', ~pulldown_options~); $edit_id = format_int($_REQUEST['~file_name~_edit_id']); unset($_REQUEST['~file_name~_edit_id']); if($edit_id) {