Skip to content

Commit

Permalink
status logging
Browse files Browse the repository at this point in the history
  • Loading branch information
following5 committed May 14, 2013
1 parent 8ffe1b4 commit 31d72d9
Show file tree
Hide file tree
Showing 60 changed files with 514 additions and 241 deletions.
20 changes: 20 additions & 0 deletions bin/dbsv-update.php
Expand Up @@ -148,4 +148,24 @@ function dbv_103() // update comments on static tables
sql("ALTER TABLE `nuts_layer` COMMENT = 'static content'");
}

function dbv_104() // added maintenance logs and OC team comments
{
sql("ALTER TABLE `log_types_text` COMMENT = 'obsolete'");
sql("ALTER TABLE `cache_logtype` COMMENT = 'obsolete'");
sql("ALTER TABLE `log_types` CHANGE COLUMN `cache_status` `cache_status` tinyint(1) NOT NULL default '0'");
sql("ALTER TABLE `log_types` CHANGE COLUMN `en` `en` varchar(60) NOT NULL");
if (!field_exists('stat_caches','maintenance'))
sql("ALTER TABLE `stat_caches` ADD COLUMN `maintenance` smallint(5) unsigned NOT NULL AFTER `will_attend`");
if (!field_exists('stat_cache_logs','maintenance'))
sql("ALTER TABLE `stat_cache_logs` ADD COLUMN `maintenance` smallint(5) unsigned NOT NULL AFTER `will_attend`");
if (!field_exists('stat_user','maintenance'))
sql("ALTER TABLE `stat_user` ADD COLUMN `maintenance` smallint(5) unsigned NOT NULL AFTER `will_attend`");
if (!field_exists('cache_logs','oc_team_comment'))
sql("ALTER TABLE `cache_logs` ADD COLUMN `oc_team_comment` tinyint(1) NOT NULL default '0' AFTER `type`");
if (!field_exists('cache_logs_archived','oc_team_comment'))
sql("ALTER TABLE `cache_logs_archived` ADD COLUMN `oc_team_comment` tinyint(1) NOT NULL default '0' AFTER `type`");
// The new fields need not to be initialized, as these are new features and all
// values are initally zero.
}

?>
30 changes: 0 additions & 30 deletions htdocs/adminreports.php
Expand Up @@ -43,36 +43,6 @@
{
$tpl->redirect('mailto.php?userid=' . urlencode($reporterid));
}
elseif ((isset($_REQUEST['statusActive']) ||
isset($_REQUEST['statusTNA']) ||
isset($_REQUEST['statusArchived']) ||
isset($_REQUEST['statusLockedVisible']) ||
isset($_REQUEST['statusLockedInvisible']))
&& $adminid == $login->userid)
{
$cache = new cache($cacheid);

if ($cache->exist() == false)
$tpl->error(ERROR_CACHE_NOT_EXISTS);

if ($cache->allowView() == false)
$tpl->error(ERROR_NO_ACCESS);

if (isset($_REQUEST['statusActive']))
$cache->setStatus(1);
else if (isset($_REQUEST['statusTNA']))
$cache->setStatus(2);
else if (isset($_REQUEST['statusArchived']))
$cache->setStatus(3);
else if (isset($_REQUEST['statusLockedVisible']))
$cache->setStatus(6);
else if (isset($_REQUEST['statusLockedInvisible']))
$cache->setStatus(7);

$cache->save();

$tpl->redirect('adminreports.php?id=' . urlencode($rid));
}
elseif (isset($_REQUEST['done']) && $adminid == $login->userid)
{
sql("UPDATE `cache_reports` SET `status`=3 WHERE `id`=&1", $rid);
Expand Down
99 changes: 74 additions & 25 deletions htdocs/doc/sql/static-data/data.sql

Large diffs are not rendered by default.

87 changes: 37 additions & 50 deletions htdocs/doc/sql/stored-proc/maintain.php
Expand Up @@ -269,39 +269,42 @@
DECLARE nNotFound INT DEFAULT 0;
DECLARE nNote INT DEFAULT 0;
DECLARE nWillAttend INT DEFAULT 0;
DECLARE nMaintenance INT DEFAULT 0;
DECLARE nDate DATE DEFAULT NULL;
IF nLogType = 1 THEN SET nFound=1; END IF;
IF nLogType = 2 THEN SET nNotFound=1; END IF;
IF nLogType = 3 THEN SET nNote=1; END IF;
IF nLogType = 7 THEN SET nFound=1; END IF;
IF nLogType = 8 THEN SET nWillAttend=1; END IF;
IF nLogType IN (9,10,11,13,14) THEN SET nMaintenance=1; END IF;
IF bLogRemoved = TRUE THEN
SET nFound = -nFound;
SET nNotFound = -nNotFound;
SET nNote = -nNote;
SET nWillAttend = -nWillAttend;
SET nMaintenance = -nMaintenance;
END IF;
UPDATE `stat_cache_logs` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0) WHERE `cache_id`=nCacheId AND `user_id`=nUserId;
UPDATE `stat_cache_logs` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0), `maintenance`=IF(`maintenance`+nMaintenance>0, `maintenance`+nMaintenance, 0) WHERE `cache_id`=nCacheId AND `user_id`=nUserId;
IF ROW_COUNT() = 0 THEN
INSERT IGNORE INTO `stat_cache_logs` (`cache_id`, `user_id`, `found`, `notfound`, `note`, `will_attend`) VALUES (nCacheId, nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0));
INSERT IGNORE INTO `stat_cache_logs` (`cache_id`, `user_id`, `found`, `notfound`, `note`, `will_attend`, `maintenance`) VALUES (nCacheId, nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0), IF(nMaintenance>0, nMaintenance, 0));
END IF;
UPDATE `stat_caches` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0) WHERE `cache_id`=nCacheId;
UPDATE `stat_caches` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0), `maintenance`=IF(`maintenance`+nMaintenance>0, `maintenance`+nMaintenance, 0) WHERE `cache_id`=nCacheId;
IF ROW_COUNT() = 0 THEN
INSERT IGNORE INTO `stat_caches` (`cache_id`, `found`, `notfound`, `note`, `will_attend`) VALUES (nCacheId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0));
INSERT IGNORE INTO `stat_caches` (`cache_id`, `found`, `notfound`, `note`, `will_attend`, `maintenance`) VALUES (nCacheId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0), IF(nMaintenance>0, nMaintenance, 0));
END IF;
IF nFound!=0 THEN
SELECT LEFT(`date`,10) INTO nDate FROM `cache_logs` WHERE `cache_id`=nCacheId AND `type` IN (1, 7) ORDER BY `date` DESC LIMIT 1;
UPDATE `stat_caches` SET `last_found`=nDate WHERE `cache_id`=nCacheId;
END IF;
UPDATE `stat_user` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0) WHERE `user_id`=nUserId;
UPDATE `stat_user` SET `found`=IF(`found`+nFound>0, `found`+nFound, 0), `notfound`=IF(`notfound`+nNotFound>0, `notfound`+nNotFound, 0), `note`=IF(`note`+nNote>0, `note`+nNote, 0), `will_attend`=IF(`will_attend`+nWillAttend>0, `will_attend`+nWillAttend, 0), `maintenance`=IF(`maintenance`+nMaintenance>0, `maintenance`+nMaintenance, 0) WHERE `user_id`=nUserId;
IF ROW_COUNT() = 0 THEN
INSERT IGNORE INTO `stat_user` (`user_id`, `found`, `notfound`, `note`, `will_attend`) VALUES (nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0));
INSERT IGNORE INTO `stat_user` (`user_id`, `found`, `notfound`, `note`, `will_attend`, `maintenance`) VALUES (nUserId, IF(nFound>0, nFound, 0), IF(nNotFound>0, nNotFound, 0), IF(nNote>0, nNote, 0), IF(nWillAttend>0, nWillAttend, 0), IF(nMaintenance>0, nMaintenance, 0));
END IF;
CALL sp_refresh_statpic(nUserId);
Expand All @@ -317,52 +320,35 @@
INSERT IGNORE INTO `stat_caches` (`cache_id`) SELECT `cache_id` FROM `cache_logs` GROUP BY `cache_id`;
INSERT IGNORE INTO `stat_cache_logs` (`cache_id`, `user_id`) SELECT `cache_id`, `user_id` FROM `cache_logs`;
/* stat_user.found */
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (1, 7) GROUP BY `user_id`) AS `tblFound` SET `stat_user`.`found`=`tblFound`.`count` WHERE `stat_user`.`user_id`=`tblFound`.`user_id`;
/* This implementation is less performant than the previouse code (up to ~ commit 4ed7ee0),
but the old did not update any values to zero - these entries were ignored!
-- following 2013-05-12 */
/* stat_caches */
UPDATE `stat_caches` SET
`found` = (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
`last_found` = (SELECT MAX(`date`) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
`notfound`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (2) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
`note`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (3) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
`will_attend`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (8) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`),
`maintenance`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (9,10,11,13,14) AND `cache_logs`.`cache_id` = `stat_caches`.`cache_id`);
/* stat_cache_logs */
UPDATE `stat_cache_logs` SET
`found` = (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
`notfound`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (2) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
`note`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (3) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
`will_attend`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (8) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`),
`maintenance`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (9,10,11,13,14) AND `cache_logs`.`cache_id` = `stat_cache_logs`.`cache_id` AND `cache_logs`.`user_id` = `stat_cache_logs`.`user_id`);
SET nModified=nModified+ROW_COUNT();
/* stat_cache_logs.notfound */
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (2) GROUP BY `user_id`) AS `tblNotFound` SET `stat_user`.`notfound`=`tblNotFound`.`count` WHERE `stat_user`.`user_id`=`tblNotFound`.`user_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_cache_logs.note */
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (3) GROUP BY `user_id`) AS `tblNote` SET `stat_user`.`note`=`tblNote`.`count` WHERE `stat_user`.`user_id`=`tblNote`.`user_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_cache_logs.will_attend */
UPDATE `stat_user`, (SELECT `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (8) GROUP BY `user_id`) AS `tblWillAttend` SET `stat_user`.`will_attend`=`tblWillAttend`.`count` WHERE `stat_user`.`user_id`=`tblWillAttend`.`user_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_caches.found and stat_caches.last_found */
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count`, MAX(`date`) AS `last_found` FROM `cache_logs` WHERE `type` IN (1, 7) GROUP BY `cache_id`) AS `tblFound` SET `stat_caches`.`found`=`tblFound`.`count`, `stat_caches`.`last_found`=`tblFound`.`last_found` WHERE `stat_caches`.`cache_id`=`tblFound`.`cache_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_caches.notfound */
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (2) GROUP BY `cache_id`) AS `tblNotFound` SET `stat_caches`.`notfound`=`tblNotFound`.`count` WHERE `stat_caches`.`cache_id`=`tblNotFound`.`cache_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_caches.note */
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (3) GROUP BY `cache_id`) AS `tblNote` SET `stat_caches`.`note`=`tblNote`.`count` WHERE `stat_caches`.`cache_id`=`tblNote`.`cache_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_caches.will_attend */
UPDATE `stat_caches`, (SELECT `cache_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (8) GROUP BY `cache_id`) AS `tblWillAttend` SET `stat_caches`.`will_attend`=`tblWillAttend`.`count` WHERE `stat_caches`.`cache_id`=`tblWillAttend`.`cache_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_cache_logs.found */
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (1, 7) GROUP BY `user_id`, `cache_id`) AS `tblFound` SET `stat_cache_logs`.`found`=`tblFound`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblFound`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblFound`.`user_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_cache_logs.notfound */
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (2) GROUP BY `user_id`, `cache_id`) AS `tblNotFound` SET `stat_cache_logs`.`notfound`=`tblNotFound`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblNotFound`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblNotFound`.`user_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_cache_logs.note */
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (3) GROUP BY `user_id`, `cache_id`) AS `tblNote` SET `stat_cache_logs`.`note`=`tblNote`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblNote`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblNote`.`user_id`;
SET nModified=nModified+ROW_COUNT();
/* stat_cache_logs.will_attend */
UPDATE `stat_cache_logs`, (SELECT `cache_id`, `user_id`, COUNT(*) AS `count` FROM `cache_logs` WHERE `type` IN (8) GROUP BY `user_id`, `cache_id`) AS `tblWillAttend` SET `stat_cache_logs`.`will_attend`=`tblWillAttend`.`count` WHERE `stat_cache_logs`.`cache_id`=`tblWillAttend`.`cache_id` AND `stat_cache_logs`.`user_id`=`tblWillAttend`.`user_id`;
/* stat_user */
UPDATE `stat_user` SET
`found` = (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (1, 7) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
`notfound`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (2) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
`note`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (3) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
`will_attend`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (8) AND `cache_logs`.`user_id` = `stat_user`.`user_id`),
`maintenance`= (SELECT COUNT(*) FROM `cache_logs` WHERE `type` IN (9,10,11,13,14) AND `cache_logs`.`user_id` = `stat_user`.`user_id`);
SET nModified=nModified+ROW_COUNT();
CALL sp_refreshall_statpic();
Expand Down Expand Up @@ -906,6 +892,7 @@
NEW.`cache_id`!=OLD.`cache_id` OR
NEW.`user_id`!=OLD.`user_id` OR
NEW.`type`!=OLD.`type` OR
NEW.`oc_team_comment`!=OLD.`oc_team_comment` OR
NEW.`date`!=OLD.`date` OR
NEW.`text`!=OLD.`text` OR
NEW.`text_html`!=OLD.`text_html` THEN
Expand Down
1 change: 1 addition & 0 deletions htdocs/doc/sql/tables/cache_logs.sql
Expand Up @@ -10,6 +10,7 @@ CREATE TABLE `cache_logs` (
`cache_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`oc_team_comment` tinyint(1) NOT NULL default '0',
`date` datetime NOT NULL,
`text` mediumtext NOT NULL,
`text_html` tinyint(1) NOT NULL default '0',
Expand Down
1 change: 1 addition & 0 deletions htdocs/doc/sql/tables/cache_logs_archived.sql
Expand Up @@ -10,6 +10,7 @@ CREATE TABLE `cache_logs_archived` (
`cache_id` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`oc_team_comment` tinyint(1) NOT NULL default '0',
`date` datetime NOT NULL,
`text` mediumtext NOT NULL,
`text_html` tinyint(1) NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion htdocs/doc/sql/tables/cache_logtype.sql
Expand Up @@ -5,4 +5,4 @@ CREATE TABLE `cache_logtype` (
`log_type_id` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`cache_type_id`,`log_type_id`),
KEY `log_type_id` (`log_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='obsolete' ;
4 changes: 2 additions & 2 deletions htdocs/doc/sql/tables/log_types.sql
Expand Up @@ -5,9 +5,9 @@ CREATE TABLE `log_types` (
`name` varchar(80) NOT NULL,
`trans_id` int(10) unsigned NOT NULL,
`permission` char(1) NOT NULL COMMENT 'obsolete',
`cache_status` tinyint(1) NOT NULL default '0' COMMENT 'obsolete',
`cache_status` tinyint(1) NOT NULL default '0',
`de` varchar(60) NOT NULL COMMENT 'obsolete',
`en` varchar(60) NOT NULL COMMENT 'obsolete',
`en` varchar(60) NOT NULL,
`icon_small` varchar(255) NOT NULL,
`allow_rating` tinyint(1) NOT NULL,
`require_password` tinyint(1) NOT NULL,
Expand Down
1 change: 1 addition & 0 deletions htdocs/doc/sql/tables/stat_cache_logs.sql
Expand Up @@ -7,5 +7,6 @@ CREATE TABLE `stat_cache_logs` (
`notfound` smallint(5) unsigned NOT NULL,
`note` smallint(5) unsigned NOT NULL,
`will_attend` smallint(5) unsigned NOT NULL,
`maintenance` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`cache_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='via trigger (cache_logs)' ;
1 change: 1 addition & 0 deletions htdocs/doc/sql/tables/stat_caches.sql
Expand Up @@ -6,6 +6,7 @@ CREATE TABLE `stat_caches` (
`notfound` smallint(5) unsigned NOT NULL,
`note` smallint(5) unsigned NOT NULL,
`will_attend` smallint(5) unsigned NOT NULL,
`maintenance` smallint(5) unsigned NOT NULL,
`last_found` date default NULL,
`watch` smallint(5) unsigned NOT NULL,
`ignore` smallint(5) unsigned NOT NULL,
Expand Down
1 change: 1 addition & 0 deletions htdocs/doc/sql/tables/stat_user.sql
Expand Up @@ -7,5 +7,6 @@ CREATE TABLE `stat_user` (
`note` smallint(5) unsigned NOT NULL,
`hidden` smallint(5) unsigned NOT NULL,
`will_attend` smallint(5) unsigned NOT NULL,
`maintenance` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='via trigger (user)' ;
3 changes: 2 additions & 1 deletion htdocs/doc/xml/xml11.htm
Expand Up @@ -45,6 +45,7 @@ <h2>Änderungen in Version 1.3 (Mai 2013)</h2>
<li>Element für Bildeigenschaften von &lt;attributes&gt; in &lt;picattr&gt; umbenannt, um Kollisionen mit dem Cache-Attribut-Element zu vermeiden.</li>
<li>Vorschaubild-Flag (<em>preview</em>) zu &lt;picattr&gt; hinzugefügt.</li>
<li>zusätzliche Logtypen 9 (archiviert), 10 (kann gesucht werden), 11 (momentan nicht verfügbar) und 13 (gesperrt)</li>
<li><em>teamcomment</em>-Flag zum &lt;logtype&gt; hinzugefügt</li>
</ul>

<p>Der XML-Doctype lautet in allen Versionen "oc11xml".</p>
Expand Down Expand Up @@ -188,7 +189,7 @@ <h3>cachelog (Logeinträge)</h3>
&nbsp; &lt;user id="113"
uuid="CAA9E3C5-50DF-4E9E-191F-CECABA6A8A19"&gt;&lt;![CDATA[Team
Schnitzeljagd]]&gt;&lt;/user&gt;<BR>
&nbsp; &lt;logtype id="1" recommended="0"&gt;&lt;![CDATA[Gefunden]]&gt;&lt;/type&gt;<br>
&nbsp; &lt;logtype id="1" recommended="0" teamcomment="0"&gt;&lt;![CDATA[Gefunden]]&gt;&lt;/type&gt;<br>
&nbsp; &lt;date&gt;2005-05-18 16:20:00&lt;/date&gt;<br>
&nbsp; &lt;text&gt;&lt;![CDATA[Gut gefunden.&amp;lt;br /&amp;gt;<br>
Gr&amp;uuml;&amp;szlig;e von&amp;lt;br /&amp;gt;<br>
Expand Down
4 changes: 3 additions & 1 deletion htdocs/editcache.php
Expand Up @@ -754,7 +754,8 @@ function getWaypoints($cacheid)
while ($rStatus = sql_fetch_assoc($rsStatus))
{
$sSelected = ($rStatus['id'] == $status) ? ' selected="selected"' : '';
$statusoptions .= '<option value="' . htmlspecialchars($rStatus['id'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($rStatus['name'], ENT_COMPAT, 'UTF-8') . '</option>';
if ($sSelected != '' || $status_old == 5)
$statusoptions .= '<option value="' . htmlspecialchars($rStatus['id'], ENT_COMPAT, 'UTF-8') . '"' . $sSelected . '>' . htmlspecialchars($rStatus['name'], ENT_COMPAT, 'UTF-8') . '</option>';
}
sql_free_result($rsStatus);
}
Expand All @@ -763,6 +764,7 @@ function getWaypoints($cacheid)
$statusoptions .= '<option value="7" selected="selected">' . htmlspecialchars(t("Locked, invisible"), ENT_COMPAT, 'UTF-8') . '</option>';
}
tpl_set_var('statusoptions', $statusoptions);
tpl_set_var('statuschange', $status_old == 5 ? '' : mb_ereg_replace('%1',$cache_id,$status_change));

// show activation form?
if($status_old == 5) // status = not yet published
Expand Down

0 comments on commit 31d72d9

Please sign in to comment.