added maintained gc_wp field
This commit is contained in:
parent
bd75d91c98
commit
ac62e0dac4
@ -235,4 +235,15 @@
|
||||
WHERE `eventid`=5 AND `module`='notify_newcache'");
|
||||
}
|
||||
|
||||
function dbv_112() // added maintained GC waypoints
|
||||
{
|
||||
if (!sql_field_exists('caches','wp_gc_maintained'))
|
||||
{
|
||||
sql("ALTER TABLE `caches` ADD COLUMN `wp_gc_maintained` varchar(7) NOT NULL AFTER `wp_gc`");
|
||||
sql("UPDATE `caches` SET `wp_gc_maintained`=UCASE(TRIM(`wp_gc`)) WHERE SUBSTR(TRIM(`wp_gc`),1,2)='GC'");
|
||||
}
|
||||
if (!sql_index_exists('caches', 'wp_gc_maintained'))
|
||||
sql("ALTER TABLE `caches` ADD INDEX `wp_gc_maintained` (`wp_gc_maintained`)");
|
||||
}
|
||||
|
||||
?>
|
@ -444,6 +444,7 @@
|
||||
|
||||
$opt['cron']['geokrety']['run'] = true;
|
||||
$opt['cron']['autoarchive']['run'] = false;
|
||||
$opt['cron']['gcwp']['sources'] = array();
|
||||
|
||||
/* E-Mail settings
|
||||
*
|
||||
|
@ -1981,7 +1981,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1502', 'Enter t
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1503', 'Enter the city, please!', '2010-09-11 02:13:32');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1504', 'Enter the owner, please!', '2010-09-11 02:13:32');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1505', 'Enter the username, please!', '2010-09-11 02:13:32');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1506', 'Multiple listings (waypoint is also set on gc.com or nc.com)', '2010-09-11 02:13:32');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1506', 'GC listings (also listed at gc.com)', '2010-09-11 02:13:32');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1507', 'The selected output format is unknown!', '2010-09-11 02:13:33');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1508', 'The search operation could not be executed, please reenter the search data.', '2010-09-11 02:13:33');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1509', 'Find', '2010-09-11 02:13:33');
|
||||
@ -2140,7 +2140,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1668', 'Contain
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1669', 'Hide', '2010-09-19 00:23:51');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1670', 'My owns', '2010-09-19 00:23:51');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1671', 'Not active', '2010-09-19 00:23:51');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1672', 'Double listings', '2010-09-19 00:23:51');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1672', 'GC listings', '2010-09-19 00:23:51');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1673', 'Rating', '2010-09-19 00:23:51');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1674', 'Min. recommendations', '2010-09-19 00:23:51');
|
||||
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1675', 'Drag Zoom', '2010-09-19 00:23:51');
|
||||
@ -5932,7 +5932,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 ('1503', 'DE', 'Bitte im Feld für Ortsname etwas eingeben!', '2010-09-11 02:32:01');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1504', 'DE', 'Bitte im Feld für Besitzer etwas eingeben!', '2010-09-11 02:31:54');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1505', 'DE', 'Bitte im Feld für Finder etwas eingeben!', '2010-09-11 02:31:49');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'DE', 'Mehrfach-Listings (Wegpunkt bei gc.com oder nc.com gesetzt)', '2010-09-11 02:31:44');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'DE', 'GC-Listings (auch bei gc.com veröffentlicht)', '2010-09-11 02:31:44');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1507', 'DE', 'Das ausgewählte Ausgabeformat existiert nicht!', '2010-09-11 02:31:38');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1508', 'DE', 'Die Suchanfrage konnte nicht ausgeführt werden; bitte gib die Suchdaten erneut ein.', '2010-09-11 02:31:33');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1509', 'DE', 'Gefunden', '2010-09-11 02:31:18');
|
||||
@ -6091,7 +6091,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 ('1669', 'DE', 'Ausblenden', '2010-09-27 00:32:12');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1670', 'DE', 'meine eigenen', '2010-09-27 00:30:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1671', 'DE', 'inaktiv', '2010-09-27 00:30:39');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'DE', 'mehrfach gelistet', '2010-09-27 00:30:26');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'DE', 'auf GC gelistet', '2010-09-27 00:30:26');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1673', 'DE', 'Bewertung', '2010-09-27 00:30:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1674', 'DE', 'min. Empfehlungen', '2010-09-27 00:29:32');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1675', 'DE', 'Drag Zoom', '2010-09-27 00:29:22');
|
||||
@ -7534,7 +7534,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 ('1503', 'EN', 'Enter the city, please!', '2010-09-11 02:32:01');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1504', 'EN', 'Enter the owner, please!', '2010-09-11 02:31:54');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1505', 'EN', 'Enter the username, please!', '2010-09-11 02:31:49');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'EN', 'multiple listings (waypoint is also set on gc.com or nc.com)', '2010-09-11 02:31:44');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'EN', 'GC listings (also listed at gc.com)', '2010-09-11 02:31:44');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1507', 'EN', 'The selected output format is unknown!', '2010-09-11 02:31:38');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1508', 'EN', 'The search operation could not be executed, please reenter the search data.', '2010-09-11 02:31:33');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1509', 'EN', 'Find', '2010-09-11 02:31:18');
|
||||
@ -7693,7 +7693,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 ('1669', 'EN', 'Hide', '2010-09-27 00:22:55');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1670', 'EN', 'My owns', '2010-09-27 00:22:49');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1671', 'EN', 'Not active', '2010-09-27 00:22:44');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'EN', 'Double listings', '2010-09-27 00:22:37');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'EN', 'GC listings', '2010-09-27 00:22:37');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1673', 'EN', 'Rating', '2010-09-27 00:22:31');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1674', 'EN', 'Min. recommendations', '2010-09-27 00:22:25');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1675', 'EN', 'Drag Zoom', '2010-09-27 00:22:19');
|
||||
@ -9102,7 +9102,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 ('1503', 'ES', '¡Insertar una ciudad, por favor!', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1504', 'ES', '¡Insertar un propietario, por favor!', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1505', 'ES', '¡Insertar un usuario, por favor!', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'ES', 'Registro multiple(waypoint presente en gc.com o nc.com)', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'ES', 'Registro multiple (waypoint presente en gc.com)', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1507', 'ES', '¡El formato de salida seleccionado es desconocido!', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1508', 'ES', 'La operación de búsqueda no se pudo ejecutar, por favor, vuelva a introducir los datos de búsqueda.', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1509', 'ES', 'Encontrar', '2010-12-09 00:18:00');
|
||||
@ -9259,7 +9259,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 ('1669', 'ES', 'Escondidos', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1670', 'ES', 'Mio', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1671', 'ES', 'No activo', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'ES', 'listado doble', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'ES', 'listado GC', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1673', 'ES', 'Valoración', '2010-12-09 00:18:00');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1674', 'ES', 'Recomendaciones min.', '2010-12-09 00:18:01');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1675', 'ES', 'Mover el zoom', '2010-12-09 00:18:01');
|
||||
@ -10656,7 +10656,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 ('1503', 'IT', 'Inserisci la città, per favore!', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1504', 'IT', 'Inserisci il proprietario, per favore!', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1505', 'IT', 'Inserisci l\'utente, per favore!', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'IT', 'Registrate su più siti (waypoint presente in gc.com o nc.com)', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1506', 'IT', 'Registrate su più siti (waypoint presente in gc.com)', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1507', 'IT', 'Il formato di uscita selezionato è sconosciuto!', '2010-09-11 02:31:38');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1508', 'IT', 'La ricerca non può essere eseguita, per favore reinserisci i dati di ricerca.', '2010-09-11 02:31:33');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1509', 'IT', 'Trovata', '2010-09-11 02:31:18');
|
||||
@ -10815,7 +10815,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 ('1669', 'IT', 'Nascosta', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1670', 'IT', 'Mie', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1671', 'IT', 'Non attiva', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'IT', 'Doppio listing', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'IT', 'GC listing', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1673', 'IT', 'Valutazione', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1674', 'IT', 'Raccomandazioni min.', '2010-10-27 18:49:19');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1675', 'IT', 'Sposta zoom', '2010-10-27 18:49:19');
|
||||
@ -12048,7 +12048,6 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1669', 'NL', 'Verbergen', '2011-02-04 19:50:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1670', 'NL', 'Mijn eigen', '2011-02-04 19:50:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1671', 'NL', 'Niet actief', '2011-02-04 19:50:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1672', 'NL', 'Meerdere lijsten', '2011-02-04 19:50:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1673', 'NL', 'Waardering', '2011-02-04 19:50:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1674', 'NL', 'Min. aanbevelingen', '2011-02-04 19:50:08');
|
||||
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1675', 'NL', 'Drag Zoom', '2011-02-04 19:50:08');
|
||||
|
@ -561,6 +561,9 @@
|
||||
IF NEW.`status` <> 5 THEN
|
||||
SET NEW.`is_publishdate`=1;
|
||||
END IF;
|
||||
IF SUBSTR(TRIM(NEW.`wp_gc`),1,2)='GC' THEN
|
||||
SET NEW.`wp_gc_maintained`=UCASE(TRIM(NEW.`wp_gc`));
|
||||
END IF;
|
||||
SET NEW.`need_npa_recalc`=1;
|
||||
|
||||
IF ISNULL(NEW.`uuid`) OR NEW.`uuid`='' THEN
|
||||
@ -674,6 +677,11 @@
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
IF NEW.`wp_gc`<>OLD.`wp_gc` AND
|
||||
(SUBSTR(TRIM(NEW.`wp_gc`),1,2)='GC' OR TRIM(NEW.`wp_gc`)='') THEN
|
||||
SET NEW.`wp_gc_maintained`=UCASE(TRIM(NEW.`wp_gc`));
|
||||
END IF;
|
||||
|
||||
IF OLD.`longitude`!=NEW.`longitude` OR
|
||||
OLD.`latitude`!=NEW.`latitude` THEN
|
||||
SET NEW.`need_npa_recalc`=1;
|
||||
|
@ -24,6 +24,7 @@ CREATE TABLE `caches` (
|
||||
`search_time` float unsigned NOT NULL default '0',
|
||||
`way_length` float unsigned NOT NULL default '0',
|
||||
`wp_gc` varchar(7) NOT NULL,
|
||||
`wp_gc_maintained` varchar(7) NOT NULL,
|
||||
`wp_nc` varchar(6) NOT NULL,
|
||||
`wp_oc` varchar(7) NOT NULL,
|
||||
`desc_languages` varchar(60) NOT NULL COMMENT 'via Trigger (cache_desc)',
|
||||
@ -46,5 +47,6 @@ CREATE TABLE `caches` (
|
||||
KEY `type` (`type`),
|
||||
KEY `size` (`size`),
|
||||
KEY `difficulty` (`difficulty`),
|
||||
KEY `terrain` (`terrain`)
|
||||
KEY `terrain` (`terrain`),
|
||||
KEY `wp_gc_maintained` (`wp_gc_maintained`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
|
||||
|
@ -205,7 +205,7 @@
|
||||
<div class="buffer" style="height: 30px;"></div>
|
||||
|
||||
<!-- Suchbox -->
|
||||
<div id="suchbox"><form action="searchplugin.php" method="post" style="display:inline;"><b>{t}Waypoint search:{/t}</b><input type="hidden" name="source" value="waypoint-suche" /> <input type="text" name="userinput" size="10" /> <input type="submit" value="Go" /></form></div>
|
||||
<div id="suchbox"><form action="searchplugin.php" method="post" style="display:inline;"><b>{t}Waypoint search:{/t}</b><input type="hidden" name="sourceid" value="waypoint-search" /> <input type="text" name="userinput" size="10" /> <input type="submit" value="Go" /></form></div>
|
||||
|
||||
<!-- NAVIGATION -->
|
||||
<!-- Navigation Level 3 -->
|
||||
|
@ -310,7 +310,7 @@ function switchAttributeCat2()
|
||||
<td> </td>
|
||||
<td colspan="2">
|
||||
<input type="checkbox" name="f_inactive" value="1" id="l_inactive" class="checkbox" onclick="sync_options(this)" {f_inactive_checked} > <label for="l_inactive">{t}Inactive{/t}</label>
|
||||
<input type="checkbox" name="f_otherPlatforms" value="1" id="l_otherPlatforms" class="checkbox" onclick="sync_options(this)" {f_otherPlatforms_checked} > <label for="l_otherPlatforms">{t}Multiple listings (waypoint is also set on gc.com or nc.com){/t}</label>
|
||||
<input type="checkbox" name="f_otherPlatforms" value="1" id="l_otherPlatforms" class="checkbox" onclick="sync_options(this)" {f_otherPlatforms_checked} > <label for="l_otherPlatforms">{t}GC listings (also listed at gc.com){/t}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -21,7 +21,7 @@ class cache
|
||||
$cacheid = 0;
|
||||
if (mb_strtoupper(mb_substr($wp, 0, 2)) == 'GC')
|
||||
{
|
||||
$rs = sql("SELECT `cache_id` FROM `caches` WHERE `wp_gc`='&1'", $wp);
|
||||
$rs = sql("SELECT `cache_id` FROM `caches` WHERE `wp_gc_maintained`='&1'", $wp);
|
||||
if (sql_num_rows($rs) != 1)
|
||||
{
|
||||
sql_free_result($rs);
|
||||
|
@ -291,7 +291,7 @@ function output_cachexml($sWaypoint)
|
||||
LEFT JOIN `sys_trans_text` AS `trans_size_text` ON `trans_size`.`id`=`trans_size_text`.`trans_id` AND `trans_size_text`.`lang`='&2'
|
||||
LEFT JOIN `caches_attributes` ON `caches_attributes`.`cache_id`=`caches`.`cache_id` AND `caches_attributes`.`attrib_id`=6
|
||||
LEFT JOIN `pictures` ON `pictures`.`object_id`=`caches`.`cache_id` AND `pictures`.`object_type`='&4' AND `pictures`.`mappreview`=1
|
||||
WHERE (`caches`.`wp_oc`='&3' OR (`caches`.`wp_oc`!='&3' AND `caches`.`wp_gc`='&3') OR (`caches`.`wp_oc`!='&3' AND `caches`.`wp_nc`='&3')) AND
|
||||
WHERE (`caches`.`wp_oc`='&3' OR (`caches`.`wp_oc`!='&3' AND `caches`.`wp_gc_maintained`='&3') OR (`caches`.`wp_oc`!='&3' AND `caches`.`wp_nc`='&3')) AND
|
||||
(`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&1')
|
||||
LIMIT 1", // for the case of illegal duplicates in pictures.mappreview etc.
|
||||
$login->userid, $opt['template']['locale'], $sWaypoint, OBJECT_CACHE);
|
||||
|
@ -922,7 +922,9 @@
|
||||
if(!isset($options['f_otherPlatforms'])) $options['f_otherPlatforms']='0';
|
||||
if($options['f_otherPlatforms'] != 0)
|
||||
{
|
||||
$sql_where[] = '`caches`.`wp_nc`=\'\' AND `caches`.`wp_gc`=\'\'';
|
||||
// $sql_where[] = '`caches`.`wp_nc`=\'\' AND `caches`.`wp_gc`=\'\'';
|
||||
// ignore NC listings, which are mostly unmaintained or dead
|
||||
$sql_where[] = "`caches`.`wp_gc_maintained`=''";
|
||||
}
|
||||
if(!isset($options['country'])) $options['country']='';
|
||||
if($options['country'] != '')
|
||||
|
@ -4,7 +4,9 @@
|
||||
*
|
||||
* Unicode Reminder メモ
|
||||
*
|
||||
* Server part of Mozilla search plugin for OC
|
||||
* Search cache listing by waypoint
|
||||
* Server part of Mozilla search plugin for OC;
|
||||
* also used for waypoint search field.
|
||||
***************************************************************************/
|
||||
|
||||
require('./lib2/web.inc.php');
|
||||
@ -91,9 +93,15 @@
|
||||
|
||||
if ((($target == 'oc') || ($target == 'nc') || ($target == 'gc')) && mb_ereg_match('(('.$opt['logic']['ocprefixes'].'|gc)([a-z0-9]){4,5}|n([a-f0-9]){5,5})$', mb_strtolower($searchfor)))
|
||||
{
|
||||
if ($target == 'gc')
|
||||
$wpfield = "IF(`wp_gc_maintained`='',`wp_gc`,`wp_gc_maintained`)";
|
||||
else if ($target == 'nc')
|
||||
$wpfield = "`wp_nc`";
|
||||
else
|
||||
$wpfield = "`wp_oc`";
|
||||
// get cache_id from DB
|
||||
// GC/NC waypoints can be duplicates -> return first match with least status number
|
||||
$rs = sql("SELECT `cache_id` FROM `caches` INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` WHERE (`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&1') AND `wp_" . sql_escape($target) . "`='&2' ORDER BY `caches`.`status`,`caches`.`cache_id` LIMIT 0,1", $login->userid, $searchfor);
|
||||
$rs = sql("SELECT `cache_id` FROM `caches` INNER JOIN `cache_status` ON `caches`.`status`=`cache_status`.`id` WHERE (`cache_status`.`allow_user_view`=1 OR `caches`.`user_id`='&1') AND " . $wpfield . "='&2' ORDER BY `caches`.`status`,`caches`.`cache_id` LIMIT 0,1", $login->userid, $searchfor);
|
||||
if (sql_num_rows($rs))
|
||||
{
|
||||
$record = sql_fetch_array($rs);
|
||||
|
@ -2374,7 +2374,9 @@ function toggle_attribselection(bSaveCookies)
|
||||
<tr>
|
||||
<td style="white-space:nowrap">
|
||||
<input type="checkbox" id="f_otherPlatforms" name="f_otherPlatforms" value="1" onchange="filter_changed()" class="checkbox" />
|
||||
<label for="f_otherPlatforms">{t}Double listings{/t}</label>
|
||||
<label for="f_otherPlatforms">{t}GC listings{/t}</label>
|
||||
{* the id is still "f_otherPlatforms" though it only applies to GC
|
||||
for compatiblity with old stored or external queries *}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -196,7 +196,7 @@
|
||||
{* <!-- Suchbox --> *}
|
||||
{if !$opt.page.nowpsearch}
|
||||
<div id="breadcrumb">{include file="sys_breadcrumb.tpl" items="$breadcrumb"}</div>
|
||||
<div id="suchbox"><form action="searchplugin.php" method="post" style="display:inline;"><b>{t}Waypoint-Search{/t}:</b><input type="hidden" name="source" value="waypoint-suche" /> <input type="text" name="userinput" size="10" /> <input type="submit" value="{t}Go{/t}" /></form></div>
|
||||
<div id="suchbox"><form action="searchplugin.php" method="post" style="display:inline;"><b>{t}Waypoint-Search{/t}:</b><input type="hidden" name="sourceid" value="waypoint-search" /> <input type="text" name="userinput" size="10" /> <input type="submit" value="{t}Go{/t}" /></form></div>
|
||||
{else}
|
||||
<div id="breadcrumb_fullsize">{include file="sys_breadcrumb.tpl" items="$breadcrumb"}</div>
|
||||
{/if}
|
||||
|
40
htdocs/util2/cron/modules/gcwp_update.class.php
Normal file
40
htdocs/util2/cron/modules/gcwp_update.class.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/***************************************************************************
|
||||
* For license information see doc/license.txt
|
||||
*
|
||||
* Unicode Reminder メモ
|
||||
*
|
||||
* Update GC waypoint data from external sources
|
||||
***************************************************************************/
|
||||
|
||||
checkJob(new gcwp_update());
|
||||
|
||||
|
||||
class gcwp_update
|
||||
{
|
||||
var $name = 'gcwp_update';
|
||||
var $interval = 3600; // every hour
|
||||
|
||||
|
||||
function run()
|
||||
{
|
||||
global $opt;
|
||||
|
||||
foreach ($opt['cron']['gcwp']['sources'] as $source)
|
||||
{
|
||||
$wpdata = @file($source);
|
||||
if ($wpdata === FALSE)
|
||||
echo "gcwp_update: error reading " . $source . "\n";
|
||||
else
|
||||
foreach ($wpdata as $line)
|
||||
{
|
||||
$waypoints = explode(",",trim($line));
|
||||
if (count($waypoints) == 2)
|
||||
sql("UPDATE `caches` SET `wp_gc_maintained`='&2' WHERE `wp_oc`='&1'",
|
||||
$waypoints[0], $waypoints[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -449,7 +449,8 @@ function outputXmlFile($sessionid, $filenr, $bXmlDecl, $bOcXmlTag, $bDocType, $z
|
||||
`caches`.`longitude` `longitude`, `caches`.`latitude` `latitude`, `caches`.`type` `type`,
|
||||
`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`.`search_time` `search_time`, `caches`.`wp_gc` `wp_gc`, `caches`.`wp_nc` `wp_nc`,
|
||||
/* we deliberatly do not use gc_wp_maintained here */
|
||||
`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`
|
||||
|
Loading…
x
Reference in New Issue
Block a user