JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
db_connect.php can now be in code/
[wfpl.git] / metaform / template.php
index adf4803..5ebf77c 100644 (file)
@@ -72,8 +72,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(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') {