diff options
| -rw-r--r-- | action.php | 2 | ||||
| -rw-r--r-- | admin_site_merge.php | 1 | ||||
| -rw-r--r-- | admin_trees_places.php | 1 | ||||
| -rw-r--r-- | edit_changes.php | 1 | ||||
| -rw-r--r-- | import.php | 1 | ||||
| -rw-r--r-- | includes/session.php | 15 | ||||
| -rw-r--r-- | library/WT/Controller/Family.php | 1 | ||||
| -rw-r--r-- | library/WT/Controller/Individual.php | 1 | ||||
| -rw-r--r-- | library/WT/Controller/Media.php | 1 | ||||
| -rw-r--r-- | library/WT/Controller/Note.php | 1 | ||||
| -rw-r--r-- | library/WT/Controller/Repository.php | 1 | ||||
| -rw-r--r-- | library/WT/Controller/Source.php | 1 |
12 files changed, 8 insertions, 19 deletions
diff --git a/action.php b/action.php index fa055ef04b..ac16be5c56 100644 --- a/action.php +++ b/action.php @@ -55,7 +55,6 @@ if (!WT_Filter::checkCsrf()) { switch (WT_Filter::post('action')) { case 'accept-changes': // Accept all the pending changes for a record - require WT_ROOT.'includes/functions/functions_import.php'; $record = WT_GedcomRecord::getInstance(WT_Filter::post('xref', WT_REGEX_XREF)); if ($record && WT_USER_CAN_ACCEPT && $record->canShow() && $record->canEdit()) { WT_FlashMessages::addMessage(/* I18N: %s is the name of an individual, source or other record */ WT_I18N::translate('The changes to ā%sā have been accepted.', $record->getFullName())); @@ -232,7 +231,6 @@ case 'unlink-media': case 'reject-changes': // Reject all the pending changes for a record - require WT_ROOT.'includes/functions/functions_import.php'; $record=WT_GedcomRecord::getInstance(WT_Filter::post('xref', WT_REGEX_XREF)); if ($record && WT_USER_CAN_ACCEPT && $record->canShow() && $record->canEdit()) { WT_FlashMessages::addMessage(/* I18N: %s is the name of an individual, source or other record */ WT_I18N::translate('The changes to ā%sā have been rejected.', $record->getFullName())); diff --git a/admin_site_merge.php b/admin_site_merge.php index 5c707661ba..c3d1b99e5b 100644 --- a/admin_site_merge.php +++ b/admin_site_merge.php @@ -37,7 +37,6 @@ $controller ->pageHeader(); require_once WT_ROOT.'includes/functions/functions_edit.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; $ged = $GEDCOM; $gid1 = WT_Filter::post('gid1', WT_REGEX_XREF); diff --git a/admin_trees_places.php b/admin_trees_places.php index b87556ba4b..80fe9955ca 100644 --- a/admin_trees_places.php +++ b/admin_trees_places.php @@ -23,7 +23,6 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'admin_trees_places.php'); require './includes/session.php'; -require WT_ROOT . 'includes/functions/functions_import.php'; require WT_ROOT . 'includes/functions/functions_edit.php'; $search = WT_Filter::post('search'); diff --git a/edit_changes.php b/edit_changes.php index ecfffb1bef..66e4615b5e 100644 --- a/edit_changes.php +++ b/edit_changes.php @@ -26,7 +26,6 @@ use WT\Log; define('WT_SCRIPT_NAME', 'edit_changes.php'); require './includes/session.php'; -require WT_ROOT.'includes/functions/functions_import.php'; $controller=new WT_Controller_Simple(); $controller diff --git a/import.php b/import.php index 20858d42a9..6eec5c3efd 100644 --- a/import.php +++ b/import.php @@ -28,7 +28,6 @@ define('WT_SCRIPT_NAME', 'import.php'); require './includes/session.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; if (!WT_USER_GEDCOM_ADMIN) { header('HTTP/1.1 403 Access Denied'); diff --git a/includes/session.php b/includes/session.php index 33d907aae5..7d58dc659f 100644 --- a/includes/session.php +++ b/includes/session.php @@ -244,13 +244,14 @@ if (!isset($_SERVER['HTTP_USER_AGENT'])) { $_SERVER['HTTP_USER_AGENT'] = ''; } -// Common functions -require WT_ROOT.'includes/functions/functions.php'; -require WT_ROOT.'includes/functions/functions_db.php'; -require WT_ROOT.'includes/functions/functions_print.php'; -require WT_ROOT.'includes/functions/functions_mediadb.php'; -require WT_ROOT.'includes/functions/functions_date.php'; -require WT_ROOT.'includes/functions/functions_charts.php'; +// Common functions - move these to classes so we can autoload them. +require WT_ROOT . 'includes/functions/functions.php'; +require WT_ROOT . 'includes/functions/functions_db.php'; +require WT_ROOT . 'includes/functions/functions_print.php'; +require WT_ROOT . 'includes/functions/functions_mediadb.php'; +require WT_ROOT . 'includes/functions/functions_date.php'; +require WT_ROOT . 'includes/functions/functions_charts.php'; +require WT_ROOT . 'includes/functions/functions_import.php'; // Set a custom error handler set_error_handler(function ($errno, $errstr) { diff --git a/library/WT/Controller/Family.php b/library/WT/Controller/Family.php index d884871341..3334e5e7f4 100644 --- a/library/WT/Controller/Family.php +++ b/library/WT/Controller/Family.php @@ -24,7 +24,6 @@ use WT\Auth; require_once WT_ROOT.'includes/functions/functions_print_facts.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; class WT_Controller_Family extends WT_Controller_GedcomRecord { public function __construct() { diff --git a/library/WT/Controller/Individual.php b/library/WT/Controller/Individual.php index e433ab91ef..2ac07965a9 100644 --- a/library/WT/Controller/Individual.php +++ b/library/WT/Controller/Individual.php @@ -25,7 +25,6 @@ use WT\Auth; use WT\User; require_once WT_ROOT.'includes/functions/functions_print_facts.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; class WT_Controller_Individual extends WT_Controller_GedcomRecord { public $name_count = 0; diff --git a/library/WT/Controller/Media.php b/library/WT/Controller/Media.php index a648cedbb8..c94f5d6fc7 100644 --- a/library/WT/Controller/Media.php +++ b/library/WT/Controller/Media.php @@ -24,7 +24,6 @@ use WT\Auth; require_once WT_ROOT.'includes/functions/functions_print_facts.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; class WT_Controller_Media extends WT_Controller_GedcomRecord { diff --git a/library/WT/Controller/Note.php b/library/WT/Controller/Note.php index f829d46505..5c95aff884 100644 --- a/library/WT/Controller/Note.php +++ b/library/WT/Controller/Note.php @@ -22,7 +22,6 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA require_once WT_ROOT.'includes/functions/functions_print_facts.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; class WT_Controller_Note extends WT_Controller_GedcomRecord { public function __construct() { diff --git a/library/WT/Controller/Repository.php b/library/WT/Controller/Repository.php index 3a48cdf039..add2797ead 100644 --- a/library/WT/Controller/Repository.php +++ b/library/WT/Controller/Repository.php @@ -24,7 +24,6 @@ use WT\Auth; require_once WT_ROOT.'includes/functions/functions_print_facts.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; class WT_Controller_Repository extends WT_Controller_GedcomRecord { public function __construct() { diff --git a/library/WT/Controller/Source.php b/library/WT/Controller/Source.php index 19399bb950..4812c49c71 100644 --- a/library/WT/Controller/Source.php +++ b/library/WT/Controller/Source.php @@ -24,7 +24,6 @@ use WT\Auth; require_once WT_ROOT.'includes/functions/functions_print_facts.php'; -require_once WT_ROOT.'includes/functions/functions_import.php'; class WT_Controller_Source extends WT_Controller_GedcomRecord { public function __construct() { |
