Skip to content
Permalink
Browse files

status logging

  • Loading branch information...
following5 committed May 12, 2013
1 parent 8ffe1b4 commit 31d72d9b7c7cde931f836749bda4ab83f0b63ef6
Showing with 514 additions and 241 deletions.
  1. +20 −0 bin/dbsv-update.php
  2. +0 −30 htdocs/adminreports.php
  3. +74 −25 htdocs/doc/sql/static-data/data.sql
  4. +37 −50 htdocs/doc/sql/stored-proc/maintain.php
  5. +1 −0 htdocs/doc/sql/tables/cache_logs.sql
  6. +1 −0 htdocs/doc/sql/tables/cache_logs_archived.sql
  7. +1 −1 htdocs/doc/sql/tables/cache_logtype.sql
  8. +2 −2 htdocs/doc/sql/tables/log_types.sql
  9. +1 −0 htdocs/doc/sql/tables/stat_cache_logs.sql
  10. +1 −0 htdocs/doc/sql/tables/stat_caches.sql
  11. +1 −0 htdocs/doc/sql/tables/stat_user.sql
  12. +2 −1 htdocs/doc/xml/xml11.htm
  13. +3 −1 htdocs/editcache.php
  14. +29 −21 htdocs/editlog.php
  15. +1 −0 htdocs/lang/de/ocstyle/editcache.inc.php
  16. +1 −1 htdocs/lang/de/ocstyle/editcache.tpl.php
  17. +2 −0 htdocs/lang/de/ocstyle/editlog.inc.php
  18. +1 −0 htdocs/lang/de/ocstyle/editlog.tpl.php
  19. +1 −17 htdocs/lang/de/ocstyle/lib/icons.inc.php
  20. +1 −1 htdocs/lang/de/ocstyle/log_cache.inc.php
  21. +1 −0 htdocs/lang/de/ocstyle/log_cache.tpl.php
  22. +127 −0 htdocs/lib/logtypes.inc.php
  23. +5 −0 htdocs/lib/search.gpx.inc.php
  24. +1 −0 htdocs/lib2/logic/cache.class.php
  25. +18 −14 htdocs/lib2/logic/cachelog.class.php
  26. +35 −39 htdocs/log.php
  27. +2 −1 htdocs/newlogs.php
  28. +1 −0 htdocs/okapi/core.php
  29. +1 −0 htdocs/okapi/services/logs/entry.xml
  30. +7 −2 htdocs/removelog.php
  31. BIN htdocs/resource2/ocstyle/images/log/{16x16-go.png → 16x16-active.png}
  32. BIN htdocs/resource2/ocstyle/images/log/{16x16-trash.png → 16x16-archived.png}
  33. BIN htdocs/resource2/ocstyle/images/log/{16x16-stop.png → 16x16-disabled.png}
  34. BIN htdocs/resource2/ocstyle/images/log/16x16-locked-invisible.png
  35. BIN htdocs/resource2/ocstyle/images/log/16x16-locked.png
  36. BIN htdocs/resource2/ocstyle/images/logtype/16x16-dnf.png
  37. BIN htdocs/resource2/ocstyle/images/logtype/16x16-found.png
  38. BIN htdocs/resource2/ocstyle/images/logtype/16x16-go.png
  39. BIN htdocs/resource2/ocstyle/images/logtype/16x16-note.png
  40. BIN htdocs/resource2/ocstyle/images/logtype/16x16-stop.png
  41. BIN htdocs/resource2/ocstyle/images/logtype/16x16-trash.png
  42. 0 htdocs/resource2/ocstyle/images/logtype/index.html
  43. BIN htdocs/resource2/ocstyle/images/oclogo/oc-team-comment.png
  44. BIN htdocs/resource2/ocstyle/images/viewcache/16x16-maintenance.png
  45. +4 −3 htdocs/restorecaches.php
  46. +26 −12 htdocs/templates2/ocstyle/adminreports.tpl
  47. +1 −1 htdocs/templates2/ocstyle/myhome.tpl
  48. +19 −0 htdocs/templates2/ocstyle/newlogs.tpl
  49. +11 −0 htdocs/templates2/ocstyle/res_logentry_logitem.tpl
  50. +10 −0 htdocs/templates2/ocstyle/res_logtype.tpl
  51. +6 −5 htdocs/templates2/ocstyle/viewcache.tpl
  52. +5 −4 htdocs/templates2/ocstyle/viewcache_print.tpl
  53. +12 −3 htdocs/templates2/ocstyle/viewprofile.tpl
  54. +0 −1 htdocs/translate.php
  55. +25 −2 htdocs/util/watchlist/runwatch.php
  56. +2 −2 htdocs/util/watchlist/settings-dist.inc.php
  57. +1 −0 htdocs/viewcache.php
  58. +2 −0 htdocs/viewprofile.php
  59. +11 −2 htdocs/xml/ocxml11.php
  60. +1 −0 htdocs/xml/ocxml13.dtd
@@ -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.
}
?>
@@ -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);

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -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);
@@ -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();
@@ -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
@@ -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',
@@ -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,
@@ -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' ;
@@ -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,
@@ -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)' ;
@@ -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,
@@ -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)' ;
@@ -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>
@@ -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>
@@ -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);
}
@@ -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
Oops, something went wrong.

0 comments on commit 31d72d9

Please sign in to comment.
You can’t perform that action at this time.