Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of /home/jason/dev/git/wfpl
[wfpl.git]
/
metaform
/
template.php
diff --git
a/metaform/template.php
b/metaform/template.php
index
adf4803
..
14836c7
100644
(file)
--- a/
metaform/template.php
+++ b/
metaform/template.php
@@
-32,7
+32,6
@@
require_once('code/wfpl/db.php');<!--~image_include start~-->
require_once('code/wfpl/upload.php');<!--~end~-->
function ~form_name~_get_fields() {
require_once('code/wfpl/upload.php');<!--~end~-->
function ~form_name~_get_fields() {
- $fields = array();
<!--~formats start~-->
$~name~ = format_~format~($_REQUEST['~name~']);<!--~end~--><!--~image_upload start~-->
$~name~ = save_uploaded_image('~name~', $GLOBALS['upload_directory']);<!--~end~-->
<!--~formats start~-->
$~name~ = format_~format~($_REQUEST['~name~']);<!--~end~--><!--~image_upload start~-->
$~name~ = save_uploaded_image('~name~', $GLOBALS['upload_directory']);<!--~end~-->
@@
-72,8
+71,12
@@
function ~form_name~() {
if("you're happy with the POSTed values") {
# to enable saving to a database, create a file called 'db_connect.php'
# see: code/wfpl/examples/db_connect.php
if("you're happy with the POSTed values") {
# to enable saving to a database, create a file called 'db_connect.php'
# see: code/wfpl/examples/db_connect.php
- if(file_exists('db_connect.php')) {
- require_once('db_connect.php');
+ if(file_exists('db_connect.php') || file_exists('code/db_connect.php')) {
+ if(file_exists('db_connect.php') {
+ require_once('db_connect.php');
+ } else {
+ require_once('code/db_connect.php');
+ }
if($edit_id) {<!--~image_db start~-->
# uploading nothing means leaving it as is.
if(!$~name~ && $delete_~name~ != 'Yes') {
if($edit_id) {<!--~image_db start~-->
# uploading nothing means leaving it as is.
if(!$~name~ && $delete_~name~ != 'Yes') {