summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Config.php (renamed from app/ConfigData.php)4
-rw-r--r--app/Controller/SearchController.php4
-rw-r--r--app/Functions/FunctionsEdit.php20
-rw-r--r--edit_interface.php6
-rw-r--r--includes/session.php5
5 files changed, 17 insertions, 22 deletions
diff --git a/app/ConfigData.php b/app/Config.php
index 3cf8ec9c5a..c232b16637 100644
--- a/app/ConfigData.php
+++ b/app/Config.php
@@ -17,11 +17,11 @@ namespace Fisharebest\Webtrees;
*/
/**
- * Class ConfigData - Application configuration data. Data here has no
+ * Class Config - Application configuration data. Data here has no
* GUI to edit it, although most of it can be altered to customise local
* installations.
*/
-class ConfigData {
+class Config {
/**
* NPFX tags - name prefixes
*
diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php
index 946c3875cb..97171ff3a4 100644
--- a/app/Controller/SearchController.php
+++ b/app/Controller/SearchController.php
@@ -17,7 +17,7 @@ namespace Fisharebest\Webtrees\Controller;
*/
use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\ConfigData;
+use Fisharebest\Webtrees\Config;
use Fisharebest\Webtrees\Family;
use Fisharebest\Webtrees\Filter;
use Fisharebest\Webtrees\FlashMessages;
@@ -311,7 +311,7 @@ class SearchController extends PageController {
Log::addEditLog("Search And Replace old:" . $this->query . " new:" . $this->replace);
$adv_name_tags = preg_split("/[\s,;: ]+/", $tree->getPreference('ADVANCED_NAME_FACTS'));
- $name_tags = array_unique(array_merge(ConfigData::standardNameFacts(), $adv_name_tags));
+ $name_tags = array_unique(array_merge(Config::standardNameFacts(), $adv_name_tags));
$name_tags[] = '_MARNM';
$records_updated = 0;
foreach ($this->myindilist as $id => $record) {
diff --git a/app/Functions/FunctionsEdit.php b/app/Functions/FunctionsEdit.php
index 341e6e3c9a..695a76bc5e 100644
--- a/app/Functions/FunctionsEdit.php
+++ b/app/Functions/FunctionsEdit.php
@@ -17,7 +17,7 @@ namespace Fisharebest\Webtrees\Functions;
*/
use Fisharebest\Webtrees\Auth;
-use Fisharebest\Webtrees\ConfigData;
+use Fisharebest\Webtrees\Config;
use Fisharebest\Webtrees\Database;
use Fisharebest\Webtrees\Date;
use Fisharebest\Webtrees\Fact;
@@ -583,7 +583,7 @@ class FunctionsEdit {
}
}
- if (in_array($fact, ConfigData::emptyFacts()) && ($value === '' || $value === 'Y' || $value === 'y')) {
+ if (in_array($fact, Config::emptyFacts()) && ($value === '' || $value === 'Y' || $value === 'y')) {
echo '<input type="hidden" id="', $element_id, '" name="', $element_name, '" value="', $value, '">';
if ($level <= 1) {
echo '<input type="checkbox" ';
@@ -931,7 +931,7 @@ class FunctionsEdit {
// pastable values
if ($fact === 'FORM' && $upperlevel === 'OBJE') {
- FunctionsPrint::printAutoPasteLink($element_id, ConfigData::fileFormats());
+ FunctionsPrint::printAutoPasteLink($element_id, Config::fileFormats());
}
echo '</div>', $extra, '</td></tr>';
@@ -1057,11 +1057,11 @@ class FunctionsEdit {
self::addSimpleTag('0 ' . $fact);
}
- if (!in_array($fact, ConfigData::nonDateFacts())) {
+ if (!in_array($fact, Config::nonDateFacts())) {
self::addSimpleTag('0 DATE', $fact, GedcomTag::getLabel($fact . ':DATE'));
}
- if (!in_array($fact, ConfigData::nonPlaceFacts())) {
+ if (!in_array($fact, Config::nonPlaceFacts())) {
self::addSimpleTag('0 PLAC', $fact, GedcomTag::getLabel($fact . ':PLAC'));
if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('ADVANCED_PLAC_FACTS'), $match)) {
@@ -1446,7 +1446,7 @@ class FunctionsEdit {
if (in_array($fact, array('ALIA', 'ASSO'))) {
$fact .= ' @';
}
- if (in_array($fact, ConfigData::emptyFacts())) {
+ if (in_array($fact, Config::emptyFacts())) {
self::addSimpleTag('1 ' . $fact . ' Y');
} else {
self::addSimpleTag('1 ' . $fact);
@@ -1584,7 +1584,7 @@ class FunctionsEdit {
}
// Awkward special cases
- if ($level == 2 && $type === 'DATE' && in_array($level1type, ConfigData::dateAndTime()) && !in_array('TIME', $subtags)) {
+ if ($level == 2 && $type === 'DATE' && in_array($level1type, Config::dateAndTime()) && !in_array('TIME', $subtags)) {
self::addSimpleTag('3 TIME'); // TIME is NOT a valid 5.5.1 tag
}
if ($level == 2 && $type === 'STAT' && GedcomCodeTemp::isTagLDS($level1type) && !in_array('DATE', $subtags)) {
@@ -1631,8 +1631,8 @@ class FunctionsEdit {
$level1tag = 'MARR';
}
- foreach (ConfigData::levelTwoTags() as $key => $value) {
- if ($key === 'DATE' && in_array($level1tag, ConfigData::nonDateFacts()) || $key === 'PLAC' && in_array($level1tag, ConfigData::nonPlaceFacts())) {
+ foreach (Config::levelTwoTags() as $key => $value) {
+ if ($key === 'DATE' && in_array($level1tag, Config::nonDateFacts()) || $key === 'PLAC' && in_array($level1tag, Config::nonPlaceFacts())) {
continue;
}
if (in_array($level1tag, $value) && !in_array($key, $tags)) {
@@ -1675,7 +1675,7 @@ class FunctionsEdit {
break;
case 'DATE':
// TIME is NOT a valid 5.5.1 tag
- if (in_array($level1tag, ConfigData::dateAndTime())) {
+ if (in_array($level1tag, Config::dateAndTime())) {
self::addSimpleTag('3 TIME');
}
break;
diff --git a/edit_interface.php b/edit_interface.php
index 3f1f70d652..4332ef0e17 100644
--- a/edit_interface.php
+++ b/edit_interface.php
@@ -2325,7 +2325,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
$name_type = $name_fact->getAttribute('TYPE');
$namerec = $name_fact->getGedcom();
// Populate the standard NAME field and subfields
- foreach (ConfigData::standardNameFacts() as $tag) {
+ foreach (Config::standardNameFacts() as $tag) {
if ($tag === 'NAME') {
$name_fields[$tag] = $name_fact->getValue();
} else {
@@ -2337,7 +2337,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
$name_type = null;
$namerec = null;
// Populate the standard NAME field and subfields
- foreach (ConfigData::standardNameFacts() as $tag) {
+ foreach (Config::standardNameFacts() as $tag) {
$name_fields[$tag] = '';
}
}
@@ -2603,7 +2603,7 @@ function print_indi_form($nextaction, Individual $person = null, Family $family
}
// Populate any missing 2 XXXX fields from the 1 NAME field
- $npfx_accept = implode('|', ConfigData::namePrefixes());
+ $npfx_accept = implode('|', Config::namePrefixes());
if (preg_match('/(((' . $npfx_accept . ')\.? +)*)([^\n\/"]*)("(.*)")? *\/(([a-z]{2,3} +)*)(.*)\/ *(.*)/i', $name_fields['NAME'], $name_bits)) {
if (empty($name_fields['NPFX'])) {
$name_fields['NPFX'] = $name_bits[1];
diff --git a/includes/session.php b/includes/session.php
index 835c1998bb..53725c62aa 100644
--- a/includes/session.php
+++ b/includes/session.php
@@ -421,11 +421,6 @@ if (!Auth::isSearchEngine() && !Session::get('initiated')) {
// An existing session
}
-/** @deprecated Will be removed in 1.7.0 */
-define('WT_USER_ID', Auth::id());
-/** @deprecated Will be removed in 1.7.0 */
-define('WT_USER_NAME', Auth::id() ? Auth::user()->getUserName() : '');
-
// Set the tree for the page; (1) the request, (2) the session, (3) the site default, (4) any tree
foreach (array(Filter::post('ged'), Filter::get('ged'), Session::get('GEDCOM'), Site::getPreference('DEFAULT_GEDCOM')) as $tree_name) {
$WT_TREE = Tree::findByName($tree_name);