Merge branch 'stable'
This commit is contained in:
@@ -248,13 +248,6 @@
|
||||
*/
|
||||
$opt['logic']['node']['id'] = 4;
|
||||
|
||||
/* data license for new registered users:
|
||||
0 = not specified
|
||||
1 = old Opencaching.de license
|
||||
2 = CC BY-NC-ND 3.0
|
||||
*/
|
||||
$opt['logic']['license'] = 2;
|
||||
|
||||
/* location of uploaded images
|
||||
*/
|
||||
$opt['logic']['pictures']['dir'] = $opt['rootpath'] . 'images/uploads';
|
||||
@@ -368,9 +361,11 @@
|
||||
|
||||
/* license-related functions
|
||||
*/
|
||||
$opt['logic']['license'] = array(); // PHP warning without this - why only here??
|
||||
$opt['logic']['license']['newusers'] = NEW_DATA_LICENSE_ACTIVELY_ACCEPTED;
|
||||
$opt['logic']['license']['admin'] = true;
|
||||
$opt['logic']['license']['disclaimer'] = false; // also in lib/settings.inc.php
|
||||
$opt['logic']['license']['disclaimer'] = false;
|
||||
$opt['logic']['license']['terms'] = 'http://www.opencaching.de/articles.php?page=impressum#datalicense';
|
||||
// 'disclaimer' and 'terms' also in lib/settings.inc.php
|
||||
|
||||
/* Database charset
|
||||
* frontend and php charsets are UTF-8
|
||||
|
||||
43
htdocs/html/dberror.php
Normal file
43
htdocs/html/dberror.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!-- Unicode Reminder メモ -->
|
||||
<head>
|
||||
<title>Opencaching.de - Datenbankproblem</title>
|
||||
<meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
|
||||
<meta http-equiv="Content-Language" content="de" />
|
||||
<meta http-equiv="gallerimg" content="no" />
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="resource2/ocstyle/css/style_screen.css" />
|
||||
</head>
|
||||
<body style="margin:20px 40px 0 40px; background:#fff">
|
||||
<table border="0" cellspacing="0" cellpadding="2" width="100%">
|
||||
<tr>
|
||||
<td width="80px">
|
||||
<a href="/index.php"><img src="images/newlogo.png" alt="oc-Logo" style="border:0px;"/></a>
|
||||
</td>
|
||||
<td width="100%">
|
||||
|
||||
</td>
|
||||
<td valign="bottom">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="content">
|
||||
<h1>Fehler beim Datenbankzugriff</h1>
|
||||
<?php
|
||||
require('lib/settings.inc.php');
|
||||
|
||||
echo '<p>Entschuldigung, bei der Darstellung der Seite ist ein interner Fehler aufgetreten.
|
||||
Falls dieses Problem für längere Zeit bestehen sollte, informiere uns bitte per
|
||||
<a href="mailto:' . $emailaddr . '">Email</a>.</p>
|
||||
<p>' . $dberrmsg . '</p>
|
||||
<p><a href="index.php">Zurück zur Startseite</a></p>
|
||||
|
||||
<p><br /><br /><em>An error occured while displaying the requested page.
|
||||
If this problem persists for a longer time, please inform us via
|
||||
<a href="mailto:' . $emailaddr . '">email</a>.</em></p>';
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
htdocs/images/newlogo-license.txt
Normal file
1
htdocs/images/newlogo-license.txt
Normal file
@@ -0,0 +1 @@
|
||||
see /doc/license.txt for license terms of the new OC.de logo
|
||||
BIN
htdocs/images/newlogo.png
Normal file
BIN
htdocs/images/newlogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
@@ -55,6 +55,7 @@
|
||||
date_default_timezone_set($timezone);
|
||||
|
||||
$dblink_slave = false;
|
||||
$db_error = 0;
|
||||
|
||||
// sql debugger?
|
||||
if (!isset($sql_allow_debug)) $sql_allow_debug = 0;
|
||||
@@ -437,8 +438,12 @@
|
||||
global $absolute_server_URI;
|
||||
global $interface_output;
|
||||
global $dberrormsg;
|
||||
global $db_error;
|
||||
|
||||
$db_error += 1;
|
||||
$msql_error = mysql_errno() . ": " . mysql_error();
|
||||
if ($db_error > 1)
|
||||
$msql_error .= "\n(** error recursion **)";
|
||||
|
||||
if ($sql_errormail != '')
|
||||
{
|
||||
@@ -452,7 +457,19 @@
|
||||
if ($interface_output == 'html')
|
||||
{
|
||||
// display errorpage
|
||||
tpl_errorMsg('sql_error', $dberrormsg . ($debug_page ? "<br />" . $msql_error : ""));
|
||||
$dberrmsg = $dberrormsg . ($debug_page ? "<br />" . $msql_error : "");
|
||||
if ($db_error <= 1)
|
||||
{
|
||||
tpl_errorMsg('sql_error', $dberrmsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
// datbase error recursion, because another error occured while trying to
|
||||
// build the error template (e.g. because connection was lost, or an error mail
|
||||
// could not load translations from database)
|
||||
|
||||
require("html/dberror.php");
|
||||
}
|
||||
exit;
|
||||
}
|
||||
else if ($interface_output == 'plain')
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
$absolute_server_URI = $dev_baseurl . '/';
|
||||
|
||||
// EMail address of the sender
|
||||
if (!isset($emailaddr)) $emailaddr = 'noreply@opencaching.de';
|
||||
if (!isset($emailaddr)) $emailaddr = 'contact@opencaching.de';
|
||||
|
||||
// location of cache images
|
||||
if (!isset($picdir)) $picdir = $rootpath . 'images/uploads';
|
||||
@@ -142,6 +142,7 @@
|
||||
|
||||
// data license
|
||||
$opt['logic']['license']['disclaimer'] = true; // also in lib2/settings-dist.inc.php
|
||||
$opt['logic']['license']['terms'] = 'http://www.opencaching.de/articles.php?page=impressum#datalicense';
|
||||
|
||||
// see config2/settings-dist.inc.php
|
||||
$opt['template']['default']['locale'] = 'DE'; // may be overwritten by $opt['domain'][...]['locale']
|
||||
|
||||
@@ -37,8 +37,9 @@ function __autoload($class_name)
|
||||
fix_magic_quotes_gpc();
|
||||
|
||||
// set options
|
||||
require($opt['rootpath'] . 'config2/settings-dist.inc.php');
|
||||
require($opt['rootpath'] . 'config2/settings.inc.php');
|
||||
require_once($opt['rootpath'] . 'lib2/logic/const.inc.php');
|
||||
require_once($opt['rootpath'] . 'config2/settings-dist.inc.php');
|
||||
require_once($opt['rootpath'] . 'config2/settings.inc.php');
|
||||
|
||||
set_domain();
|
||||
|
||||
@@ -81,7 +82,6 @@ function __autoload($class_name)
|
||||
$tpl = new OcSmarty();
|
||||
|
||||
// include all we need
|
||||
require_once($opt['rootpath'] . 'lib2/logic/const.inc.php');
|
||||
require_once($opt['rootpath'] . 'lib2/logic/geomath.class.php');
|
||||
require_once($opt['rootpath'] . 'lib2/error.inc.php');
|
||||
require_once($opt['rootpath'] . 'lib2/util.inc.php');
|
||||
|
||||
@@ -881,16 +881,24 @@
|
||||
global $tpl, $opt, $db;
|
||||
global $bSmartyNoTranslate;
|
||||
|
||||
if ($db['error'] == true)
|
||||
die("sql_error() recursion, aborting!\nCheck if database connect does work.\nMost often, an error mail tried to load translations from database.\nMySQL Error no " . mysql_errno() . "\n");
|
||||
|
||||
$db['error'] = true;
|
||||
|
||||
$errno = mysql_errno();
|
||||
$error = mysql_error();
|
||||
if ($sqlstatement != "")
|
||||
$error .= "\n\nSQL statement: " . $sqlstatement;
|
||||
|
||||
if ($db['error'] == true)
|
||||
{
|
||||
// datbase error recursion, because another error occured while trying to
|
||||
// build the error template (e.g. because connection was lost, or an error mail
|
||||
// could not load translations from database)
|
||||
|
||||
$dberrmsg = 'MySQL error (' . $errno . '): ' . $error;
|
||||
require("html/dberror.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$db['error'] = true;
|
||||
|
||||
if ($db['connected'] == false)
|
||||
$bSmartyNoTranslate = true;
|
||||
|
||||
@@ -932,7 +940,7 @@
|
||||
{
|
||||
// CLI script, simple text output
|
||||
if ($opt['db']['error']['display'] == true)
|
||||
die('MySQL error' . ' (' . $errno . '): ' . $error . "\n");
|
||||
die('MySQL error (' . $errno . '): ' . $error . "\n");
|
||||
else
|
||||
die("A database command could not be performed.\n");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class user
|
||||
$this->reUser->addBoolean('no_htmledit_flag', false, false);
|
||||
$this->reUser->addInt('notify_radius', 0, false);
|
||||
$this->reUser->addInt('admin', 0, false);
|
||||
$this->reUser->addInt('data_license', $opt['logic']['license'], false);
|
||||
$this->reUser->addInt('data_license', $opt['logic']['license']['newusers'], false);
|
||||
$this->reUser->addInt('node', 0, false);
|
||||
|
||||
$this->reUserStat = new rowEditor('stat_user');
|
||||
|
||||
@@ -18,7 +18,7 @@ function get_okapi_settings()
|
||||
|
||||
'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode".
|
||||
'SUPPORTS_LOGTYPE_NEEDS_MAINTENANCE' => false, # OCDE doesn't support it, see [2] for more info.
|
||||
'DATA_LICENSE_URL' => 'http://www.opencaching.de/articles.php?page=impressum#datalicense',
|
||||
'DATA_LICENSE_URL' => $opt['logic']['license']['terms'],
|
||||
|
||||
# Settings which ARE present in settings.inc.php:
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ function pAppendSites($parentId, $viewall, $sublevel, &$aItems)
|
||||
IF(`sys_menu`.`title`='',
|
||||
IFNULL(`ttMenu`.`text`, `sys_menu`.`menustring`),
|
||||
IFNULL(`ttTitle`.`text`, `sys_menu`.`title`)) AS `name`,
|
||||
`sys_menu`.`href`,
|
||||
IF(SUBSTR(`sys_menu`.`href`,1,1)='!', SUBSTR(`sys_menu`.`href`,2), `sys_menu`.`href`) AS `href`,
|
||||
SUBSTR(`sys_menu`.`href`,1,1)='!' AS `blanktarget`,
|
||||
`sys_menu`.`sitemap`
|
||||
FROM `sys_menu`
|
||||
LEFT JOIN `sys_trans` AS `tTitle` ON `sys_menu`.`title_trans_id`=`tTitle`.`id` AND `sys_menu`.`title`=`tTitle`.`text`
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
<table class="null" border="0">
|
||||
<tr>
|
||||
<td width="30">
|
||||
<img src="images/logo_new_small.gif" width="66" height="66" border="0" alt="" title="" align="left">
|
||||
<img src="images/newlogo.png" height="66" border="0" alt="" title="" align="left" style="margin-bottom:8px">
|
||||
</td>
|
||||
<td> </td>
|
||||
<td align="center"><font size="4">
|
||||
{t}Waypoint{/t}: {$cache.wpoc}
|
||||
</font>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{foreach from=$sites item=siteItem}
|
||||
<li style="padding-left:{$siteItem.sublevel*20}px;">
|
||||
{if $siteItem.sitemap==1}
|
||||
<a href="{$siteItem.href}">
|
||||
<a href="{$siteItem.href}" {if $siteItem.blanktarget=="1"}target="_blank"{/if}>
|
||||
{/if}
|
||||
{$siteItem.name|escape}
|
||||
{if $siteItem.sitemap==1}
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
<a style="background-image: url(resource2/{$opt.template.style}/images/viewcache/print-18.png);background-repeat:no-repeat;" onclick="window.location='viewcache.php?cacheid={$cache.cacheid}&print=y&log=5&nocrypt=' + bNoCrypt"><input name="Print5" id="Print5" value="{t}Print last logs{/t}" type="button" /></a>
|
||||
</p>
|
||||
<p>
|
||||
<a class="send-to-gps" href="#" onclick="window.open('garmin.php?lat={$cache.latitude}&lon={$cache.longitude}&wp={$cache.wpoc}','{t escape=js}Send{/t}','width=640,height=315,resizable=no,scrollbars=1')"><input name="SendToGPS" value="{t}Send to GPS device{/t}" id="SendToGPS" type="button" /></a>
|
||||
<a class="send-to-gps" href="#" onclick="window.open('garmin.php?lat={$cache.latitude}&lon={$cache.longitude}&wp={$cache.wpoc}','{t escape=js}Send{/t}','width=640,height=320,resizable=no,scrollbars=1')"><input name="SendToGPS" value="{t}Send to GPS device{/t}" id="SendToGPS" type="button" /></a>
|
||||
|
||||
<img src="resource2/{$opt.template.style}/images/viewcache/16x16-save.png" class="icon16" alt="" />
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<table class="null" border="0">
|
||||
<tr>
|
||||
<td width="30">
|
||||
<img src="images/logo_new_small.gif" width="66" height="66" border="0" alt="" align="left" />
|
||||
<img src="images/newlogo.png" height="66" border="0" alt="" align="left" />
|
||||
</td>
|
||||
<td align="center">
|
||||
<font size="4">{t}Waypoint{/t}: {$cache.wpoc}</font>
|
||||
|
||||
Reference in New Issue
Block a user