summaryrefslogtreecommitdiff
path: root/includes/functions/functions_print.php
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-07-23 09:34:49 +0000
committerfisharebest <fisharebest@gmail.com>2010-07-23 09:34:49 +0000
commit64ef2b9c007e83d221a7811ac99197fdbd7dc882 (patch)
treef640f10d66b6823bcfed301198c440bf876666b0 /includes/functions/functions_print.php
parentf513df0bde96d2a2d91f5d64c473e2ee13664aee (diff)
downloadwebtrees-64ef2b9c007e83d221a7811ac99197fdbd7dc882.tar.gz
webtrees-64ef2b9c007e83d221a7811ac99197fdbd7dc882.tar.bz2
webtrees-64ef2b9c007e83d221a7811ac99197fdbd7dc882.zip
Don't fetch rarely used gedcom-config settings on every page - just when needed.
Diffstat (limited to 'includes/functions/functions_print.php')
-rw-r--r--includes/functions/functions_print.php33
1 files changed, 15 insertions, 18 deletions
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index ba314442f9..f76300f2ef 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -1877,9 +1877,6 @@ function CheckFactUnique($uniquefacts, $recfacts, $type) {
*/
function print_add_new_fact($id, $usedfacts, $type) {
global $TEXT_DIRECTION;
- global $INDI_FACTS_ADD, $FAM_FACTS_ADD, $NOTE_FACTS_ADD, $SOUR_FACTS_ADD, $REPO_FACTS_ADD;
- global $INDI_FACTS_UNIQUE, $FAM_FACTS_UNIQUE, $NOTE_FACTS_UNIQUE, $SOUR_FACTS_UNIQUE, $REPO_FACTS_UNIQUE;
- global $INDI_FACTS_QUICK, $FAM_FACTS_QUICK, $NOTE_FACTS_QUICK, $SOUR_FACTS_QUICK, $REPO_FACTS_QUICK;
// -- Add from clipboard
if (!empty($_SESSION["clipboard"])) {
@@ -1917,29 +1914,29 @@ function print_add_new_fact($id, $usedfacts, $type) {
// -- Add from pick list
switch ($type) {
case "INDI":
- $addfacts =preg_split("/[, ;:]+/", $INDI_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY);
- $uniquefacts=preg_split("/[, ;:]+/", $INDI_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts =preg_split("/[, ;:]+/", $INDI_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'INDI_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $uniquefacts=preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'INDI_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'INDI_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "FAM":
- $addfacts =preg_split("/[, ;:]+/", $FAM_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY);
- $uniquefacts=preg_split("/[, ;:]+/", $FAM_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts =preg_split("/[, ;:]+/", $FAM_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'FAM_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $uniquefacts=preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'FAM_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'FAM_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "SOUR":
- $addfacts =preg_split("/[, ;:]+/", $SOUR_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY);
- $uniquefacts=preg_split("/[, ;:]+/", $SOUR_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts =preg_split("/[, ;:]+/", $SOUR_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'SOUR_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $uniquefacts=preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'SOUR_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'SOUR_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "NOTE":
- $addfacts =preg_split("/[, ;:]+/", $NOTE_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY);
- $uniquefacts=preg_split("/[, ;:]+/", $NOTE_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts =preg_split("/[, ;:]+/", $NOTE_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'NOTE_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $uniquefacts=preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'NOTE_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'NOTE_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
case "REPO":
- $addfacts =preg_split("/[, ;:]+/", $REPO_FACTS_ADD, -1, PREG_SPLIT_NO_EMPTY);
- $uniquefacts=preg_split("/[, ;:]+/", $REPO_FACTS_UNIQUE, -1, PREG_SPLIT_NO_EMPTY);
- $quickfacts =preg_split("/[, ;:]+/", $REPO_FACTS_QUICK, -1, PREG_SPLIT_NO_EMPTY);
+ $addfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'REPO_FACTS_ADD'), -1, PREG_SPLIT_NO_EMPTY);
+ $uniquefacts=preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'REPO_FACTS_UNIQUE'), -1, PREG_SPLIT_NO_EMPTY);
+ $quickfacts =preg_split("/[, ;:]+/", get_gedcom_setting(WT_GED_ID, 'REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY);
break;
default:
return;