JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix require_once paths
authorJason Woofenden <jason@jasonwoof.com>
Sun, 26 Jan 2014 06:34:06 +0000 (01:34 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Sun, 26 Jan 2014 06:34:06 +0000 (01:34 -0500)
calendar.php
db.php
dwt.php
fdb.php
format.php
messages.php
metaform.php
session_messages.php
string_array.php
template.php
uploader.php

index c7f51ab..0cdeab8 100644 (file)
@@ -35,7 +35,7 @@
 
 
 
-require_once('code/wfpl/template.php');
+require_once(__DIR__ . '/template.php');
 
 function calendar_week(&$template) {
        $template->sub('week');
diff --git a/db.php b/db.php
index 1bf78fd..b1faf2c 100644 (file)
--- a/db.php
+++ b/db.php
@@ -16,8 +16,8 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require_once('code/wfpl/encode.php');
-require_once('code/wfpl/format.php');
+require_once(__DIR__ . '/encode.php');
+require_once(__DIR__ . '/format.php');
 
 # db_connect() -- connect to a mysql database
 #
diff --git a/dwt.php b/dwt.php
index 0837b35..9bdc5c6 100644 (file)
--- a/dwt.php
+++ b/dwt.php
@@ -15,7 +15,7 @@
 #  You should have received a copy of the GNU General Public License
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-require_once('code/wfpl/file.php');
+require_once(__DIR__ . '/file.php');
 
 function dwt_reset() {
        $GLOBALS['_dwt_keys'] = array('<!-- TemplateEndEditable -->');
diff --git a/fdb.php b/fdb.php
index bfc54d6..d008cec 100644 (file)
--- a/fdb.php
+++ b/fdb.php
@@ -29,8 +29,8 @@
 # fdb_set_dir() passing the path to that directory.
 
 
-require_once('code/wfpl/file.php');
-require_once('code/wfpl/binary.php');
+require_once(__DIR__ . '/file.php');
+require_once(__DIR__ . '/binary.php');
 
 # call this to set what directory is used to store the files
 function fdb_set_dir($dir) {
index e34f4b3..17d0461 100644 (file)
@@ -293,13 +293,13 @@ function format_dollars($str) {
 # date is edited as mm/dd/yyyy but stored as yyyy-mm-dd
 function format_mdy_to_ymd($str) {
        if($str == '') return '';
-       require_once('code/wfpl/time.php');
+       require_once(__DIR__ . '/time.php');
        return mdy_to_ymd(format_oneline($str));
 }
 
 # date is yyyy-mm-dd
 function format_ymd($str) {
-       require_once('code/wfpl/time.php');
+       require_once(__DIR__ . '/time.php');
        list($year, $month, $day) = ymd_clean($str);
        return sprintf('%04u-%02u-%02u', $year, $month, $day);
 }
index 8c66ee2..98ada56 100644 (file)
@@ -51,7 +51,7 @@
 #       </div>
 #    <!--~}~-->
 
-require_once('code/wfpl/template.php');
+require_once(__DIR__ . '/template.php');
 
 # call this to display a message
 function message($msg) {
index a16e92f..deba1de 100644 (file)
 
 # This file writes the code for you (sql, php, html, email) to handle a form.
 
-require_once('code/wfpl/template.php');
-require_once('code/wfpl/http.php');
-require_once('code/wfpl/tar.php');
-require_once('code/wfpl/format.php');
+require_once(__DIR__ . '/template.php');
+require_once(__DIR__ . '/http.php');
+require_once(__DIR__ . '/tar.php');
+require_once(__DIR__ . '/format.php');
 
 # see code/wfpl/metaform/template.html for the html templates for these elements
 $GLOBALS['types'] = array(
index 6f0148c..d2e57b6 100644 (file)
@@ -23,9 +23,9 @@
 
 # see messages.php for documentation on how to use it.
 
-require_once('code/wfpl/session.php');
-require_once('code/wfpl/string_array.php');
-require_once('code/wfpl/messages.php');
+require_once(__DIR__ . '/session.php');
+require_once(__DIR__ . '/string_array.php');
+require_once(__DIR__ . '/messages.php');
 
 function session_save_messages() {
        if(!isset($GLOBALS['wfpl_messages'])) {
index d11376f..2e4a8e3 100644 (file)
@@ -18,7 +18,7 @@
 
 # This file contains code to convert an array into a string, and back again.
 
-require_once('code/wfpl/binary.php');
+require_once(__DIR__ . '/binary.php');
 
 function string_to_array($data) {
        $header_count = pop_int($data);
index 8e0028b..5d35ff7 100644 (file)
@@ -37,9 +37,9 @@
 # tem_auto_* function to munge the data, automating certain common use 
 # cases.  See the comments on the tem_auto functions for more details.
 
-require_once('code/wfpl/encode.php');
-require_once('code/wfpl/file.php');
-require_once('code/wfpl/misc.php');
+require_once(__DIR__ . '/encode.php');
+require_once(__DIR__ . '/file.php');
+require_once(__DIR__ . '/misc.php');
 
 
 # Top-Level Functions
index b1fe9b0..5672936 100644 (file)
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-require_once('code/wfpl/template.php');
-require_once('code/wfpl/encode.php');
-require_once('code/wfpl/session.php');
-require_once('code/wfpl/upload.php'); # FIXME for path_to() which should be somewhere else
+require_once(__DIR__ . '/template.php');
+require_once(__DIR__ . '/encode.php');
+require_once(__DIR__ . '/session.php');
+require_once(__DIR__ . '/upload.php'); # FIXME for path_to() which should be somewhere else
 
 # This function is for making an uploader with a progress bar.
 #