diff --git a/htdocs/doc/sql/static-data/data.sql b/htdocs/doc/sql/static-data/data.sql index 4382ba55..ffbf17c1 100644 --- a/htdocs/doc/sql/static-data/data.sql +++ b/htdocs/doc/sql/static-data/data.sql @@ -2217,6 +2217,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1792', 'Additio INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1793', 'No waypoints available', '2011-07-15 22:33:33'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1794', 'Additional waypoints can make searching easier, for example by pointing to a suitable parkering or start of a path. The waypoints are downloaded in the GPX-file.', '2011-07-15 22:34:44'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1795', 'Maps:', '2012-07-23 22:26:31'); +INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1796', 'Published on', '2012-07-24 19:16:00'); -- Table sys_trans_ref SET NAMES 'utf8'; @@ -4307,6 +4308,7 @@ INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1792' INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1793', './lang/de/ocstyle/editcache.inc.php', '48'); INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1794', './templates2/ocstyle/viewcache.tpl', '323'); INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1795', './templates2/ocstyle/viewcache.tpl', '235'); +INSERT INTO `sys_trans_ref` (`trans_id`, `resource_name`, `line`) VALUES ('1796', './templates2/ocstyle/viewcache.tpl', '173'); -- Table sys_trans_text SET NAMES 'utf8'; @@ -5690,6 +5692,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1793', 'DE', 'Keine zusätzlichen Wegpunkte angelegt', '2011-07-17 20:51:14'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1794', 'DE', 'Zusätzliche Wegpunkte können die Suche vereinfachen, indem sie z.B. auf einem Parkplatz oder den Anfang der Strecke zeigen. Die Wegpunkte werden auch in der GPX-Datei gespeichert.', '2011-07-17 20:52:52'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1795', 'DE', 'Karten:', '2012-07-23 22:26:38'); +INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1796', 'DE', 'Veröffentlicht am', '2012-07-23 22:26:38'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs \r', '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'); diff --git a/htdocs/doc/sql/stored-proc/maintain.php b/htdocs/doc/sql/stored-proc/maintain.php index 96cf8d3f..efb47931 100644 --- a/htdocs/doc/sql/stored-proc/maintain.php +++ b/htdocs/doc/sql/stored-proc/maintain.php @@ -458,6 +458,11 @@ OLD.`latitude`!=NEW.`latitude` THEN SET NEW.`need_npa_recalc`=1; END IF; + + IF OLD.`status`=5 AND NEW.`status`<>5 THEN + SET NEW.`date_created`=NOW(); + SET NEW.`is_publishdate`=1; + END IF; END;"); sql_dropTrigger('cachesAfterUpdate'); diff --git a/htdocs/doc/sql/tables/caches.sql b/htdocs/doc/sql/tables/caches.sql index 8c924ba4..5b778b63 100644 --- a/htdocs/doc/sql/tables/caches.sql +++ b/htdocs/doc/sql/tables/caches.sql @@ -5,6 +5,7 @@ CREATE TABLE `caches` ( `uuid` varchar(36) NOT NULL, `node` tinyint(3) unsigned NOT NULL default '0', `date_created` datetime NOT NULL COMMENT 'via Trigger (caches)', + `is_publishdate` tinyint(1) NOT NULL default '0' COMMENT '1 = date_created is publication date', `last_modified` datetime NOT NULL COMMENT 'via Trigger (caches)', `user_id` int(10) unsigned NOT NULL, `name` varchar(255) NOT NULL, diff --git a/htdocs/doc/xml/xml11.htm b/htdocs/doc/xml/xml11.htm index 6b7cebeb..950f8095 100644 --- a/htdocs/doc/xml/xml11.htm +++ b/htdocs/doc/xml/xml11.htm @@ -105,12 +105,14 @@   <rating waylength="1.5" needtime= "0.5"></rating>
  <waypoints gccom= "" nccom="" oc="OCR2D2"></waypoints>
  <datehidden>2005-08-01</datehidden>
-   <datecreated>2005-09-08 15:45:02</datecreated>
+   <datecreated ispublishdate="0">2005-09-08 15:45:02</datecreated>
  <lastmodified>2005-12-20 20:58:41</lastmodified>
  <attributes>
    <attribute id="6"><![CDATA[ Nur bei Opencaching]]></attribute>
  </attributes>
</cache>

+

datecreated will show date of listing creation for caches created with OC software versions 1 to 2 + and date of publication – indicated by ispublishdate="1" – from OC version 3.

cachedesc (Cachebeschreibungen)

<cachedesc>
diff --git a/htdocs/templates2/ocstyle/start.tpl b/htdocs/templates2/ocstyle/start.tpl index 708355be..05544fcb 100644 --- a/htdocs/templates2/ocstyle/start.tpl +++ b/htdocs/templates2/ocstyle/start.tpl @@ -137,7 +137,7 @@ {foreach name=newcaches from=$newcaches item=cacheitem}

  • {include file="res_cacheicon_22.tpl" cachetype=$cacheitem.type} - {$cacheitem.date_hidden|date_format:$opt.format.date}  + {$cacheitem.date_created|date_format:$opt.format.date}  {$cacheitem.name|escape} {t}by{/t} {$cacheitem.username|escape}
    diff --git a/htdocs/templates2/ocstyle/viewcache.tpl b/htdocs/templates2/ocstyle/viewcache.tpl index b9103087..d0a14c27 100644 --- a/htdocs/templates2/ocstyle/viewcache.tpl +++ b/htdocs/templates2/ocstyle/viewcache.tpl @@ -170,7 +170,7 @@ {/if} {if $cache.searchtime>0 || $cache.waylength>0}
    {/if}  {if $cache.type==6}{t}Event date{/t}{else}{t}Hidden at{/t}{/if}: {$cache.datehidden|date_format:$opt.format.datelong}
    -  {t}Listed since{/t}: {$cache.datecreated|date_format:$opt.format.datelong}
    +  {if $cache.is_publishdate==0}{t}Listed since{/t}{else}{t}Published on{/t}{/if}: {$cache.datecreated|date_format:$opt.format.datelong}
     {t}Last update{/t}: {$cache.lastmodified|date_format:$opt.format.datelong}
     {t}Waypoint{/t}: {$cache.wpoc}
    {if $cache.wpgc!='' || $cache.wpnc!=''} diff --git a/htdocs/viewcache.php b/htdocs/viewcache.php index e08411c8..ca8bdf9c 100644 --- a/htdocs/viewcache.php +++ b/htdocs/viewcache.php @@ -99,6 +99,7 @@ function getChildWaypoints($cacheid) `caches`.`wp_gc` AS `wpgc`, `caches`.`wp_nc` AS `wpnc`, `caches`.`date_created` AS `datecreated`, + `caches`.`is_publishdate` AS `is_publishdate`, `caches`.`difficulty` AS `difficulty`, `caches`.`terrain` AS `terrain`, `cache_desc`.`language` AS `desclanguage`, diff --git a/htdocs/xml/ocxml11.php b/htdocs/xml/ocxml11.php index 3941e7ae..a74a112b 100644 --- a/htdocs/xml/ocxml11.php +++ b/htdocs/xml/ocxml11.php @@ -428,7 +428,7 @@ function outputXmlFile($sessionid, $filenr, $bXmlDecl, $bOcXmlTag, $bDocType, $z `caches`.`country` `country`, `caches`.`size` `size`, `caches`.`desc_languages` `desclanguages`, `caches`.`difficulty` `difficulty`, `caches`.`terrain` `terrain`, `caches`.`way_length` `way_length`, `caches`.`search_time` `search_time`, `caches`.`wp_gc` `wp_gc`, `caches`.`wp_nc` `wp_nc`, - `caches`.`wp_oc` `wp_oc`, `caches`.`date_hidden` `date_hidden`, `caches`.`date_created` `date_created`, + `caches`.`wp_oc` `wp_oc`, `caches`.`date_hidden` `date_hidden`, `caches`.`date_created` `date_created`, `caches`.`is_publishdate` `is_publishdate`, `caches`.`last_modified` `last_modified`, `caches`.`status` `status`, `caches`.`node` `node`, `cache_status`.`allow_user_view` FROM `tmpxml_caches` @@ -456,7 +456,7 @@ function outputXmlFile($sessionid, $filenr, $bXmlDecl, $bOcXmlTag, $bDocType, $z fwrite($f, $t2 . '' . "\n"); fwrite($f, $t2 . '' . "\n"); fwrite($f, $t2 . '' . date($sDateformat, strtotime($r['date_hidden'])) . '' . "\n"); - fwrite($f, $t2 . '' . date($sDateformat, strtotime($r['date_created'])) . '' . "\n"); + fwrite($f, $t2 . '' . date($sDateformat, strtotime($r['date_created'])) . '' . "\n"); fwrite($f, $t2 . '' . date($sDateformat, strtotime($r['last_modified'])) . '' . "\n"); $rsAttributes = sql("SELECT `cache_attrib`.`id`, `cache_attrib`.`name` FROM `caches_attributes` INNER JOIN `cache_attrib` ON `caches_attributes`.`attrib_id`=`cache_attrib`.`id` WHERE `caches_attributes`.`cache_id`='&1'", $r['id']);