From a4a6645c3a3a6a811d5571aae0f21a17576b27d5 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 6 Oct 2014 21:24:32 +0100 Subject: Whitespace changes to reduce merge conflicts with the assets branch --- admin.php | 2 +- admin_media.php | 2 +- admin_media_upload.php | 2 +- admin_module_blocks.php | 2 +- admin_module_menus.php | 2 +- admin_module_reports.php | 2 +- admin_module_sidebar.php | 2 +- admin_module_tabs.php | 2 +- admin_modules.php | 2 +- admin_site_access.php | 2 +- admin_site_change.php | 2 +- admin_site_clean.php | 2 +- admin_site_config.php | 2 +- admin_site_info.php | 2 +- admin_site_logs.php | 2 +- admin_site_merge.php | 5 +- admin_site_other.php | 2 +- admin_trees_check.php | 2 +- admin_trees_config.php | 5 +- admin_trees_download.php | 2 +- admin_trees_export.php | 2 +- admin_trees_manage.php | 4 +- admin_trees_merge.php | 2 +- admin_trees_places.php | 2 +- admin_trees_renumber.php | 2 +- admin_users.php | 2 +- admin_users_bulk.php | 2 +- ancestry.php | 2 +- block_edit.php | 2 +- branches.php | 2 +- calendar.php | 2 +- compact.php | 2 +- descendancy.php | 2 +- edit_changes.php | 2 +- edit_interface.php | 2 +- editnews.php | 2 +- edituser.php | 2 +- family.php | 2 +- familybook.php | 2 +- famlist.php | 2 +- fanchart.php | 2 +- find.php | 2 +- gedrecord.php | 2 +- hourglass.php | 4 +- hourglass_ajax.php | 2 +- import.php | 2 +- includes/db_schema/db_schema_27_28.php | 2 +- includes/session.php | 2 +- index.php | 2 +- index_edit.php | 2 +- indilist.php | 2 +- individual.php | 2 +- inverselink.php | 2 +- js/webtrees-1.5.4.js | 42 ++--- library/WT/Controller/Simple.php | 2 + library/autoload.php | 2 +- library/composer/autoload_real.php | 10 +- lifespan.php | 175 ++++++++++----------- mediaviewer.php | 19 ++- message.php | 2 +- modules_v3/GEDFact_assistant/MEDIA_ctrl.php | 2 +- .../GEDFact_assistant/_CENS/census_3_find.php | 2 +- modules_v3/GEDFact_assistant/module.php | 3 +- modules_v3/batch_update/module.php | 2 +- modules_v3/charts/module.php | 2 +- modules_v3/ckeditor/module.php | 11 +- modules_v3/clippings/module.php | 8 +- modules_v3/families/module.php | 4 +- modules_v3/family_nav/module.php | 12 +- modules_v3/faq/module.php | 4 +- modules_v3/googlemap/module.php | 12 +- modules_v3/individuals/module.php | 10 +- modules_v3/login_block/module.php | 15 +- modules_v3/sitemap/module.php | 2 +- modules_v3/stories/module.php | 10 +- modules_v3/todo/module.php | 40 ++--- modules_v3/tree/module.php | 5 + note.php | 19 ++- notelist.php | 2 +- pedigree.php | 2 +- relationship.php | 15 +- repo.php | 19 ++- repolist.php | 2 +- search.php | 5 +- search_advanced.php | 2 +- source.php | 19 ++- sourcelist.php | 2 +- statistics.php | 2 +- statisticsplot.php | 2 +- themes/clouds/header.php | 1 + themes/colors/header.php | 1 - themes/fab/header.php | 6 +- themes/webtrees/header.php | 1 + timeline.php | 35 +++-- 94 files changed, 331 insertions(+), 316 deletions(-) diff --git a/admin.php b/admin.php index 6725964e2b..618d7db16c 100644 --- a/admin.php +++ b/admin.php @@ -26,7 +26,7 @@ define('WT_SCRIPT_NAME', 'admin.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->addInlineJavascript('jQuery("#x").accordion({heightStyle: "content"});') diff --git a/admin_media.php b/admin_media.php index 0a95ef3979..3f37a9a6f5 100644 --- a/admin_media.php +++ b/admin_media.php @@ -566,7 +566,7 @@ function mediaObjectInfo(WT_Media $media) { // selected folder. $table_id=md5($files.$media_folder.$media_path.$subfolders); -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Media')) diff --git a/admin_media_upload.php b/admin_media_upload.php index da20831780..90818beeb9 100644 --- a/admin_media_upload.php +++ b/admin_media_upload.php @@ -28,7 +28,7 @@ define('WT_SCRIPT_NAME', 'admin_media_upload.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_mediadb.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Upload media files')); diff --git a/admin_module_blocks.php b/admin_module_blocks.php index a0fcac422f..c3a2b8bd16 100644 --- a/admin_module_blocks.php +++ b/admin_module_blocks.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_module_blocks.php'); require 'includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Module administration') . ' — ' . WT_I18N::translate('Blocks')) diff --git a/admin_module_menus.php b/admin_module_menus.php index 44ae8133a4..1edc57146f 100644 --- a/admin_module_menus.php +++ b/admin_module_menus.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_module_menus.php'); require 'includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Module administration') . ' — ' . WT_I18N::translate('Menus')) diff --git a/admin_module_reports.php b/admin_module_reports.php index be306723c4..2676158281 100644 --- a/admin_module_reports.php +++ b/admin_module_reports.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_module_reports.php'); require 'includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Module administration') . ' — ' . WT_I18N::translate('Reports')) diff --git a/admin_module_sidebar.php b/admin_module_sidebar.php index 8b942b6dc9..58dab5b356 100644 --- a/admin_module_sidebar.php +++ b/admin_module_sidebar.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_module_sidebar.php'); require 'includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Module administration') . ' — ' . WT_I18N::translate('Sidebars')) diff --git a/admin_module_tabs.php b/admin_module_tabs.php index d46e939382..4286b5fd55 100644 --- a/admin_module_tabs.php +++ b/admin_module_tabs.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_module_tabs.php'); require 'includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Module administration') . ' — ' . WT_I18N::translate('Tabs')) diff --git a/admin_modules.php b/admin_modules.php index fc8b8f567a..c1379484dd 100644 --- a/admin_modules.php +++ b/admin_modules.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_modules.php'); require 'includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Module administration')); diff --git a/admin_site_access.php b/admin_site_access.php index 72b66254c6..9b4897c98e 100644 --- a/admin_site_access.php +++ b/admin_site_access.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_site_access.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->addExternalJavascript(WT_JQUERY_DATATABLES_URL) diff --git a/admin_site_change.php b/admin_site_change.php index b52965c8a9..60b6721e45 100644 --- a/admin_site_change.php +++ b/admin_site_change.php @@ -24,7 +24,7 @@ use WT\User; define('WT_SCRIPT_NAME', 'admin_site_change.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Changes')); diff --git a/admin_site_clean.php b/admin_site_clean.php index fbb9395c2b..831d6fb7d1 100644 --- a/admin_site_clean.php +++ b/admin_site_clean.php @@ -24,7 +24,7 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'admin_site_clean.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(/* I18N: The “Data folder” is a configuration setting */ WT_I18N::translate('Clean up data folder')) diff --git a/admin_site_config.php b/admin_site_config.php index e6969b20e2..8b1a473a02 100644 --- a/admin_site_config.php +++ b/admin_site_config.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_site_config.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->addExternalJavascript(WT_JQUERY_JEDITABLE_URL) diff --git a/admin_site_info.php b/admin_site_info.php index 7201340a0f..1e9677bab2 100644 --- a/admin_site_info.php +++ b/admin_site_info.php @@ -28,7 +28,7 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'admin_site_info.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('PHP information')) diff --git a/admin_site_logs.php b/admin_site_logs.php index 7e3c28fdf1..88a0c09cce 100644 --- a/admin_site_logs.php +++ b/admin_site_logs.php @@ -24,7 +24,7 @@ use WT\User; define('WT_SCRIPT_NAME', 'admin_site_logs.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Logs')); diff --git a/admin_site_merge.php b/admin_site_merge.php index c3d1b99e5b..db7361f792 100644 --- a/admin_site_merge.php +++ b/admin_site_merge.php @@ -27,8 +27,9 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'admin_site_merge.php'); require './includes/session.php'; +require_once WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page; +$controller = new WT_Controller_Page; $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Merge records')) @@ -36,8 +37,6 @@ $controller ->addInlineJavascript('autocomplete();') ->pageHeader(); -require_once WT_ROOT.'includes/functions/functions_edit.php'; - $ged = $GEDCOM; $gid1 = WT_Filter::post('gid1', WT_REGEX_XREF); $gid2 = WT_Filter::post('gid2', WT_REGEX_XREF); diff --git a/admin_site_other.php b/admin_site_other.php index 014d300c4e..7dbca56f92 100644 --- a/admin_site_other.php +++ b/admin_site_other.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'admin_site_other.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Add unlinked records')) diff --git a/admin_trees_check.php b/admin_trees_check.php index 832d0a12d9..b5677803b6 100644 --- a/admin_trees_check.php +++ b/admin_trees_check.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_trees_check.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Check for errors')) diff --git a/admin_trees_config.php b/admin_trees_config.php index f9bcef8f7f..86667da8bb 100644 --- a/admin_trees_config.php +++ b/admin_trees_config.php @@ -27,14 +27,13 @@ use WT\User; define('WT_SCRIPT_NAME', 'admin_trees_config.php'); require './includes/session.php'; +require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Family tree configuration')); -require WT_ROOT.'includes/functions/functions_edit.php'; - $PRIVACY_CONSTANTS = array( 'none' => WT_I18N::translate('Show to visitors'), 'privacy' => WT_I18N::translate('Show to members'), diff --git a/admin_trees_download.php b/admin_trees_download.php index 4de90e930e..c4252241e9 100644 --- a/admin_trees_download.php +++ b/admin_trees_download.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'admin_trees_download.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_export.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->setPageTitle(WT_I18N::translate('Download GEDCOM')) ->restrictAccess(Auth::isManager()); diff --git a/admin_trees_export.php b/admin_trees_export.php index 1bc2425881..0e2ece4c95 100644 --- a/admin_trees_export.php +++ b/admin_trees_export.php @@ -23,7 +23,7 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'admin_trees_export.php'); require './includes/session.php'; -$controller=new WT_Controller_Ajax(); +$controller = new WT_Controller_Ajax(); $controller ->pageHeader() ->restrictAccess(Auth::isManager()); diff --git a/admin_trees_manage.php b/admin_trees_manage.php index 196a3d2f32..ec3feb310b 100644 --- a/admin_trees_manage.php +++ b/admin_trees_manage.php @@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'admin_trees_manage.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Family trees')); @@ -196,7 +196,7 @@ foreach (WT_Tree::GetAll() as $tree) { )->execute(array($tree->tree_id))->fetchOne(); if (!$in_progress) { echo '
', WT_I18N::translate('Deleting old genealogy data…'), '
'; - $controller->addInlineJavascript( + $controller->addInlineJavascript( 'jQuery("#progressbar'.$tree->tree_id.'").progressbar({value: 0});' ); } else { diff --git a/admin_trees_merge.php b/admin_trees_merge.php index 850daf1c9c..29c6b29cc5 100644 --- a/admin_trees_merge.php +++ b/admin_trees_merge.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'admin_trees_merge.php'); require './includes/session.php'; require WT_ROOT . 'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Merge family trees')) diff --git a/admin_trees_places.php b/admin_trees_places.php index 85b734d791..c407d8224d 100644 --- a/admin_trees_places.php +++ b/admin_trees_places.php @@ -75,7 +75,7 @@ if ($search && $replace) { } } -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Administration - place edit')) diff --git a/admin_trees_renumber.php b/admin_trees_renumber.php index 81dcadf412..03f1d98246 100644 --- a/admin_trees_renumber.php +++ b/admin_trees_renumber.php @@ -23,7 +23,7 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'admin_trees_renumber.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isManager()) ->setPageTitle(WT_I18N::translate('Renumber family tree')) diff --git a/admin_users.php b/admin_users.php index 0bd2650aaa..5ad2983f97 100644 --- a/admin_users.php +++ b/admin_users.php @@ -28,7 +28,7 @@ use WT\User; define('WT_SCRIPT_NAME', 'admin_users.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('User administration')); diff --git a/admin_users_bulk.php b/admin_users_bulk.php index 576c724f8e..72b61f08fe 100644 --- a/admin_users_bulk.php +++ b/admin_users_bulk.php @@ -28,7 +28,7 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'admin_users_bulk.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->restrictAccess(Auth::isAdmin()) ->setPageTitle(WT_I18N::translate('Send broadcast messages')) diff --git a/ancestry.php b/ancestry.php index 63f68a17d5..e7aa48fdc4 100644 --- a/ancestry.php +++ b/ancestry.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'ancestry.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_print_lists.php'; -$controller=new WT_Controller_Ancestry(); +$controller = new WT_Controller_Ancestry(); $controller ->pageHeader() ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') diff --git a/block_edit.php b/block_edit.php index dae1438c37..42d2ac9ea5 100644 --- a/block_edit.php +++ b/block_edit.php @@ -41,7 +41,7 @@ if ( $class_name=$block->module_name.'_WT_Module'; $block=new $class_name; -$controller=new WT_Controller_Ajax(); +$controller = new WT_Controller_Ajax(); $controller->pageHeader(); if (array_key_exists('ckeditor', WT_Module::getActiveModules())) { diff --git a/branches.php b/branches.php index 052ea74fb0..3fbbd4b9fb 100644 --- a/branches.php +++ b/branches.php @@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'branches.php'); require './includes/session.php'; -$controller=new WT_Controller_Branches(); +$controller = new WT_Controller_Branches(); $controller ->pageHeader() ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') diff --git a/calendar.php b/calendar.php index 5ef23b3065..1b7f1eebb6 100644 --- a/calendar.php +++ b/calendar.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'calendar.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_print_lists.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller->setPageTitle(WT_I18N::translate('Anniversary calendar')); $controller->pageHeader(); diff --git a/compact.php b/compact.php index 2c0dada908..41d4b7eb77 100644 --- a/compact.php +++ b/compact.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'compact.php'); require './includes/session.php'; -$controller=new WT_Controller_Compact(); +$controller = new WT_Controller_Compact(); $controller ->pageHeader() ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') diff --git a/descendancy.php b/descendancy.php index 89bd917679..7b287406ca 100644 --- a/descendancy.php +++ b/descendancy.php @@ -26,7 +26,7 @@ require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_edit.php'; require_once WT_ROOT.'includes/functions/functions_print_lists.php'; -$controller=new WT_Controller_Descendancy(); +$controller = new WT_Controller_Descendancy(); $controller ->pageHeader() ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') diff --git a/edit_changes.php b/edit_changes.php index 66e4615b5e..2c2f3dd6b9 100644 --- a/edit_changes.php +++ b/edit_changes.php @@ -27,7 +27,7 @@ use WT\Log; define('WT_SCRIPT_NAME', 'edit_changes.php'); require './includes/session.php'; -$controller=new WT_Controller_Simple(); +$controller = new WT_Controller_Simple(); $controller ->restrictAccess(Auth::isModerator()) ->setPageTitle(WT_I18N::translate('Pending changes')) diff --git a/edit_interface.php b/edit_interface.php index 639c7b55a8..3edacd9963 100644 --- a/edit_interface.php +++ b/edit_interface.php @@ -29,7 +29,7 @@ require WT_ROOT.'includes/functions/functions_edit.php'; $action = WT_Filter::post('action', null, WT_Filter::get('action')); -$controller=new WT_Controller_Simple(); +$controller = new WT_Controller_Simple(); $controller ->restrictAccess(Auth::isEditor()) ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') diff --git a/editnews.php b/editnews.php index b4df806e65..803d3d571e 100644 --- a/editnews.php +++ b/editnews.php @@ -28,7 +28,7 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'editnews.php'); require './includes/session.php'; -$controller=new WT_Controller_Simple(); +$controller = new WT_Controller_Simple(); $controller ->setPageTitle(WT_I18N::translate('Add/edit a journal/news entry')) ->restrictAccess(Auth::isMember()) diff --git a/edituser.php b/edituser.php index 8575b89658..1d7ddc2c71 100644 --- a/edituser.php +++ b/edituser.php @@ -90,7 +90,7 @@ if ($form_action=='update' && WT_Filter::checkCsrf()) { } } -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $controller ->setPageTitle(WT_I18N::translate('User administration')) ->pageHeader() diff --git a/family.php b/family.php index 9b4ca2555e..9f1f0aa0d7 100644 --- a/family.php +++ b/family.php @@ -26,7 +26,7 @@ define('WT_SCRIPT_NAME', 'family.php'); require './includes/session.php'; -$controller=new WT_Controller_Family(); +$controller = new WT_Controller_Family(); if ($controller->record && $controller->record->canShow()) { $controller->pageHeader(); diff --git a/familybook.php b/familybook.php index 22de0f2e6e..2859eaf456 100644 --- a/familybook.php +++ b/familybook.php @@ -24,7 +24,7 @@ define('WT_SCRIPT_NAME', 'familybook.php'); require './includes/session.php'; -$controller=new WT_Controller_Familybook(); +$controller = new WT_Controller_Familybook(); $controller ->pageHeader() ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') diff --git a/famlist.php b/famlist.php index 077b6b531b..a688951198 100644 --- a/famlist.php +++ b/famlist.php @@ -30,7 +30,7 @@ define('WT_SCRIPT_NAME', 'famlist.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_print_lists.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); // We show three different lists: initials, surnames and individuals // Note that the data may contain special chars, such as surname="", diff --git a/fanchart.php b/fanchart.php index 8139df78a3..a8c8a6ad12 100644 --- a/fanchart.php +++ b/fanchart.php @@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'fanchart.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Fanchart(); +$controller = new WT_Controller_Fanchart(); if (WT_Filter::getBool('img')) { Zend_Session::writeClose(); diff --git a/find.php b/find.php index e19350d779..ff546b1fca 100644 --- a/find.php +++ b/find.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'find.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_print_lists.php'; -$controller=new WT_Controller_Simple(); +$controller = new WT_Controller_Simple(); $type = WT_Filter::get('type'); $filter = WT_Filter::get('filter'); diff --git a/gedrecord.php b/gedrecord.php index af3442ffe8..956ffe8617 100644 --- a/gedrecord.php +++ b/gedrecord.php @@ -22,7 +22,7 @@ define('WT_SCRIPT_NAME', 'gedrecord.php'); require './includes/session.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); $obj = WT_GedcomRecord::getInstance(WT_Filter::get('pid', WT_REGEX_XREF)); diff --git a/hourglass.php b/hourglass.php index 9564fd03ee..eaf855997a 100644 --- a/hourglass.php +++ b/hourglass.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'hourglass.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Hourglass(); +$controller = new WT_Controller_Hourglass(); $controller ->pageHeader() ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') @@ -41,7 +41,7 @@ $controller }); '); -$gencount=0; +$gencount = 0; ?>
diff --git a/hourglass_ajax.php b/hourglass_ajax.php index 1a55083a3c..56c163aebf 100644 --- a/hourglass_ajax.php +++ b/hourglass_ajax.php @@ -26,7 +26,7 @@ define('WT_SCRIPT_NAME', 'hourglass_ajax.php'); require './includes/session.php'; -$controller=new WT_Controller_Hourglass(); +$controller = new WT_Controller_Hourglass(); header('Content-type: text/html; charset=UTF-8'); diff --git a/import.php b/import.php index 57639ae56f..51cc2519b3 100644 --- a/import.php +++ b/import.php @@ -34,7 +34,7 @@ if (!WT_USER_GEDCOM_ADMIN) { exit; } -$controller=new WT_Controller_Ajax(); +$controller = new WT_Controller_Ajax(); $controller ->pageHeader(); diff --git a/includes/db_schema/db_schema_27_28.php b/includes/db_schema/db_schema_27_28.php index d8f2648b36..02e64f2245 100644 --- a/includes/db_schema/db_schema_27_28.php +++ b/includes/db_schema/db_schema_27_28.php @@ -54,7 +54,7 @@ try { " ADD INDEX `##site_access_rule_ix2` (rule)" ); } catch (Exception $ex) { - // Already done? + // Already done?git } // Update the version to indicate success diff --git a/includes/session.php b/includes/session.php index 68b5f05c92..9e5c800dc7 100644 --- a/includes/session.php +++ b/includes/session.php @@ -663,7 +663,7 @@ if ($SEARCH_SPIDER && !in_array(WT_SCRIPT_NAME , array( 'individual.php', 'family.php', 'mediaviewer.php', 'note.php', 'repo.php', 'source.php', ))) { header($_SERVER['SERVER_PROTOCOL'].' 403 Forbidden'); - $controller=new WT_Controller_Page(); + $controller = new WT_Controller_Page(); $controller->setPageTitle(WT_I18N::translate('Search engine')); $controller->pageHeader(); echo '

', WT_I18N::translate('You do not have permission to view this page.'), '

'; diff --git a/index.php b/index.php index 64b9537c53..bbaf604e85 100644 --- a/index.php +++ b/index.php @@ -81,7 +81,7 @@ if ($action == 'ajax') { exit; } -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); if ($ctype=='user') { $controller->restrictAccess(Auth::isMember()); } diff --git a/index_edit.php b/index_edit.php index 1f1568acca..cc51e76ede 100644 --- a/index_edit.php +++ b/index_edit.php @@ -26,7 +26,7 @@ use WT\Auth; define('WT_SCRIPT_NAME', 'index_edit.php'); require './includes/session.php'; -$controller=new WT_Controller_Ajax(); +$controller = new WT_Controller_Ajax(); // Only one of $user_id and $gedcom_id should be set $user_id = WT_Filter::get('user_id', WT_REGEX_INTEGER, WT_Filter::post('user_id', WT_REGEX_INTEGER)); diff --git a/indilist.php b/indilist.php index bdc3c69c59..b3161793c4 100644 --- a/indilist.php +++ b/indilist.php @@ -30,7 +30,7 @@ define('WT_SCRIPT_NAME', 'indilist.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_print_lists.php'; -$controller=new WT_Controller_Page(); +$controller = new WT_Controller_Page(); // We show three different lists: initials, surnames and individuals // Note that the data may contain special chars, such as surname="", diff --git a/individual.php b/individual.php index e87b78b3b8..9ac8e22692 100644 --- a/individual.php +++ b/individual.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'individual.php'); require './includes/session.php'; -$controller=new WT_Controller_Individual(); +$controller = new WT_Controller_Individual(); $controller ->addExternalJavascript(WT_JQUERY_COOKIE_URL); // We use this to record the sidebar state diff --git a/inverselink.php b/inverselink.php index bde73b16d0..0afcc40dbe 100644 --- a/inverselink.php +++ b/inverselink.php @@ -29,7 +29,7 @@ define('WT_SCRIPT_NAME', 'inverselink.php'); require './includes/session.php'; require WT_ROOT.'includes/functions/functions_edit.php'; -$controller=new WT_Controller_Simple(); +$controller = new WT_Controller_Simple(); $controller ->restrictAccess(Auth::isEditor()) ->setPageTitle(WT_I18N::translate('Link to an existing media object')) diff --git a/js/webtrees-1.5.4.js b/js/webtrees-1.5.4.js index 2448649c14..d27b0421d2 100644 --- a/js/webtrees-1.5.4.js +++ b/js/webtrees-1.5.4.js @@ -38,6 +38,9 @@ var fam_nav_specs='width=300,height=600,left=817,top=150,resizable=1,scrollbars= var pastefield, nameElement, remElement; // Elements to paste to +// "rtl" on right-to-left pages. +var textDirection = jQuery('html').attr('dir'); + // Create a modal dialog, fetching the contents from a URL function modalDialog(url, title, width) { jQuery('
') @@ -679,15 +682,16 @@ var menutimeouts = []; function show_submenu(elementid, parentid, dir) { var pagewidth = document.body.scrollWidth+document.documentElement.scrollLeft; var element = document.getElementById(elementid); + if (element && element.style) { - if (document.all) { - pagewidth = document.body.offsetWidth; - } else { - pagewidth = document.body.scrollWidth+document.documentElement.scrollLeft-55; - if (textDirection=="rtl") { - boxright = element.offsetLeft+element.offsetWidth+10; - } - } + if (document.all) { + pagewidth = document.body.offsetWidth; + } else { + pagewidth = document.body.scrollWidth+document.documentElement.scrollLeft-55; + if (textDirection === "rtl") { + boxright = element.offsetLeft+element.offsetWidth+10; + } + } //-- make sure the submenu is the size of the largest child var maxwidth = 0; @@ -715,16 +719,16 @@ function show_submenu(elementid, parentid, dir) { } else if (dir=="right") { pelement = document.getElementById(parentid); if (pelement) { - if (textDirection=="ltr") { - var boxleft = pelement.offsetLeft+pelement.offsetWidth-40; - boxright = boxleft+element.offsetWidth+10; - if (boxright > pagewidth) { - element.style.right = pelement.offsetLeft + "px"; + if (textDirection === "rtl") { + element.style.left = (pelement.offsetLeft - element.offsetWidth) + "px"; } else { - element.style.left=boxleft+"px"; - } - } else { - element.style.left = (pelement.offsetLeft-element.offsetWidth)+"px"; + var boxleft = pelement.offsetLeft + pelement.offsetWidth - 40; + boxright = boxleft + element.offsetWidth + 10; + if (boxright > pagewidth) { + element.style.right = pelement.offsetLeft + "px"; + } else { + element.style.left = boxleft + "px"; + } } element.style.top = pelement.offsetTop+"px"; } @@ -1153,8 +1157,8 @@ function activate_colorbox(config) { fixed: true, // Simple I18N - the text will need to come from PHP current: '', - previous: textDirection=='ltr' ? '\u25c0' : '\u25b6', // ◀ ▶ - next: textDirection=='ltr' ? '\u25b6' : '\u25c0', // ▶ ◀ + previous: textDirection === 'rtl' ? '\u25b6' : '\u25c0', // ▶ ◀ + next: textDirection === 'rtl' ? '\u25c0' : '\u25b6', // ◀ ▶ slideshowStart: '\u25cb', // ○ slideshowStop: '\u25cf', // ● close: '\u2715' // × diff --git a/library/WT/Controller/Simple.php b/library/WT/Controller/Simple.php index f33e269957..070e26a911 100644 --- a/library/WT/Controller/Simple.php +++ b/library/WT/Controller/Simple.php @@ -28,8 +28,10 @@ class WT_Controller_Simple extends WT_Controller_Page { // Simple (i.e. popup) windows are deprecated. public function pageHeader() { global $view; + $view='simple'; parent::pageHeader(); + return $this; } diff --git a/library/autoload.php b/library/autoload.php index 9638441536..a429d310dc 100644 --- a/library/autoload.php +++ b/library/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInite0030dcce627568b0e84276091dd1df6::getLoader(); +return ComposerAutoloaderInitcecc323105e12e5c649bf24af473df2f::getLoader(); diff --git a/library/composer/autoload_real.php b/library/composer/autoload_real.php index 44113db005..68ffbeea41 100644 --- a/library/composer/autoload_real.php +++ b/library/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInite0030dcce627568b0e84276091dd1df6 +class ComposerAutoloaderInitcecc323105e12e5c649bf24af473df2f { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInite0030dcce627568b0e84276091dd1df6 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInite0030dcce627568b0e84276091dd1df6', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcecc323105e12e5c649bf24af473df2f', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInite0030dcce627568b0e84276091dd1df6', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcecc323105e12e5c649bf24af473df2f', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; array_push($includePaths, get_include_path()); @@ -46,14 +46,14 @@ class ComposerAutoloaderInite0030dcce627568b0e84276091dd1df6 $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $file) { - composerRequiree0030dcce627568b0e84276091dd1df6($file); + composerRequirececc323105e12e5c649bf24af473df2f($file); } return $loader; } } -function composerRequiree0030dcce627568b0e84276091dd1df6($file) +function composerRequirececc323105e12e5c649bf24af473df2f($file) { require $file; } diff --git a/lifespan.php b/lifespan.php index c2efb9468b..642122cbe2 100644 --- a/lifespan.php +++ b/lifespan.php @@ -26,112 +26,111 @@ define('WT_SCRIPT_NAME', 'lifespan.php'); require './includes/session.php'; -$controller=new WT_Controller_Lifespan(); +$controller = new WT_Controller_Lifespan(); $controller ->pageHeader() ->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js') ->addInlineJavascript('autocomplete();') ->addInlineJavascript(' - var timer; - var offSetNum = 20; // amount timeline moves with each mouse click - var speed; + var timer; + var offSetNum = 20; // amount timeline moves with each mouse click + var speed; - // method for scrolling timeline around in portal. takes in a string for the direction the timeline is moving "Left" "Right" "Top" "Down" - function startScroll(move) { - speed = parseInt(document.buttons.speedMenu.options[document.buttons.speedMenu.selectedIndex].value) * 25; //Sets the speed of the scroll feature - timer = 1; - scroll(move); + // method for scrolling timeline around in portal. takes in a string for the direction the timeline is moving "Left" "Right" "Top" "Down" + function startScroll(move) { + speed = parseInt(document.buttons.speedMenu.options[document.buttons.speedMenu.selectedIndex].value) * 25; //Sets the speed of the scroll feature + timer = 1; + scroll(move); + } + function scroll(move) { + if (timer==null) return; // If timer is not set timeline doesn\'t scroll + timer = setTimeout("scroll(\'"+move+"\')",speed); // Keeps the timeline moving as long as the user holds down the mouse button on one of the direction arrows + topInnerDiv = document.getElementById("topInner"); + innerDiv = document.getElementById("inner"); + myouterDiv = document.getElementById("lifespan_chart"); + //compares the direction the timeline is moving and how far it can move in each direction. + if (move == "left" && ((maxX+topInnerDiv.offsetLeft+350) > (myouterDiv.offsetLeft+myouterDiv.offsetWidth))) { + left = (innerDiv.offsetLeft - offSetNum)+"px"; + innerDiv.style.left = left; + topInnerDiv.style.left = left; } - function scroll(move) { - if (timer==null) return; // If timer is not set timeline doesn\'t scroll - timer = setTimeout("scroll(\'"+move+"\')",speed); // Keeps the timeline moving as long as the user holds down the mouse button on one of the direction arrows - topInnerDiv = document.getElementById("topInner"); - innerDiv = document.getElementById("inner"); - myouterDiv = document.getElementById("lifespan_chart"); - //compares the direction the timeline is moving and how far it can move in each direction. - if (move == "left" && ((maxX+topInnerDiv.offsetLeft+350) > (myouterDiv.offsetLeft+myouterDiv.offsetWidth))) { - left = (innerDiv.offsetLeft - offSetNum)+"px"; - innerDiv.style.left = left; - topInnerDiv.style.left = left; - } - else if (move == "right" && topInnerDiv.offsetLeft < (-10)) { - right = (innerDiv.offsetLeft + offSetNum)+"px"; - innerDiv.style.left = right; - topInnerDiv.style.left = right; - } - else if (move == "up" && innerDiv.offsetTop > maxY) { - up = (innerDiv.offsetTop - offSetNum)+"px"; - innerDiv.style.top = up; - } - else if (move == "down" && innerDiv.offsetTop < -60) { - down = (innerDiv.offsetTop + offSetNum)+"px"; - innerDiv.style.top = down; - } + else if (move == "right" && topInnerDiv.offsetLeft < (-10)) { + right = (innerDiv.offsetLeft + offSetNum)+"px"; + innerDiv.style.left = right; + topInnerDiv.style.left = right; } - - //method used to stop scrolling - function stopScroll() { - if (timer) clearTimeout(timer); - timer=null; - } - - var oldMx = 0; - var oldMy = 0; - var movei1 = ""; - var movei2 = ""; - function pandiv() { - if (movei1=="") { - oldMx = msX; - oldMy = msY; - } - i = document.getElementById("topInner"); - //alert(i.style.top); - movei1 = i; - i = document.getElementById("inner"); - movei2 = i; - return false; + else if (move == "up" && innerDiv.offsetTop > maxY) { + up = (innerDiv.offsetTop - offSetNum)+"px"; + innerDiv.style.top = up; } - function releaseimage() { - movei1 = ""; - movei2 = ""; - return true; + else if (move == "down" && innerDiv.offsetTop < -60) { + down = (innerDiv.offsetTop + offSetNum)+"px"; + innerDiv.style.top = down; } - // Main function to retrieve mouse x-y pos.s - function getMouseXY(e) { - var event = e || window.event; - if (typeof event.pageX === "undefined" || typeof event.pageY === "undefined") { - msX = event.clientX + document.documentElement.scrollLeft; - msY = event.clientY + document.documentElement.scrollTop; - } else { - msX = e.pageX; - msY = e.pageY; - } - // catch possible negative values in NS4 - if (msX < 0) {msX = 0;} - if (msY < 0) {msY = 0;} - if (movei1!="") { - //ileft = parseInt(movei1.style.left); - //itop = parseInt(movei2.style.top); - var ileft = movei2.offsetLeft+1; - var itop = movei2.offsetTop+1; - ileft = ileft - (oldMx-msX); - itop = itop - (oldMy-msY); - movei1.style.left = ileft+"px"; - movei2.style.left = ileft+"px"; - movei2.style.top = itop+"px"; + } + + //method used to stop scrolling + function stopScroll() { + if (timer) clearTimeout(timer); + timer=null; + } + + var oldMx = 0; + var oldMy = 0; + var movei1 = ""; + var movei2 = ""; + function pandiv() { + if (movei1=="") { oldMx = msX; oldMy = msY; - return false; - } } + i = document.getElementById("topInner"); + //alert(i.style.top); + movei1 = i; + i = document.getElementById("inner"); + movei2 = i; + return false; + } + function releaseimage() { + movei1 = ""; + movei2 = ""; + return true; + } + // Main function to retrieve mouse x-y pos.s + function getMouseXY(e) { + var event = e || window.event; + if (typeof event.pageX === "undefined" || typeof event.pageY === "undefined") { + msX = event.clientX + document.documentElement.scrollLeft; + msY = event.clientY + document.documentElement.scrollTop; + } else { + msX = e.pageX; + msY = e.pageY; + } + // catch possible negative values in NS4 + if (msX < 0) {msX = 0;} + if (msY < 0) {msY = 0;} + if (movei1!="") { + //ileft = parseInt(movei1.style.left); + //itop = parseInt(movei2.style.top); + var ileft = movei2.offsetLeft+1; + var itop = movei2.offsetTop+1; + ileft = ileft - (oldMx-msX); + itop = itop - (oldMy-msY); + movei1.style.left = ileft+"px"; + movei2.style.left = ileft+"px"; + movei2.style.top = itop+"px"; + oldMx = msX; + oldMy = msY; + return false; + } + } - document.onmousemove = getMouseXY; - document.onmouseup = releaseimage; + document.onmousemove = getMouseXY; + document.onmouseup = releaseimage; '); $people = count($controller->people); - ?>

diff --git a/mediaviewer.php b/mediaviewer.php index 4bf75e806d..5bf7f7bfea 100644 --- a/mediaviewer.php +++ b/mediaviewer.php @@ -27,7 +27,7 @@ define('WT_SCRIPT_NAME', 'mediaviewer.php'); require './includes/session.php'; require_once WT_ROOT.'includes/functions/functions_print_lists.php'; -$controller=new WT_Controller_Media(); +$controller = new WT_Controller_Media(); if ($controller->record && $controller->record->canShow()) { $controller->pageHeader(); @@ -75,15 +75,14 @@ if ($controller->record && $controller->record->canShow()) { exit; } -$controller - ->addInlineJavascript(' - jQuery("#media-tabs") - .tabs({ - create: function(e, ui){ - jQuery(e.target).css("visibility", "visible"); // prevent FOUC - } - }); - '); +$controller->addInlineJavascript(' + jQuery("#media-tabs") + .tabs({ + create: function(e, ui){ + jQuery(e.target).css("visibility", "visible"); // prevent FOUC + } + }); +'); $linked_indi = $controller->record->linkedIndividuals('OBJE'); $linked_fam = $controller->record->linkedFamilies('OBJE'); diff --git a/message.php b/message.php index 7d6b140491..74792e607e 100644 --- a/message.php +++ b/message.php @@ -40,7 +40,7 @@ $to = WT_Filter::post('to', null, WT_Filter::get('to')); $method = WT_Filter::post('method', 'messaging|messaging2|messaging3|mailto|none', WT_Filter::get('method', 'messaging|messaging2|messaging3|mailto|none', 'messaging2')); $url = WT_Filter::postUrl('url', WT_Filter::getUrl('url')); -$controller=new WT_Controller_Simple(); +$controller = new WT_Controller_Simple(); $controller->setPageTitle(WT_I18N::translate('webtrees message')); $to_user = User::findByIdentifier($to); diff --git a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php index 2854fb8bb1..9232e61ad4 100644 --- a/modules_v3/GEDFact_assistant/MEDIA_ctrl.php +++ b/modules_v3/GEDFact_assistant/MEDIA_ctrl.php @@ -23,7 +23,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -$controller=new WT_Controller_Individual(); +$controller = new WT_Controller_Individual(); echo ''; diff --git a/modules_v3/GEDFact_assistant/_CENS/census_3_find.php b/modules_v3/GEDFact_assistant/_CENS/census_3_find.php index 8c4d1c615c..f668f2ab70 100644 --- a/modules_v3/GEDFact_assistant/_CENS/census_3_find.php +++ b/modules_v3/GEDFact_assistant/_CENS/census_3_find.php @@ -21,7 +21,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -$controller=new WT_Controller_Simple(); +$controller = new WT_Controller_Simple(); $filter = WT_Filter::get('filter'); $action = WT_Filter::get('action'); diff --git a/modules_v3/GEDFact_assistant/module.php b/modules_v3/GEDFact_assistant/module.php index 442b2028ea..d3c3c11829 100644 --- a/modules_v3/GEDFact_assistant/module.php +++ b/modules_v3/GEDFact_assistant/module.php @@ -157,7 +157,7 @@ class GEDFact_assistant_WT_Module extends WT_Module { private static function media_query_3a() { $iid2 = WT_Filter::get('iid', WT_REGEX_XREF); - $controller=new WT_Controller_Simple(); + $controller = new WT_Controller_Simple(); $controller ->setPageTitle(WT_I18N::translate('Link to an existing media object')) ->pageHeader(); @@ -349,6 +349,7 @@ class GEDFact_assistant_WT_Module extends WT_Module { return false; } '); + return '