summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-11-29 13:29:31 +0000
committerfisharebest <fisharebest@gmail.com>2011-11-29 13:29:31 +0000
commitf2542f526a7033b02a68b170f0cdb9cdc2256537 (patch)
treed77d1ae54f0193434bb43a78480a814a13a956f8
parentc24245a43a96ec21b346e244eaf3cd94f4d41259 (diff)
downloadwebtrees-f2542f526a7033b02a68b170f0cdb9cdc2256537.tar.gz
webtrees-f2542f526a7033b02a68b170f0cdb9cdc2256537.tar.bz2
webtrees-f2542f526a7033b02a68b170f0cdb9cdc2256537.zip
#584835 - remove more references to $_SESSION and use $WT_SESSION instead
-rw-r--r--includes/functions/functions_print.php8
-rw-r--r--includes/session.php8
-rw-r--r--library/WT/MenuBar.php4
3 files changed, 10 insertions, 10 deletions
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index f95b0b6167..7c50e01150 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -615,9 +615,9 @@ function print_privacy_error() {
// Print a link for a popup help window
function help_link($help_topic, $module='') {
- global $WT_USE_HELPIMG, $WT_IMAGES;
+ global $WT_USE_HELPIMG, $WT_IMAGES, $WT_SESSION;
- if ($_SESSION['show_context_help']) {
+ if ($WT_SESSION->show_context_help) {
return
'<a class="help icon-help-15" href="#" onclick="helpPopup(\''.$help_topic.'\',\''.$module.'\'); return false;">&nbsp;'.
($WT_USE_HELPIMG ? '<img src="'.$WT_IMAGES['help'].'" class="icon" width="15" height="15" alt="" />' : WT_I18N::translate('?')).
@@ -629,9 +629,9 @@ function help_link($help_topic, $module='') {
// Print an external help link to the wiki site, in a new window
function wiki_help_link($topic) {
- global $WT_USE_HELPIMG, $WT_IMAGES;
+ global $WT_USE_HELPIMG, $WT_IMAGES, $WT_SESSION;
- if ($_SESSION['show_context_help']) {
+ if ($WT_SESSION->show_context_help) {
return
'<a class="help icon-help-15" href="'.WT_WEBTREES_WIKI.$topic.'" target="_new">&nbsp;'.
($WT_USE_HELPIMG ? '<img src="'.$WT_IMAGES['help'].'" class="icon" width="15" height="15" alt="" />' : WT_I18N::translate('?')).
diff --git a/includes/session.php b/includes/session.php
index ed826499f1..83d2dbb2b8 100644
--- a/includes/session.php
+++ b/includes/session.php
@@ -436,12 +436,12 @@ if (WT_USER_ID && (safe_GET_bool('logout') || !WT_USER_NAME)) {
// Do we show context help on the page?
if (isset($_GET['show_context_help'])) {
- $_SESSION['show_context_help']=safe_GET_bool('show_context_help');
+ $WT_SESSION->show_context_help=safe_GET_bool('show_context_help');
unset($_GET['show_context_help']);
} elseif ($SEARCH_SPIDER) {
- $_SESSION['show_context_help']=false;
-} elseif (!isset($_SESSION['show_context_help'])) {
- $_SESSION['show_context_help']=get_gedcom_setting(WT_GED_ID, 'SHOW_CONTEXT_HELP', true);
+ $WT_SESSION->show_context_help=false;
+} elseif (!isset($WT_SESSION->show_context_help)) {
+ $WT_SESSION->show_context_help=get_gedcom_setting(WT_GED_ID, 'SHOW_CONTEXT_HELP', true);
}
if (!isset($_SESSION['wt_user'])) $_SESSION['wt_user'] = '';
diff --git a/library/WT/MenuBar.php b/library/WT/MenuBar.php
index c9b1275334..837b458a3f 100644
--- a/library/WT/MenuBar.php
+++ b/library/WT/MenuBar.php
@@ -546,7 +546,7 @@ class WT_MenuBar {
}
public static function getHelpMenu() {
- global $SEARCH_SPIDER, $helpindex;
+ global $SEARCH_SPIDER, $helpindex, $WT_SESSION;
if (!empty($SEARCH_SPIDER)) {
return null;
@@ -590,7 +590,7 @@ class WT_MenuBar {
$menu->addSubmenu($submenu);
}
//-- add show/hide context_help
- if ($_SESSION['show_context_help']) {
+ if ($WT_SESSION->show_context_help) {
$submenu = new WT_Menu(WT_I18N::translate('Hide contextual help'), get_query_url(array('show_context_help'=>'no')), 'menu-help-hide');
} else {
$submenu = new WT_Menu(WT_I18N::translate('Show contextual help'), get_query_url(array('show_context_help'=>'yes')), 'menu-help-show');