summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin.php2
-rw-r--r--admin_media.php2
-rw-r--r--admin_media_upload.php2
-rw-r--r--admin_module_blocks.php2
-rw-r--r--admin_module_menus.php2
-rw-r--r--admin_module_reports.php2
-rw-r--r--admin_module_sidebar.php2
-rw-r--r--admin_module_tabs.php2
-rw-r--r--admin_modules.php2
-rw-r--r--admin_site_access.php2
-rw-r--r--admin_site_change.php2
-rw-r--r--admin_site_clean.php2
-rw-r--r--admin_site_config.php2
-rw-r--r--admin_site_info.php2
-rw-r--r--admin_site_logs.php2
-rw-r--r--admin_site_merge.php5
-rw-r--r--admin_site_other.php2
-rw-r--r--admin_trees_check.php2
-rw-r--r--admin_trees_config.php5
-rw-r--r--admin_trees_download.php2
-rw-r--r--admin_trees_export.php2
-rw-r--r--admin_trees_manage.php4
-rw-r--r--admin_trees_merge.php2
-rw-r--r--admin_trees_places.php2
-rw-r--r--admin_trees_renumber.php2
-rw-r--r--admin_users.php2
-rw-r--r--admin_users_bulk.php2
-rw-r--r--ancestry.php2
-rw-r--r--block_edit.php2
-rw-r--r--branches.php2
-rw-r--r--calendar.php2
-rw-r--r--compact.php2
-rw-r--r--descendancy.php2
-rw-r--r--edit_changes.php2
-rw-r--r--edit_interface.php2
-rw-r--r--editnews.php2
-rw-r--r--edituser.php2
-rw-r--r--family.php2
-rw-r--r--familybook.php2
-rw-r--r--famlist.php2
-rw-r--r--fanchart.php2
-rw-r--r--find.php2
-rw-r--r--gedrecord.php2
-rw-r--r--hourglass.php4
-rw-r--r--hourglass_ajax.php2
-rw-r--r--import.php2
-rw-r--r--includes/db_schema/db_schema_27_28.php2
-rw-r--r--includes/session.php2
-rw-r--r--index.php2
-rw-r--r--index_edit.php2
-rw-r--r--indilist.php2
-rw-r--r--individual.php2
-rw-r--r--inverselink.php2
-rw-r--r--js/webtrees-1.5.4.js42
-rw-r--r--library/WT/Controller/Simple.php2
-rw-r--r--library/autoload.php2
-rw-r--r--library/composer/autoload_real.php10
-rw-r--r--lifespan.php175
-rw-r--r--mediaviewer.php19
-rw-r--r--message.php2
-rw-r--r--modules_v3/GEDFact_assistant/MEDIA_ctrl.php2
-rw-r--r--modules_v3/GEDFact_assistant/_CENS/census_3_find.php2
-rw-r--r--modules_v3/GEDFact_assistant/module.php3
-rw-r--r--modules_v3/batch_update/module.php2
-rw-r--r--modules_v3/charts/module.php2
-rw-r--r--modules_v3/ckeditor/module.php11
-rw-r--r--modules_v3/clippings/module.php8
-rw-r--r--modules_v3/families/module.php4
-rw-r--r--modules_v3/family_nav/module.php12
-rw-r--r--modules_v3/faq/module.php4
-rw-r--r--modules_v3/googlemap/module.php12
-rw-r--r--modules_v3/individuals/module.php10
-rw-r--r--modules_v3/login_block/module.php15
-rw-r--r--modules_v3/sitemap/module.php2
-rw-r--r--modules_v3/stories/module.php10
-rw-r--r--modules_v3/todo/module.php40
-rw-r--r--modules_v3/tree/module.php5
-rw-r--r--note.php19
-rw-r--r--notelist.php2
-rw-r--r--pedigree.php2
-rw-r--r--relationship.php15
-rw-r--r--repo.php19
-rw-r--r--repolist.php2
-rw-r--r--search.php5
-rw-r--r--search_advanced.php2
-rw-r--r--source.php19
-rw-r--r--sourcelist.php2
-rw-r--r--statistics.php2
-rw-r--r--statisticsplot.php2
-rw-r--r--themes/clouds/header.php1
-rw-r--r--themes/colors/header.php1
-rw-r--r--themes/fab/header.php6
-rw-r--r--themes/webtrees/header.php1
-rw-r--r--timeline.php35
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 '<div id="import', $tree->tree_id, '"><div id="progressbar', $tree->tree_id, '"><div style="position:absolute;">', WT_I18N::translate('Deleting old genealogy data…'), '</div></div></div>';
- $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="<unknown>",
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;
?>
<div id="hourglass-page">
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 '<p class="ui-state-error">', WT_I18N::translate('You do not have permission to view this page.'), '</p>';
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="<unknown>",
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('<div title="' + title + '"></div>')
@@ -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);
-
?>
<div id="lifespan-page">
<h2><?php echo WT_I18N::translate('Lifespans'), help_link('lifespan_chart'); ?></h2>
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 '<link href="'.WT_STATIC_URL.WT_MODULES_DIR.'GEDFact_assistant/css/gf_styles.css" rel="stylesheet" type="text/css" media="screen">';
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 '
<select id="selcensdate" name="selcensdate" onchange = "if (this.options[this.selectedIndex].value!=\'\') {
addDate(this.options[this.selectedIndex].value);
diff --git a/modules_v3/batch_update/module.php b/modules_v3/batch_update/module.php
index d195e02a40..db5c91d822 100644
--- a/modules_v3/batch_update/module.php
+++ b/modules_v3/batch_update/module.php
@@ -35,7 +35,7 @@ class batch_update_WT_Module extends WT_Module implements WT_Module_Config{
public function modAction($mod_action) {
switch($mod_action) {
case 'admin_batch_update':
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->setPageTitle(WT_I18N::translate('Batch update'))
->restrictAccess(Auth::isAdmin())
diff --git a/modules_v3/charts/module.php b/modules_v3/charts/module.php
index cfcfa1e861..a12b6f2c51 100644
--- a/modules_v3/charts/module.php
+++ b/modules_v3/charts/module.php
@@ -70,7 +70,7 @@ class charts_WT_Module extends WT_Module implements WT_Module_Block {
}
if ($type!='treenav' && $person) {
- $controller=new WT_Controller_Hourglass($person->getXref(), 0);
+ $controller = new WT_Controller_Hourglass($person->getXref(), 0);
$controller->setupJavascript();
}
diff --git a/modules_v3/ckeditor/module.php b/modules_v3/ckeditor/module.php
index 2a7ce3db03..7c7506bf60 100644
--- a/modules_v3/ckeditor/module.php
+++ b/modules_v3/ckeditor/module.php
@@ -34,7 +34,16 @@ class ckeditor_WT_Module extends WT_Module {
return /* I18N: Description of the “CKEditor” module. WYSIWYG = “what you see is what you get” */ WT_I18N::translate('Allow other modules to edit text using a “WYSIWYG” editor, instead of using HTML codes.');
}
- // Convert <textarea class="html-edit"> fields to CKEditor fields
+ /**
+ * Convert <textarea class="html-edit"> fields to CKEditor fields
+ *
+ * This function needs to be called *after* we have sent the page header and
+ * before we have sent the page footer.
+ *
+ * @param WT_Controller_Base $controller
+ *
+ * @return void
+ */
public static function enableEditor($controller) {
$controller
->addExternalJavascript(WT_MODULES_DIR . 'ckeditor/' . self::VERSION . '/ckeditor.js')
diff --git a/modules_v3/clippings/module.php b/modules_v3/clippings/module.php
index de2b3c36da..17f79acc75 100644
--- a/modules_v3/clippings/module.php
+++ b/modules_v3/clippings/module.php
@@ -54,7 +54,7 @@ class clippings_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module
$clip_ctrl=new WT_Controller_Clippings();
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->setPageTitle($this->getTitle())
->PageHeader()
@@ -481,7 +481,6 @@ class clippings_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module
}';
$out .= '</script>';
if ($person::RECORD_TYPE=='FAM') {
-
$out .= '<form action="module.php" method="get" onsubmit="continueAjax(this); return false;">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
@@ -497,8 +496,7 @@ class clippings_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module
<tr><td class="topbottombar"><input type="submit" value="'.WT_I18N::translate('Continue adding').'"></td></tr>
</table>
</form>';
- }
- else if ($person::RECORD_TYPE=='INDI') {
+ } elseif ($person::RECORD_TYPE=='INDI') {
$out .= '<form action="module.php" method="get" onsubmit="continueAjax(this); return false;">
<input type="hidden" name="mod" value="clippings">
<input type="hidden" name="mod_action" value="index">
@@ -544,7 +542,7 @@ class clippings_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module
$out = '<script>';
$out .= 'function cancelDownload() {
- var link = "module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=clippings&pid='.$pid.'";
+ var link = "module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=clippings&pid=' . $pid . '";
jQuery("#sb_clippings_content").load(link);
}';
$out .= '</script>';
diff --git a/modules_v3/families/module.php b/modules_v3/families/module.php
index 3487a8473a..33d998da9c 100644
--- a/modules_v3/families/module.php
+++ b/modules_v3/families/module.php
@@ -81,7 +81,7 @@ class families_WT_Module extends WT_Module implements WT_Module_Sidebar {
global $WT_IMAGES, $UNKNOWN_NN, $controller;
// Fetch a list of the initial letters of all surnames in the database
- $initials=WT_Query_Name::surnameAlpha(true, false, WT_GED_ID, false);
+ $initials = WT_Query_Name::surnameAlpha(true, false, WT_GED_ID, false);
$controller->addInlineJavascript('
var famloadedNames = new Array();
@@ -89,7 +89,7 @@ class families_WT_Module extends WT_Module implements WT_Module_Sidebar {
function fsearchQ() {
var query = jQuery("#sb_fam_name").val();
if (query.length>1) {
- jQuery("#sb_fam_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=families&search="+query);
+ jQuery("#sb_fam_content").load("module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=families&search="+query);
}
}
diff --git a/modules_v3/family_nav/module.php b/modules_v3/family_nav/module.php
index 5205ca0c3d..3a7c183029 100644
--- a/modules_v3/family_nav/module.php
+++ b/modules_v3/family_nav/module.php
@@ -58,16 +58,16 @@ class family_nav_WT_Module extends WT_Module implements WT_Module_Sidebar {
public function getSidebarContent() {
global $controller;
- $controller->addInlineJavascript("
- jQuery('#sb_family_nav_content')
- .on('click', '.flyout a', function() {
+ $controller->addInlineJavascript('
+ jQuery("#sb_family_nav_content")
+ .on("click", ".flyout a", function() {
return false;
})
- .on('click', '.flyout3', function() {
- window.location.href = jQuery(this).data('href');
+ .on("click", ".flyout3", function() {
+ window.location.href = jQuery(this).data("href");
return false;
});
- ");
+ ');
ob_start();
diff --git a/modules_v3/faq/module.php b/modules_v3/faq/module.php
index 03337d05f2..75bdccd860 100644
--- a/modules_v3/faq/module.php
+++ b/modules_v3/faq/module.php
@@ -251,7 +251,7 @@ class faq_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module_Block
private function show() {
global $controller;
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->setPageTitle($this->getTitle())
->pageHeader();
@@ -311,7 +311,7 @@ class faq_WT_Module extends WT_Module implements WT_Module_Menu, WT_Module_Block
private function config() {
require_once WT_ROOT.'includes/functions/functions_edit.php';
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->setPageTitle($this->getTitle())
->pageHeader();
diff --git a/modules_v3/googlemap/module.php b/modules_v3/googlemap/module.php
index 32c6a67c1b..bcf84216d6 100644
--- a/modules_v3/googlemap/module.php
+++ b/modules_v3/googlemap/module.php
@@ -225,7 +225,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
$action = WT_Filter::post('action');
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->restrictAccess(Auth::isAdmin())
->setPageTitle(WT_I18N::translate('Google Maps™'))
@@ -678,7 +678,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
$hideflags = WT_Filter::get('hideflags');
$hidelines = WT_Filter::get('hidelines');
- $controller=new WT_Controller_Pedigree();
+ $controller = new WT_Controller_Pedigree();
// Start of internal configuration variables
// Limit this to match available number of icons.
@@ -1453,7 +1453,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
$state = WT_Filter::get('state', '.+', 'XYZ');
$matching = WT_Filter::getBool('matching');
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->restrictAccess(Auth::isAdmin())
->setPageTitle(WT_I18N::translate('Google Maps™'))
@@ -2473,8 +2473,8 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
echo '<div id="place_map" style="border:1px solid gray; width:', $this->getSetting('GM_PH_XSIZE'), 'px; height:', $this->getSetting('GM_PH_YSIZE'), 'px; ';
}
echo "\"><i class=\"icon-loading-large\"></i></div>";
- echo '<script src="', $this->googleMapsScript(), '"></script>';
echo '</td>';
+ echo '<script src="', $this->googleMapsScript(), '"></script>';
$plzoom = $latlng['pl_zoom']; // Map zoom level
@@ -3073,7 +3073,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
$placeid = WT_Filter::post('placeid', null, WT_Filter::get('placeid'));
$place_name = WT_Filter::post('place_name', null, WT_Filter::get('place_name'));
- $controller=new WT_Controller_Simple();
+ $controller = new WT_Controller_Simple();
$controller
->restrictAccess(Auth::isAdmin())
->setPageTitle(WT_I18N::translate('Geographic data'))
@@ -3883,7 +3883,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
$parent=0;
}
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller->restrictAccess(Auth::isAdmin());
if ($action=='ExportFile' && Auth::isAdmin()) {
diff --git a/modules_v3/individuals/module.php b/modules_v3/individuals/module.php
index 856f0778ce..9d2d477da2 100644
--- a/modules_v3/individuals/module.php
+++ b/modules_v3/individuals/module.php
@@ -89,7 +89,7 @@ class individuals_WT_Module extends WT_Module implements WT_Module_Sidebar {
function isearchQ() {
var query = jQuery("#sb_indi_name").val();
if (query.length>1) {
- jQuery("#sb_indi_content").load("module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=individuals&search="+query);
+ jQuery("#sb_indi_content").load("module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=individuals&search="+query);
}
}
@@ -108,12 +108,12 @@ class individuals_WT_Module extends WT_Module implements WT_Module_Sidebar {
if (!loadedNames[surname]) {
jQuery.ajax({
- url: "module.php?mod='.$this->getName().'&mod_action=ajax&sb_action=individuals&alpha="+alpha+"&surname="+surname,
+ url: "module.php?mod=' . $this->getName() . '&mod_action=ajax&sb_action=individuals&alpha="+alpha+"&surname="+surname,
cache: false,
success: function(html) {
jQuery("#sb_indi_"+surname+" div").html(html);
jQuery("#sb_indi_"+surname+" div").show("fast");
- jQuery("#sb_indi_"+surname).css("list-style-image", "url('.$WT_IMAGES['minus'].')");
+ jQuery("#sb_indi_"+surname).css("list-style-image", "url(' . $WT_IMAGES['minus'] . ')");
loadedNames[surname]=2;
}
});
@@ -121,12 +121,12 @@ class individuals_WT_Module extends WT_Module implements WT_Module_Sidebar {
else if (loadedNames[surname]==1) {
loadedNames[surname]=2;
jQuery("#sb_indi_"+surname+" div").show("fast");
- jQuery("#sb_indi_"+surname).css("list-style-image", "url('.$WT_IMAGES['minus'].')");
+ jQuery("#sb_indi_"+surname).css("list-style-image", "url(' . $WT_IMAGES['minus'] . ')");
}
else {
loadedNames[surname]=1;
jQuery("#sb_indi_"+surname+" div").hide("fast");
- jQuery("#sb_indi_"+surname).css("list-style-image", "url('.$WT_IMAGES['plus'].')");
+ jQuery("#sb_indi_"+surname).css("list-style-image", "url(' . $WT_IMAGES['plus'] . ')");
}
return false;
});
diff --git a/modules_v3/login_block/module.php b/modules_v3/login_block/module.php
index 3facf47358..bcb523a325 100644
--- a/modules_v3/login_block/module.php
+++ b/modules_v3/login_block/module.php
@@ -38,14 +38,15 @@ class login_block_WT_Module extends WT_Module implements WT_Module_Block {
$id=$this->getName().$block_id;
$class=$this->getName().'_block';
$controller->addInlineJavascript('
- jQuery("#new_passwd").hide();
- jQuery("#passwd_click").click(function() {
- jQuery("#new_passwd").slideToggle(100, function() {
- jQuery("#new_passwd_username").focus();
- });
- return false;
+ jQuery("#new_passwd").hide();
+ jQuery("#passwd_click").click(function() {
+ jQuery("#new_passwd").slideToggle(100, function() {
+ jQuery("#new_passwd_username").focus();
});
- ');
+ return false;
+ });
+ ');
+
if (WT_USER_ID) {
$title = WT_I18N::translate('Logout');
$content = '<div class="center"><form method="post" action="logout.php" name="logoutform" onsubmit="return true;">';
diff --git a/modules_v3/sitemap/module.php b/modules_v3/sitemap/module.php
index 4df42a33ad..a63973817e 100644
--- a/modules_v3/sitemap/module.php
+++ b/modules_v3/sitemap/module.php
@@ -212,7 +212,7 @@ class sitemap_WT_Module extends WT_Module implements WT_Module_Config {
}
private function admin() {
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->restrictAccess(Auth::isAdmin())
->setPageTitle($this->getTitle())
diff --git a/modules_v3/stories/module.php b/modules_v3/stories/module.php
index f0b72d46c9..06b8749c95 100644
--- a/modules_v3/stories/module.php
+++ b/modules_v3/stories/module.php
@@ -194,7 +194,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_
} else {
$block_id=WT_Filter::getInteger('block_id');
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
if ($block_id) {
$controller->setPageTitle(WT_I18N::translate('Edit story'));
$title = get_block_setting($block_id, 'title');
@@ -283,7 +283,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_
require_once WT_ROOT.'includes/functions/functions_edit.php';
if (WT_USER_GEDCOM_ADMIN) {
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->setPageTitle($this->getTitle())
->pageHeader()
@@ -309,7 +309,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_
});
');
- $stories=WT_DB::prepare(
+ $stories = WT_DB::prepare(
"SELECT block_id, xref".
" FROM `##block` b".
" WHERE module_name=?".
@@ -360,7 +360,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_
private function show_list() {
global $controller;
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller
->setPageTitle($this->getTitle())
->pageHeader()
@@ -384,7 +384,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_
});
');
- $stories=WT_DB::prepare(
+ $stories = WT_DB::prepare(
"SELECT block_id, xref".
" FROM `##block` b".
" WHERE module_name=?".
diff --git a/modules_v3/todo/module.php b/modules_v3/todo/module.php
index 2dfb72340d..41184492ea 100644
--- a/modules_v3/todo/module.php
+++ b/modules_v3/todo/module.php
@@ -60,29 +60,31 @@ class todo_WT_Module extends WT_Module implements WT_Module_Block {
$title.=$this->getTitle().help_link('todo', $this->getName());
$table_id = Uuid::uuid4(); // create a unique ID
+
$controller
->addExternalJavascript(WT_JQUERY_DATATABLES_URL)
->addInlineJavascript('
- jQuery("#'.$table_id.'").dataTable({
- dom: \'t\',
- '.WT_I18N::datatablesI18N().',
- autoWidth: false,
- paginate: false,
- lengthChange: false,
- filter: false,
- info: true,
- jQueryUI: true,
- columns: [
- /* 0-DATE */ { visible: false },
- /* 1-Date */ { dataSort: 0 },
- /* 1-Record */ null,
- /* 2-Username */ null,
- /* 3-Text */ null
- ]
- });
- jQuery("#'.$table_id.'").css("visibility", "visible");
+ jQuery("#' . $table_id . '").dataTable({
+ dom: \'t\',
+ '.WT_I18N::datatablesI18N().',
+ autoWidth: false,
+ paginate: false,
+ lengthChange: false,
+ filter: false,
+ info: true,
+ jQueryUI: true,
+ columns: [
+ /* 0-DATE */ { visible: false },
+ /* 1-Date */ { dataSort: 0 },
+ /* 1-Record */ null,
+ /* 2-Username */ null,
+ /* 3-Text */ null
+ ]
+ });
+ jQuery("#' . $table_id . '").css("visibility", "visible");
jQuery(".loading-image").css("display", "none");
- ');
+ ');
+
$content='';
$content .= '<div class="loading-image">&nbsp;</div>';
$content .= '<table id="'.$table_id.'" style="visibility:hidden;">';
diff --git a/modules_v3/tree/module.php b/modules_v3/tree/module.php
index d03d7b1c14..d7cc8c7e47 100644
--- a/modules_v3/tree/module.php
+++ b/modules_v3/tree/module.php
@@ -87,6 +87,11 @@ class tree_WT_Module extends WT_Module implements WT_Module_Tab {
// Extend WT_Module
// We define here actions to proceed when called, either by Ajax or not
+ /**
+ * @param string $mod_action
+ *
+ * @throws Exception
+ */
public function modAction($mod_action) {
require_once WT_MODULES_DIR . $this->getName() . '/class_treeview.php';
switch ($mod_action) {
diff --git a/note.php b/note.php
index c069f5a6a2..f5c7cf2688 100644
--- a/note.php
+++ b/note.php
@@ -26,7 +26,7 @@ define('WT_SCRIPT_NAME', 'note.php');
require './includes/session.php';
require_once WT_ROOT.'includes/functions/functions_print_lists.php';
-$controller=new WT_Controller_Note();
+$controller = new WT_Controller_Note();
if ($controller->record && $controller->record->canShow()) {
$controller->pageHeader();
@@ -74,15 +74,14 @@ if ($controller->record && $controller->record->canShow()) {
exit;
}
-$controller
- ->addInlineJavascript('
- jQuery("#note-tabs")
- .tabs({
- create: function(e, ui){
- jQuery(e.target).css("visibility", "visible"); // prevent FOUC
- }
- });
- ');
+$controller->addInlineJavascript('
+ jQuery("#note-tabs")
+ .tabs({
+ create: function(e, ui){
+ jQuery(e.target).css("visibility", "visible"); // prevent FOUC
+ }
+ });
+');
$linked_indi = $controller->record->linkedIndividuals('NOTE');
$linked_fam = $controller->record->linkedFamilies('NOTE');
diff --git a/notelist.php b/notelist.php
index 4018a27242..842960c049 100644
--- a/notelist.php
+++ b/notelist.php
@@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'notelist.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('Shared notes'));
$controller->pageHeader();
diff --git a/pedigree.php b/pedigree.php
index b07cfab042..5f5db34d1d 100644
--- a/pedigree.php
+++ b/pedigree.php
@@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'pedigree.php');
require './includes/session.php';
require WT_ROOT.'includes/functions/functions_edit.php';
-$controller=new WT_Controller_Pedigree();
+$controller = new WT_Controller_Pedigree();
$controller
->pageHeader()
->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
diff --git a/relationship.php b/relationship.php
index 41aa50adf9..aac2b403de 100644
--- a/relationship.php
+++ b/relationship.php
@@ -393,11 +393,10 @@ echo '</div>'; // close #relationshippage
// The contents of <div id="relationship_chart"> use relative positions.
// Need to expand the div to include the children, or we'll overlap the footer.
// $maxyoffset is the top edge of the lowest box.
-$controller
- ->addInlineJavascript('
- relationship_chart_div = document.getElementById("relationship_chart");
- if (relationship_chart_div) {
- relationship_chart_div.style.height = "'.($maxyoffset+$Dbheight+20).'px";
- relationship_chart_div.style.width = "100%";
- }'
- );
+$controller->addInlineJavascript('
+ relationship_chart_div = document.getElementById("relationship_chart");
+ if (relationship_chart_div) {
+ relationship_chart_div.style.height = "'.($maxyoffset+$Dbheight+20).'px";
+ relationship_chart_div.style.width = "100%";
+ }'
+);
diff --git a/repo.php b/repo.php
index 816e8f89a1..ab440d1a31 100644
--- a/repo.php
+++ b/repo.php
@@ -26,7 +26,7 @@ define('WT_SCRIPT_NAME', 'repo.php');
require './includes/session.php';
require_once WT_ROOT.'includes/functions/functions_print_lists.php';
-$controller=new WT_Controller_Repository();
+$controller = new WT_Controller_Repository();
if ($controller->record && $controller->record->canShow()) {
$controller->pageHeader();
@@ -74,15 +74,14 @@ if ($controller->record && $controller->record->canShow()) {
exit;
}
-$controller
- ->addInlineJavascript('
- jQuery("#repo-tabs")
- .tabs({
- create: function(e, ui){
- jQuery(e.target).css("visibility", "visible"); // prevent FOUC
- }
- });
- ');
+$controller->addInlineJavascript('
+ jQuery("#repo-tabs")
+ .tabs({
+ create: function(e, ui){
+ jQuery(e.target).css("visibility", "visible"); // prevent FOUC
+ }
+ });
+');
$linked_sour = $controller->record->linkedSources('REPO');
diff --git a/repolist.php b/repolist.php
index 040338fc56..cd2f26b81c 100644
--- a/repolist.php
+++ b/repolist.php
@@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'repolist.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('Repositories'));
$controller->pageHeader();
diff --git a/search.php b/search.php
index cc97df4e47..00ee1f76dd 100644
--- a/search.php
+++ b/search.php
@@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'search.php');
require './includes/session.php';
require_once WT_ROOT.'includes/functions/functions_print_lists.php';
-$controller=new WT_Controller_Search();
+$controller = new WT_Controller_Search();
$controller
->pageHeader()
->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
@@ -125,8 +125,7 @@ echo '<div id="search-page">
box.form.replaceNames.disabled = false;
box.form.replacePlaces.disabled = false;
box.form.replacePlacesWord.disabled = false;
- }
- else {
+ } else {
box.form.replaceNames.disabled = true;
box.form.replacePlaces.disabled = true;
box.form.replacePlacesWord.disabled = true;
diff --git a/search_advanced.php b/search_advanced.php
index 52fc25e18e..395ff17e8d 100644
--- a/search_advanced.php
+++ b/search_advanced.php
@@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'search_advanced.php');
require './includes/session.php';
require_once WT_ROOT.'includes/functions/functions_print_lists.php';
-$controller=new WT_Controller_AdvancedSearch();
+$controller = new WT_Controller_AdvancedSearch();
$controller
->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
->addInlineJavascript('autocomplete();')
diff --git a/source.php b/source.php
index a82908914c..44e5e84153 100644
--- a/source.php
+++ b/source.php
@@ -26,7 +26,7 @@ define('WT_SCRIPT_NAME', 'source.php');
require './includes/session.php';
require_once WT_ROOT.'includes/functions/functions_print_lists.php';
-$controller=new WT_Controller_Source();
+$controller = new WT_Controller_Source();
if ($controller->record && $controller->record->canShow()) {
$controller->pageHeader();
@@ -74,15 +74,14 @@ if ($controller->record && $controller->record->canShow()) {
exit;
}
-$controller
- ->addInlineJavascript('
- jQuery("#source-tabs")
- .tabs({
- create: function(e, ui){
- jQuery(e.target).css("visibility", "visible"); // prevent FOUC
- }
- });
- ');
+$controller->addInlineJavascript('
+ jQuery("#source-tabs")
+ .tabs({
+ create: function(e, ui){
+ jQuery(e.target).css("visibility", "visible"); // prevent FOUC
+ }
+ });
+');
$linked_indi = $controller->record->linkedIndividuals('SOUR');
$linked_fam = $controller->record->linkedFamilies('SOUR');
diff --git a/sourcelist.php b/sourcelist.php
index ac2687913c..2dfc023fce 100644
--- a/sourcelist.php
+++ b/sourcelist.php
@@ -25,7 +25,7 @@ define('WT_SCRIPT_NAME', 'sourcelist.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('Sources'));
$controller->pageHeader();
diff --git a/statistics.php b/statistics.php
index 477b91d272..0b4ec44e6c 100644
--- a/statistics.php
+++ b/statistics.php
@@ -32,7 +32,7 @@ $tab = WT_Filter::getInteger('tab', 0, 3);
$ajax = WT_Filter::getBool('ajax');
if (!$ajax) {
- $controller=new WT_Controller_Page();
+ $controller = new WT_Controller_Page();
$controller->setPageTitle(WT_I18N::translate('Statistics'))
->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
->addInlineJavascript('
diff --git a/statisticsplot.php b/statisticsplot.php
index a372ad6401..b9f0aa2998 100644
--- a/statisticsplot.php
+++ b/statisticsplot.php
@@ -27,7 +27,7 @@
define('WT_SCRIPT_NAME', 'statisticsplot.php');
require './includes/session.php';
-$controller=new WT_Controller_Ajax();
+$controller = new WT_Controller_Ajax();
$stats = new WT_Stats($GEDCOM);
diff --git a/themes/clouds/header.php b/themes/clouds/header.php
index 8ff4508d16..bd17a171df 100644
--- a/themes/clouds/header.php
+++ b/themes/clouds/header.php
@@ -42,6 +42,7 @@ $this
}
});
');
+
echo
'<!DOCTYPE html>',
'<html ', WT_I18N::html_markup(), '>',
diff --git a/themes/colors/header.php b/themes/colors/header.php
index 362e6f0fee..05f831e39c 100644
--- a/themes/colors/header.php
+++ b/themes/colors/header.php
@@ -30,7 +30,6 @@ if (!defined('WT_WEBTREES')) {
global $subColor;
-
// This theme uses the jQuery “colorbox” plugin to display images
$this
->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
diff --git a/themes/fab/header.php b/themes/fab/header.php
index b5cd1842b2..5d577d1b5d 100644
--- a/themes/fab/header.php
+++ b/themes/fab/header.php
@@ -55,13 +55,11 @@ echo
'<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, 'style.css">',
'<!--[if IE]>',
'<link type="text/css" rel="stylesheet" href="', WT_CSS_URL, 'msie.css">',
- '<![endif]-->';
-
-echo
+ '<![endif]-->',
'</head>',
'<body id="body">';
-if ($view!='simple') { // Use “simple” headers for popup windows
+if ($view != 'simple') { // Use “simple” headers for popup windows
echo '<div id="header" class="block">';
echo '<div id="header-user-links"><ul class="makeMenu">';
if (WT_USER_ID) {
diff --git a/themes/webtrees/header.php b/themes/webtrees/header.php
index 3b4cb8249e..9bcc2f4c1c 100644
--- a/themes/webtrees/header.php
+++ b/themes/webtrees/header.php
@@ -29,6 +29,7 @@ if (!defined('WT_WEBTREES')) {
}
global $WT_IMAGES;
+
// This theme uses the jQuery “colorbox” plugin to display images
$this
->addExternalJavascript(WT_JQUERY_COLORBOX_URL)
diff --git a/timeline.php b/timeline.php
index 3c6baa90d7..291d97643f 100644
--- a/timeline.php
+++ b/timeline.php
@@ -26,7 +26,7 @@
define('WT_SCRIPT_NAME', 'timeline.php');
require './includes/session.php';
-$controller=new WT_Controller_Timeline();
+$controller = new WT_Controller_Timeline();
$controller
->pageHeader()
->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')
@@ -131,6 +131,8 @@ document.onmousemove = function (e) {
}
var line = document.getElementById('ageline' + personnum);
var temp = newx-oldx;
+
+ var textDirection = jQuery('html').attr('dir');
if (textDirection === 'rtl') {
temp = temp * -1;
}
@@ -177,39 +179,40 @@ document.onmousemove = function (e) {
// calculate the change in Y position
var dy = newy-ob.offsetTop;
// check if we are above the starting point and switch the background image
+ var textDirection = jQuery('html').attr('dir');
+
if (newy < boxmean) {
- if (textDirection === 'ltr') {
- dbox.style.backgroundImage = "url('<?php echo $WT_IMAGES["dline"]; ?>')";
- dbox.style.backgroundPosition = "0% 100%";
- } else {
+ if (textDirection === 'rtl') {
dbox.style.backgroundImage = "url('<?php echo $WT_IMAGES["dline2"]; ?>')";
dbox.style.backgroundPosition = "0% 0%";
+ } else {
+ dbox.style.backgroundImage = "url('<?php echo $WT_IMAGES["dline"]; ?>')";
+ dbox.style.backgroundPosition = "0% 100%";
}
dy = -dy;
dbox.style.top = (newy + bheight / 3) + "px";
} else {
- if (textDirection === 'ltr') {
- dbox.style.backgroundImage = "url('<?php echo $WT_IMAGES["dline2"]; ?>')";
- dbox.style.backgroundPosition = "0% 0%";
- } else {
+ if (textDirection === 'rtl') {
dbox.style.backgroundImage = "url('<?php echo $WT_IMAGES["dline"]; ?>')";
dbox.style.backgroundPosition = "0% 100%";
+ } else {
+ dbox.style.backgroundImage = "url('<?php echo $WT_IMAGES["dline2"]; ?>')";
+ dbox.style.backgroundPosition = "0% 0%";
}
dbox.style.top = (boxmean + bheight / 3) + "px";
}
// the new X posistion moves the same as the y position
- if (textDirection === 'ltr') {
- newx = dbox.offsetLeft + Math.abs(newy - boxmean);
- } else {
+ if (textDirection === 'rtl') {
newx = dbox.offsetRight + Math.abs(newy - boxmean);
+ } else {
+ newx = dbox.offsetLeft + Math.abs(newy - boxmean);
}
// set the X position of the box
- if (textDirection === 'ltr') {
- ob.style.left = newx + "px";
- }
- else {
+ if (textDirection === 'rtl') {
ob.style.right = newx + "px";
+ } else {
+ ob.style.left = newx + "px";
}
// set new top positions
ob.style.top = newy + "px";