mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-10-01 05:05:19 +00:00
Fixed problem with locked date/time attributes and re-edit of pages
SVN revision: 2156
This commit is contained in:
parent
ba2c76af62
commit
d5d31cd889
@ -8882,6 +8882,9 @@ void attrib_from_param(int n_attr, char attrib[MAX_N_ATTR][NAME_LENGTH])
|
|||||||
}
|
}
|
||||||
} else if (attr_flags[i] & AF_DATE) {
|
} else if (attr_flags[i] & AF_DATE) {
|
||||||
|
|
||||||
|
if (isparam(ua))
|
||||||
|
strlcpy(attrib[i], getparam(ua), NAME_LENGTH);
|
||||||
|
else {
|
||||||
sprintf(str, "y%d", i);
|
sprintf(str, "y%d", i);
|
||||||
year = atoi(isparam(str) ? getparam(str) : "");
|
year = atoi(isparam(str) ? getparam(str) : "");
|
||||||
if (year < 100)
|
if (year < 100)
|
||||||
@ -8904,9 +8907,13 @@ void attrib_from_param(int n_attr, char attrib[MAX_N_ATTR][NAME_LENGTH])
|
|||||||
sprintf(attrib[i], "%d", (int) ltime);
|
sprintf(attrib[i], "%d", (int) ltime);
|
||||||
} else
|
} else
|
||||||
strcpy(attrib[i], "");
|
strcpy(attrib[i], "");
|
||||||
|
}
|
||||||
|
|
||||||
} else if (attr_flags[i] & AF_DATETIME) {
|
} else if (attr_flags[i] & AF_DATETIME) {
|
||||||
|
|
||||||
|
if (isparam(ua))
|
||||||
|
strlcpy(attrib[i], getparam(ua), NAME_LENGTH);
|
||||||
|
else {
|
||||||
sprintf(str, "y%d", i);
|
sprintf(str, "y%d", i);
|
||||||
year = atoi(isparam(str) ? getparam(str) : "");
|
year = atoi(isparam(str) ? getparam(str) : "");
|
||||||
if (year < 100)
|
if (year < 100)
|
||||||
@ -8941,6 +8948,7 @@ void attrib_from_param(int n_attr, char attrib[MAX_N_ATTR][NAME_LENGTH])
|
|||||||
sprintf(attrib[i], "%d", (int) ltime);
|
sprintf(attrib[i], "%d", (int) ltime);
|
||||||
} else
|
} else
|
||||||
strcpy(attrib[i], "");
|
strcpy(attrib[i], "");
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (isparam(attr_list[i]))
|
if (isparam(attr_list[i]))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user