Skip to content
Permalink
Browse files

added 'need maintenance' and 'description ist outdated' log flags

  • Loading branch information...
following5 committed Feb 26, 2016
1 parent b797e96 commit 7ce0358ce91924a693a2ec17799efe5526118086
Showing with 746 additions and 177 deletions.
  1. +25 −0 bin/dbsv-update.php
  2. +10 −4 htdocs/doc/sql/modification-dates.txt
  3. +42 −2 htdocs/doc/sql/static-data/data.sql
  4. +20 −1 htdocs/doc/sql/stored-proc/maintain-current.inc.php
  5. +2 −0 htdocs/doc/sql/tables/cache_logs.sql
  6. +2 −0 htdocs/doc/sql/tables/cache_logs_archived.sql
  7. +2 −0 htdocs/doc/sql/tables/cache_logs_modified.sql
  8. +3 −0 htdocs/doc/sql/tables/caches.sql
  9. +102 −98 htdocs/doc/xml/xml11.htm
  10. +37 −0 htdocs/lib/cache.inc.php
  11. +18 −0 htdocs/lib/consts-common.inc.php
  12. +1 −8 htdocs/lib/consts.inc.php
  13. +2 −2 htdocs/lib2/cli.inc.php
  14. +1 −8 htdocs/lib2/const.inc.php
  15. +36 −0 htdocs/lib2/logic/cache.class.php
  16. +23 −0 htdocs/lib2/logic/cachelog.class.php
  17. +2 −1 htdocs/lib2/logic/rowEditor.class.php
  18. +2 −2 htdocs/lib2/web.inc.php
  19. +20 −1 htdocs/log.php
  20. +6 −2 htdocs/myhome.php
  21. +2 −0 htdocs/newlogs.php
  22. +1 −0 htdocs/removelog.php
  23. +14 −3 htdocs/resource2/ocstyle/css/style_screen.css
  24. BIN htdocs/resource2/ocstyle/images/cachestatus/32x32-archived.png
  25. BIN htdocs/resource2/ocstyle/images/cachestatus/32x32-disabled.png
  26. BIN htdocs/resource2/ocstyle/images/cachestatus/32x32-locked.png
  27. BIN htdocs/resource2/ocstyle/images/cachestatus/listing-outdated.png
  28. BIN htdocs/resource2/ocstyle/images/cachestatus/needs-maintenance.png
  29. BIN htdocs/resource2/ocstyle/images/log/16x16-listing-outdated-no.png
  30. BIN htdocs/resource2/ocstyle/images/log/16x16-listing-outdated.png
  31. BIN htdocs/resource2/ocstyle/images/log/16x16-needs-maintenance-no.png
  32. BIN htdocs/resource2/ocstyle/images/log/16x16-needs-maintenance.png
  33. +1 −1 htdocs/search.php
  34. +74 −22 htdocs/templates2/ocstyle/log_cache.tpl
  35. +2 −2 htdocs/templates2/ocstyle/myhome.tpl
  36. +1 −1 htdocs/templates2/ocstyle/newlogs.tpl
  37. +2 −4 htdocs/templates2/ocstyle/res_logentry_logitem.tpl
  38. +5 −0 htdocs/templates2/ocstyle/res_logflags.tpl
  39. +4 −0 htdocs/templates2/ocstyle/res_state_warning.tpl
  40. +16 −2 htdocs/templates2/ocstyle/viewcache.tpl
  41. +67 −5 htdocs/util/watchlist/runwatch.php
  42. +2 −0 htdocs/viewcache.php
  43. +33 −8 htdocs/xml/ocxml11.php
  44. +152 −0 htdocs/xml/ocxml15.dtd
  45. +14 −0 htdocs/xml/ocxml15.php
@@ -727,6 +727,31 @@ function dbv_145() // optimize log change recording
// (the feature was started just a few days befor this change).
}
function dbv_146() // NM flags
{
if (!sql_field_exists('cache_logs', 'needs_maintenance'))
sql("ALTER TABLE `cache_logs` ADD COLUMN `needs_maintenance` tinyint(1) NOT NULL default '0' AFTER `date`");
if (!sql_field_exists('cache_logs', 'listing_outdated'))
sql("ALTER TABLE `cache_logs` ADD COLUMN `listing_outdated` tinyint(1) NOT NULL default '0' AFTER `needs_maintenance`");
if (!sql_field_exists('cache_logs_modified', 'needs_maintenance'))
sql("ALTER TABLE `cache_logs_modified` ADD COLUMN `needs_maintenance` tinyint(1) NOT NULL default '0' AFTER `date`");
if (!sql_field_exists('cache_logs_modified', 'listing_outdated'))
sql("ALTER TABLE `cache_logs_modified` ADD COLUMN `listing_outdated` tinyint(1) NOT NULL default '0' AFTER `needs_maintenance`");
if (!sql_field_exists('cache_logs_archived', 'needs_maintenance'))
sql("ALTER TABLE `cache_logs_archived` ADD COLUMN `needs_maintenance` tinyint(1) NOT NULL default '0' AFTER `date`");
if (!sql_field_exists('cache_logs_archived', 'listing_outdated'))
sql("ALTER TABLE `cache_logs_archived` ADD COLUMN `listing_outdated` tinyint(1) NOT NULL default '0' AFTER `needs_maintenance`");
if (!sql_field_exists('caches', 'needs_maintenance'))
sql("ALTER TABLE `caches` ADD COLUMN `needs_maintenance` tinyint(1) NOT NULL default '0'");
if (!sql_field_exists('caches', 'listing_outdated'))
sql("ALTER TABLE `caches` ADD COLUMN `listing_outdated` tinyint(1) NOT NULL default '0'");
if (!sql_field_exists('caches', 'flags_last_modified'))
sql("ALTER TABLE `caches` ADD COLUMN `flags_last_modified` datetime NOT NULL COMMENT 'via Trigger (caches)'");
}
// When adding new mutations, take care that they behave well if run multiple
// times. This improves robustness of database versioning.
@@ -17,14 +17,14 @@ caches

last_modified
Is updated when any data of a caches record changes which is presented to
the user and/or output by export interfaces. This triggers an XML interface
update (resending) of the cache record, and an update of listing_last_modified
and okapi_syncbase.
the user and/or output by export interfaces, including attribures.
This triggers an XML interface update (resending) of the cache record,
and an update of listing_last_modified and okapi_syncbase.

listing_last_modified
The listing modification date, as displayed by viewcache and output via OKAPI,
XML interface etc.; added with OC 3.0.6 to fix listing modification date.
Is updated when the user enters/changes/deletes any properties of the cache
Is updated when the owner enters/changes/deletes any properties of the cache
listing which may be presented to the user or exported via XML interface.
This triggers an update of okapi_syncbase.

@@ -59,6 +59,12 @@ meta_last_modified
replication does not include logs in geocaches records but treats them as
separate objects.

flags_last_modified
Is updated when logger-supplied cache properties change, which do not update
the listing moficiation date but are exported through XML interface.
Currently this are the flags needs_maintenance and listing_outdated. Cache lists
associated with the cache may be added to update this date.

An additional field may be needed in the future for listing data which is not
provied by the owner (or admins), like wp_gc_maintained or "logger feedback"
on cache properties. As soon as this data is output via XML interface, it must
@@ -2821,6 +2821,26 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2534', '%1 repo
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2535', 'queuing time for new reports: about %1 to %2 days', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2536', 'Cache list:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2537', 'Cache lists:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2538', 'Geocache condition:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2539', 'not specified', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2540', 'ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2541', 'needs maintenance', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2542', 'The geocache needs maintenance.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2543', 'The geocache is in good or acceptable condition.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2544', 'Select <i>needs maintenance</i> if the geocache was in poor condition at the<br />specified date and in urgent need of maintenance. Please explain why.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2545', 'up to date', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2546', 'outdated', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2547', 'The geocache description is outdated.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2548', 'The geocache description is ok.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2549', 'Select <i>is outdated</i> if the geocache search is hampered by outdated information in<br />the description, e.g. the location has severely changed or the description lacks<br />important information which has been added at another geocaching website.<br />Please give details in your log.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2550', 'Select <i>is outdated</i> if the geocache search is hampered by outdated information<br />in the description, e.g. because the location has severely changed. Please give<br />details in your log.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2551', 'When did you find the geocache?', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2552', 'When did you abort the cache search?', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2553', '<strong>This geocache description may be outdated.</strong> See the <span style=\"white-space:nowrap\"><img src=\"resource2/ocstyle/images/log/16x16-listing-outdated.png\"> <a href=\"#logentries\" class=\"systemlink\">log entries</a></span> for more information.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2555', 'geocache needs maintenance', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2556', 'geocache is ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2557', 'description is outdated', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2558', 'description is ok', '2015-06-17 10:09:14');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1698', 'DE', 'Bild hinzufügen', '2010-10-03 20:23:10');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1699', 'DE', 'Meldung', '2010-10-03 19:30:02');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1700', 'DE', 'Es ist kein Google-Maps-Key für diese Domain registriert.', '2010-10-03 22:27:01');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1701', 'DE', 'Achtung! Dieser Geocache ist \&quot;<span class=\"errormsg\">%1</span>\&quot;!</strong> Es befindet sich kein Behälter an den angegebenen (oder zu ermittelnden) Koordinaten. Im Interesse des Ortes sollte von einer Suche unbedingt abgesehen werden!', '2010-10-06 22:30:35');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1702', 'DE', 'Achtung! Dieser Geocache ist \&quot;<span class=\"errormsg\">%1</span>\&quot;!</strong> Der Geocache selbst oder Teile davon sind nicht vorhanden oder es gibt andere Probleme, die eine erfolgreiche Suche unmöglich machen. Im Interesse des Ortes sollte von einer Suche unbedingt abgesehen werden!', '2010-10-06 22:29:56');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1701', 'DE', 'Achtung! Dieser Geocache ist \&bdquo;<span class=\"errormsg\">%1</span>\&ldquo;!</strong> Es befindet sich kein Behälter an den angegebenen (oder zu ermittelnden) Koordinaten. Im Interesse des Ortes sollte von einer Suche unbedingt abgesehen werden!', '2010-10-06 22:30:35');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1702', 'DE', 'Achtung! Dieser Geocache ist \&bdquo;<span class=\"errormsg\">%1</span>\&ldquo;!</strong> Der Geocache selbst oder Teile davon sind nicht vorhanden oder es gibt andere Probleme, die eine erfolgreiche Suche unmöglich machen. Im Interesse des Ortes sollte von einer Suche unbedingt abgesehen werden!', '2010-10-06 22:29:56');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1703', 'DE', 'Du hast dieses Event besucht!', '2010-10-06 22:30:56');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1704', 'DE', 'Du hast diesen Geocache bereits gefunden!', '2010-10-06 22:34:51');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1705', 'DE', '<i>Veraltet: Dieses Attribut kann bei neuen Geocaches nicht mehr verwendet werden, weil das Attribut unsere aktuellen Nutzungsbedingungen nicht erfüllt</i><br />Dieser Cache ist auf mehreren Geocaching-Seiten gelistet, und die Beschreibung bei Opencaching kann unvollständig sein. Die vollständige Beschreibung auf der/den externen Seiten sollte im Opencaching-Listing verlinkt sein. Wir weisen darauf hin, dass nach unseren aktuellen Nutzungsbedingungen auch stets auf Opencaching die Beschreibungen und der Cachestatus vom Eigentümer aktuell gehalten werden müssen. Dieses Attribut ermöglicht es z.B. PDA-Benutzern, Geocaches gezielt zu filtern, die keine vollständige Beschreibung enthalten und deshalb nicht unterwegs gelöst werden können. ', '2011-02-05 22:55:52');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2535', 'DE', 'Wartezeit für neue Meldungen: ca. %1&ndash;%2 Tage', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2536', 'DE', 'Cacheliste:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2537', 'DE', 'Cachelisten:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2538', 'DE', 'Zustand des Caches:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2539', 'DE', 'keine Angabe', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2540', 'DE', 'ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2541', 'DE', 'benötigt Wartung', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2542', 'DE', 'Der Cache benötigt Wartung.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2543', 'DE', 'Der Cache ist in gutem oder akzeptablem Zustand.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2544', 'DE', 'Wähle <i>benötigt Wartung</i>, wenn der Cache zum angegebenen Zeitpunkt in<br />schlechtem Zustand war und dringend Wartung benötigte. Bitte erkläre<br />Genaueres in deinem Logeintrag.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2545', 'DE', 'in Ordnung', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2546', 'DE', 'veraltet', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2547', 'DE', 'Die Cachebeschreibung ist veraltet.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2548', 'DE', 'Die Cachebeschreibung ist in Ordnung.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2549', 'DE', 'Wähle <i>veraltet</i>, wenn die Cachesuche durch veraltete Angaben in der Beschreibung<br />erheblich erschwert ist, z.&nbsp;B. weil der Ort sich stark verändert hat, oder weil wichtige<br />Informationen fehlen, die auf einer anderen Geocaching-Website vorhanden sind.<br />Bitte erkläre in deinem Logeintrag Genaueres.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2550', 'DE', 'Wähle <i>veraltet</i>, wenn die Cachesuche durch veraltete Angaben in der Beschreibung<br />erheblich erschwert ist, zum Beispiel weil der Ort sich stark verändert hat. Bitte<br />erkläre in deinem Logeintrag Genaueres.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2551', 'DE', 'Wann hast du den Cache gefunden?', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2552', 'DE', 'Wann hast du die Suche abgebrochen?', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2553', 'DE', '<strong>Diese Cachebeschreibung ist wahrscheinlich veraltet.</strong> Weitere Erläuterungen finden sich in den <span style=\"white-space:nowrap\"><img src=\"resource2/ocstyle/images/log/16x16-listing-outdated.png\">-<a href=\"#logentries\" class="systemlink">Logeinträgen</a></span>.', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2555', 'DE', 'Cache benötigt Wartung', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2556', 'DE', 'Cache ist ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2557', 'DE', 'Cachebeschreibung ist veraltet', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2558', 'DE', 'Cachebeschreibung ist ok', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs', '2010-09-02 00:15:30');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'EN', 'The database could not be reconnected.', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'EN', 'Testing – please do not login', '2010-08-28 11:48:07');
@@ -306,7 +306,8 @@
SET nModified = ROW_COUNT() ;
END;", strtoupper($lang . ',EN'));
// update found, last_found, notfound and note of stat_cache_logs, stat_caches and stat_user
// update found, last_found, notfound and note of stat_cache_logs, stat_caches and stat_user,
// and caches.needs_maintenance and .listing_outdated
sql_dropProcedure('sp_update_logstat');
sql("CREATE PROCEDURE sp_update_logstat (IN nCacheId INT(10) UNSIGNED, IN nUserId INT(10) UNSIGNED, IN nLogType INT, IN bLogRemoved BOOLEAN)
BEGIN
@@ -347,6 +348,11 @@
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 `caches` SET
`needs_maintenance` = (SELECT GREATEST(0,`needs_maintenance`-1) FROM `cache_logs` WHERE `cache_logs`.`cache_id`=nCacheID AND (`cache_logs`.`needs_maintenance`>0 OR `cache_logs`.`type` In (9,13,14)) ORDER BY `date` DESC, `date_created` DESC LIMIT 1),
`listing_outdated` = (SELECT GREATEST(0,`listing_outdated`-1) FROM `cache_logs` WHERE `cache_logs`.`cache_id`=nCacheID AND (`cache_logs`.`listing_outdated`>0 OR `cache_logs`.`type` In (9,13,14)) ORDER BY `date` DESC, `date_created` DESC LIMIT 1)
WHERE `caches`.`cache_id`=nCacheId;
END IF;
IF IFNULL(@deleting_user,0)=0 THEN
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;
@@ -752,6 +758,11 @@
BEGIN
SET @dont_update_listingdate=1;
IF NEW.`status` IN (4,5,6,7) THEN
SET NEW.`needs_maintenance`=0;
SET NEW.`listing_outdated`=0;
END IF;
/* dont overwrite date values while XML client is running */
IF ISNULL(@XMLSYNC) OR @XMLSYNC!=1 THEN
IF OLD.`cache_id`!=NEW.`cache_id` OR
@@ -784,6 +795,10 @@
SET NEW.`last_modified`=NOW();
END IF;
IF OLD.`needs_maintenance`!=NEW.`needs_maintenance` OR OLD.`listing_outdated`!=NEW.`listing_outdated` THEN
SET NEW.`flags_last_modified`=NOW();
END IF;
IF NEW.`last_modified` != OLD.`last_modified` THEN
SET NEW.`listing_last_modified`=NOW();
END IF;
@@ -1117,6 +1132,8 @@
NEW.`type`!=OLD.`type` OR
NEW.`oc_team_comment`!=OLD.`oc_team_comment` OR
NEW.`date`!=OLD.`date` OR
NEW.`needs_maintenance`!=OLD.`needs_maintenance` OR
NEW.`listing_outdated`!=OLD.`listing_outdated` OR
NEW.`text`!=BINARY OLD.`text` OR
NEW.`text_html`!=OLD.`text_html` THEN
@@ -1127,10 +1144,12 @@
INSERT IGNORE INTO `cache_logs_modified`
(`id`, `uuid`, `node`, `date_created`, `last_modified`, `log_last_modified`,
`cache_id`, `user_id`, `type`, `oc_team_comment`, `date`,
`needs_maintenance`, `listing_outdated`,
`text`, `text_html`, `modify_date`)
VALUES
(OLD.`id`, OLD.`uuid`, OLD.`node`, OLD.`date_created`, OLD.`last_modified`,
OLD.`log_last_modified`, OLD.`cache_id`, OLD.`user_id`, OLD.`type`,
OLD.`needs_maintenance`, OLD.`listing_outdated`,
OLD.`oc_team_comment`, OLD.`date`, OLD.`text`, OLD.`text_html`, NOW());
END IF;
@@ -12,6 +12,8 @@ CREATE TABLE `cache_logs` (
`type` tinyint(3) unsigned NOT NULL,
`oc_team_comment` tinyint(1) NOT NULL default '0',
`date` datetime NOT NULL,
`needs_maintenance` tinyint(1) NOT NULL default '0',
`listing_outdated` tinyint(1) NOT NULL default '0',
`text` mediumtext NOT NULL,
`text_html` tinyint(1) NOT NULL default '1',
`text_htmledit` tinyint(1) NOT NULL default '1',
@@ -12,6 +12,8 @@ CREATE TABLE `cache_logs_archived` (
`type` tinyint(3) unsigned NOT NULL,
`oc_team_comment` tinyint(1) NOT NULL default '0',
`date` datetime NOT NULL,
`needs_maintenance` tinyint(1) NOT NULL default '0',
`listing_outdated` tinyint(1) NOT NULL default '0',
`text` mediumtext NOT NULL,
`text_html` tinyint(1) NOT NULL,
`text_htmledit` tinyint(1) NOT NULL,
Oops, something went wrong.

0 comments on commit 7ce0358

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