Dieser Commit ist enthalten in:
Oldperl 2019-07-02 14:26:22 +00:00
Ursprung 7115778524
Commit 991872aeb8
3 geänderte Dateien mit 36 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -70,12 +70,13 @@ class cSession {
## call this function to register the things that should become persistent ## call this function to register the things that should become persistent
function register($things) { function register($things) {
$things = explode(",", $things); $arr_things = explode(",", $things);
reset($things); reset($arr_things);
while (list(, $thing) = each($things)) { //while (list(, $thing) = each($arr_things)) {
$thing = trim($thing); foreach($arr_things as $thing) {
if ($thing) { $str_thing = trim($thing);
$this->pt[$thing] = true; if ($str_thing) {
$this->pt[$str_thing] = true;
} }
} }
} }
@ -295,6 +296,7 @@ class cSession {
switch ($t) { switch ($t) {
case "array": case "array":
/*
## $$var is an array. Enumerate the elements and serialize them. ## $$var is an array. Enumerate the elements and serialize them.
eval("reset(\$$var); \$l = gettype(list(\$k)=each(\$$var));"); eval("reset(\$$var); \$l = gettype(list(\$k)=each(\$$var));");
$str .= "\$$var = array(); "; $str .= "\$$var = array(); ";
@ -303,6 +305,15 @@ class cSession {
$this->serialize($var . "['" . preg_replace("/([\\'])/", "\\\\1", $k) . "']", $str); $this->serialize($var . "['" . preg_replace("/([\\'])/", "\\\\1", $k) . "']", $str);
eval("\$l = gettype(list(\$k)=each(\$$var));"); eval("\$l = gettype(list(\$k)=each(\$$var));");
} }
*/
// $$var is an array. Enumerate the elements and serialize them.
$str .= "\$$var = array(); ";
eval("\$l = array(); foreach(\$$var as \$k => \$v) {\$l[] = array(\$k,gettype(\$k),\$v);}");
foreach ($l as $item) {
// Structural recursion
$this->serialize($var . "['" . preg_replace("/([\\'])/", "\\\\1", $item[0]) . "']", $str);
}
break; break;
case "object": case "object":
@ -344,12 +355,27 @@ class cSession {
$this->serialize("this->pt", $str); $this->serialize("this->pt", $str);
reset($this->pt); reset($this->pt);
$int_cnt_pt = count($this->pt);
for($i=0;$i<$int_cnt_pt;$i++) {
$thing = trim(key($this->pt));
if ($thing && isset($GLOBALS[$thing])) {
$this->serialize("GLOBALS['" . $thing . "']", $str);
}
next($this->pt);
}
/*
reset($this->pt); echo "\n";
while (list($thing) = each($this->pt)) { while (list($thing) = each($this->pt)) {
$thing = trim($thing); //foreach($this->pt as $thing) {
echo "\n".$thing = trim($thing);
if ($thing && isset($GLOBALS[$thing])) { if ($thing && isset($GLOBALS[$thing])) {
$this->serialize("GLOBALS['" . $thing . "']", $str); $this->serialize("GLOBALS['" . $thing . "']", $str);
} }
} }
*
*/
//return; //return;
$r = $this->that->ac_store($this->id, $this->name, $str); $r = $this->that->ac_store($this->id, $this->name, $str);
$this->release_lock(); $this->release_lock();

Datei anzeigen

@ -63,11 +63,11 @@ if (isset($_REQUEST["listsubmit"]))
class TODOBackendList extends cScrollList class TODOBackendList extends cScrollList
{ {
var $statustypes; var $statustypes;
function TODOBackendList () function __construct ()
{ {
global $todoitems; global $todoitems;
parent::cScrollList(); parent::__construct();
$this->statustypes = $todoitems->getStatusTypes(); $this->statustypes = $todoitems->getStatusTypes();
$this->prioritytypes = $todoitems->getPriorityTypes(); $this->prioritytypes = $todoitems->getPriorityTypes();

Datei anzeigen

@ -358,7 +358,7 @@ function clStatusLine2Array($sLine) {
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><?php echo TITLE; ?></title> <title><?php echo CL_BACKUP_VERSION; ?></title>
<style type="text/css"> <style type="text/css">
body {position: relative; padding-bottom: 3em;} body {position: relative; padding-bottom: 3em;}
h2, p {margin: 0;} h2, p {margin: 0;}