diff --git a/ajax.php b/ajax.php index 9001426b4..95efc6218 100644 --- a/ajax.php +++ b/ajax.php @@ -4,6 +4,7 @@ * This is the handler for Ajax httpXmlRequests. */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -11,7 +12,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/autocomplete_ajax.php b/autocomplete_ajax.php index 1b1714ca4..a7213ad8f 100644 --- a/autocomplete_ajax.php +++ b/autocomplete_ajax.php @@ -18,6 +18,7 @@ * } */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -25,7 +26,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/events_ajax.php b/events_ajax.php index 45752b25b..35ba29061 100644 --- a/events_ajax.php +++ b/events_ajax.php @@ -12,6 +12,7 @@ * TODO: hide private events of other users. */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; require_once 'includes/classes/Event.php'; require_once 'includes/classes/RptEvent.php'; @@ -21,7 +22,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); @@ -33,8 +33,8 @@ // Load Doc classes for attachments and comments require_once 'includes/classes/Doc.php'; require_once 'includes/classes/DocList.php'; -require_once 'includes/classes/CommentList.php'; require_once 'includes/classes/AttachmentList.php'; +require_once 'includes/classes/CommentList.php'; $WebCalendar->initializeSecondPhase(); diff --git a/freebusy.php b/freebusy.php index 9e5028790..75ed29a25 100644 --- a/freebusy.php +++ b/freebusy.php @@ -41,6 +41,7 @@ */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; require_once 'includes/classes/Event.php'; require_once 'includes/classes/RptEvent.php'; @@ -50,7 +51,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/icalclient.php b/icalclient.php index 0ac31f41a..1e0bf99f0 100644 --- a/icalclient.php +++ b/icalclient.php @@ -82,6 +82,7 @@ */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -89,7 +90,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/includes/init.php b/includes/init.php index dc487c04b..778f6e30d 100644 --- a/includes/init.php +++ b/includes/init.php @@ -19,18 +19,18 @@ * 3. call the print_header function with proper arguments * * What gets called: + * - require_once 'includes/translate.php'; + * - require_once 'includes/functions.php'; + * - require_once 'includes/classes/WebCalendar.php'; * - require_once "includes/$user_inc"; * - require_once 'includes/access.php'; * - require_once 'includes/assert.php'; * - require_once 'includes/classes/Event.php'; * - require_once 'includes/classes/RptEvent.php'; - * - require_once 'includes/classes/WebCalendar.php'; * - require_once 'includes/config.php'; * - require_once 'includes/dbi4php.php'; * - require_once 'includes/formvars.php'; - * - require_once 'includes/functions.php'; * - require_once 'includes/site_extras.php'; - * - require_once 'includes/translate.php'; * - require_once 'includes/validate.php'; * * Also, for month.php, day.php, week.php, week_details.php: @@ -49,9 +49,10 @@ } require_once 'includes/translate.php'; +require_once 'includes/functions.php'; +require_once 'includes/classes/WebCalendar.php'; require_once 'includes/classes/Event.php'; require_once 'includes/classes/RptEvent.php'; -require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -59,7 +60,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/layers_ajax.php b/layers_ajax.php index 57db7ec96..a03fb9d79 100644 --- a/layers_ajax.php +++ b/layers_ajax.php @@ -4,6 +4,7 @@ * Handler for AJAX requests from layers.php. */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -11,7 +12,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/login-app.php b/login-app.php index 31bdfd07b..e56eca673 100644 --- a/login-app.php +++ b/login-app.php @@ -1,5 +1,6 @@ initializeFirstPhase(); diff --git a/login.php b/login.php index cadba7294..78779a53e 100644 --- a/login.php +++ b/login.php @@ -1,6 +1,7 @@ initializeFirstPhase(); diff --git a/publish.php b/publish.php index 8f5be190f..3dd85ac5b 100644 --- a/publish.php +++ b/publish.php @@ -24,6 +24,7 @@ */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -31,7 +32,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/register.php b/register.php index c342932b7..3514c4b3b 100644 --- a/register.php +++ b/register.php @@ -5,6 +5,7 @@ unset ( $_SESSION['webcalendar_session'] ); require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -12,7 +13,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/rss.php b/rss.php index f69589b58..76798916c 100644 --- a/rss.php +++ b/rss.php @@ -44,7 +44,6 @@ * * We do not include unapproved events in the RSS feed. * - * * TODO * Add other RSS 2.0 options such as media. * Add : dan@spam_me.com (Dan Deletekey) @@ -52,26 +51,24 @@ $debug = false; -include_once 'includes/translate.php'; +require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; require_once 'includes/classes/Event.php'; require_once 'includes/classes/RptEvent.php'; $WebCalendar = new WebCalendar( __FILE__ ); -include 'includes/formvars.php'; -include 'includes/functions.php'; -include 'includes/config.php'; -include 'includes/dbi4php.php'; +require_once 'includes/formvars.php'; +require_once 'includes/config.php'; +require_once 'includes/dbi4php.php'; $WebCalendar->initializeFirstPhase(); -include 'includes/' . $user_inc; - +require_once "includes/$user_inc"; include_once 'includes/validate.php'; -include 'includes/site_extras.php'; - -include_once 'includes/xcal.php'; +require_once 'includes/site_extras.php'; +require_once 'includes/xcal.php'; $WebCalendar->initializeSecondPhase(); diff --git a/rss_activity_log.php b/rss_activity_log.php index cacee5c91..20fbe52c0 100644 --- a/rss_activity_log.php +++ b/rss_activity_log.php @@ -34,6 +34,7 @@ */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -42,7 +43,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/rss_unapproved.php b/rss_unapproved.php index d0dd61240..7948ec653 100644 --- a/rss_unapproved.php +++ b/rss_unapproved.php @@ -33,6 +33,7 @@ */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar( __FILE__ ); @@ -41,7 +42,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase(); diff --git a/users_ajax.php b/users_ajax.php index 8d3a0d849..0ff002a0f 100644 --- a/users_ajax.php +++ b/users_ajax.php @@ -5,6 +5,7 @@ * and remotecal_mgmt.php. */ require_once 'includes/translate.php'; +require_once 'includes/functions.php'; require_once 'includes/classes/WebCalendar.php'; $WebCalendar = new WebCalendar(__FILE__); @@ -12,7 +13,6 @@ require_once 'includes/config.php'; require_once 'includes/dbi4php.php'; require_once 'includes/formvars.php'; -require_once 'includes/functions.php'; $WebCalendar->initializeFirstPhase();