summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--action.php6
-rw-r--r--edit_interface.php2
-rw-r--r--includes/functions/functions_print.php6
3 files changed, 7 insertions, 7 deletions
diff --git a/action.php b/action.php
index 280e1d3e5a..fde85facc2 100644
--- a/action.php
+++ b/action.php
@@ -69,10 +69,10 @@ case 'copy-fact':
// Other facts can only be pasted records of the same type
$type=safe_POST('type', array('INDI','FAM','SOUR','REPO','OBJE','NOTE'));
}
- if (!is_array($_SESSION['clipboard'])) {
- $_SESSION['clipboard']=array();
+ if (!is_array($WT_SESSION->clipboard)) {
+ $WT_SESSION->clipboard=array();
}
- $_SESSION['clipboard'][]=array(
+ $WT_SESSION->clipboard[]=array(
'type' =>$type,
'factrec'=>$fact->getGedcomRecord(),
'fact' =>$fact->getTag()
diff --git a/edit_interface.php b/edit_interface.php
index e7c9c44c71..f61d0932fc 100644
--- a/edit_interface.php
+++ b/edit_interface.php
@@ -1753,7 +1753,7 @@ case 'addname':
break;
//------------------------------------------------------------------------------
case 'paste':
- $gedrec .= "\n".$_SESSION["clipboard"][$fact]["factrec"]."\n";
+ $gedrec .= "\n".$WT_SESSION->clipboard[$fact]["factrec"]."\n";
if (replace_gedrec($pid, WT_GED_ID, $gedrec, $NO_UPDATE_CHAN)) {
$success=true;
}
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php
index 5a7115a792..81344ae336 100644
--- a/includes/functions/functions_print.php
+++ b/includes/functions/functions_print.php
@@ -1162,12 +1162,12 @@ function CheckFactUnique($uniquefacts, $recfacts, $type) {
* @param string $type the type of record INDI, FAM, SOUR etc
*/
function print_add_new_fact($id, $usedfacts, $type) {
- global $TEXT_DIRECTION;
+ global $TEXT_DIRECTION, $WT_SESSION;
// -- Add from clipboard
- if (!empty($_SESSION["clipboard"])) {
+ if ($WT_SESSION->clipboard) {
$newRow = true;
- foreach (array_reverse($_SESSION["clipboard"], true) as $key=>$fact) {
+ foreach (array_reverse($WT_SESSION->clipboard, true) as $key=>$fact) {
if ($fact["type"]==$type || $fact["type"]=='all') {
if ($newRow) {
$newRow = false;