Skip to content
Permalink
Browse files

added maintained gc_wp field

  • Loading branch information...
following5 committed Jun 15, 2013
1 parent bd75d91 commit ac62e0dac478e1f0281200eb8e810ffcd8c1066b
@@ -235,4 +235,15 @@ function dbv_111() // fix event ID of old publishing notifications
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');
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');
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');
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');
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');
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');
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');
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');
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');
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 @@ function flashbutton(bname)
<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>&nbsp;</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 @@ static function cacheIdFromWP($wp)
$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'] != '')
Oops, something went wrong.

0 comments on commit ac62e0d

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