Merge branch '4009-publishdate'
This commit is contained in:
commit
eda58c51e3
@ -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');
|
||||
|
@ -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');
|
||||
|
@ -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,
|
||||
|
@ -105,12 +105,14 @@
|
||||
<rating waylength="1.5" needtime= "0.5"></rating><br>
|
||||
<waypoints gccom= "" nccom="" oc="OCR2D2"></waypoints><br>
|
||||
<datehidden>2005-08-01</datehidden><br>
|
||||
<datecreated>2005-09-08 15:45:02</datecreated><br>
|
||||
<datecreated ispublishdate="0">2005-09-08 15:45:02</datecreated><br>
|
||||
<lastmodified>2005-12-20 20:58:41</lastmodified><br>
|
||||
<attributes><br>
|
||||
<attribute id="6"><![CDATA[ Nur bei Opencaching]]></attribute><br>
|
||||
</attributes><br>
|
||||
</cache></P>
|
||||
<p>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.</p>
|
||||
<h3>cachedesc (Cachebeschreibungen)</h3>
|
||||
<p>
|
||||
<cachedesc><br>
|
||||
|
@ -137,7 +137,7 @@
|
||||
{foreach name=newcaches from=$newcaches item=cacheitem}
|
||||
<li class="newcache_list_multi" style="margin-bottom: 8px;">
|
||||
{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}
|
||||
<b><a class="links" href="viewcache.php?cacheid={$cacheitem.cache_id}">{$cacheitem.name|escape}</a></b>
|
||||
{t}by{/t}
|
||||
<b><a class="links" href="viewprofile.php?userid={$cacheitem.user_id}">{$cacheitem.username|escape}</a></b><br />
|
||||
|
@ -170,7 +170,7 @@
|
||||
{/if}
|
||||
{if $cache.searchtime>0 || $cache.waylength>0}<br />{/if}
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" /> {if $cache.type==6}{t}Event date{/t}{else}{t}Hidden at{/t}{/if}: {$cache.datehidden|date_format:$opt.format.datelong}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" /> {t}Listed since{/t}: {$cache.datecreated|date_format:$opt.format.datelong}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" /> {if $cache.is_publishdate==0}{t}Listed since{/t}{else}{t}Published on{/t}{/if}: {$cache.datecreated|date_format:$opt.format.datelong}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/date.png" class="icon16" alt="" title="" align="middle" /> {t}Last update{/t}: {$cache.lastmodified|date_format:$opt.format.datelong}<br />
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/arrow_in.png" class="icon16" alt="" title="" align="middle" /> {t}Waypoint{/t}: <b>{$cache.wpoc}</b><br />
|
||||
{if $cache.wpgc!='' || $cache.wpnc!=''}<img src="resource2/{$opt.template.style}/images/viewcache/link.png" class="icon16" alt="" title="" align="middle" />
|
||||
|
@ -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`,
|
||||
|
@ -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 . '<rating waylength="' . $r['way_length'] . '" needtime="' . $r['search_time'] . '" />' . "\n");
|
||||
fwrite($f, $t2 . '<waypoints gccom="' . xmlentities($r['wp_gc']) . '" nccom="' . xmlentities($r['wp_nc']) . '" oc="' . xmlentities($r['wp_oc']) . '" />' . "\n");
|
||||
fwrite($f, $t2 . '<datehidden>' . date($sDateformat, strtotime($r['date_hidden'])) . '</datehidden>' . "\n");
|
||||
fwrite($f, $t2 . '<datecreated>' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
|
||||
fwrite($f, $t2 . '<datecreated ispublishdate="' . $r['is_publishdate'] . '">' . date($sDateformat, strtotime($r['date_created'])) . '</datecreated>' . "\n");
|
||||
fwrite($f, $t2 . '<lastmodified>' . date($sDateformat, strtotime($r['last_modified'])) . '</lastmodified>' . "\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']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user