Skip to content
Permalink
Browse files

completed data license functions, picture fixes, public profile link

+ menu option "my profile/public profile"
- enlargit log pics
- short date format for some locales
- data license constants
* dont display license-disabled log pics
* delete log pics on declined license instead replacing
+ delete waypoint descriptions on declined license
* no cache desc replacement message if it was empty
+ license-content-disable-function for old-disabled users
+ script to process all old-deleted users due to incompatible license
+ settings for license admin functions and for license disclaimer
- fixed CC license link on english tos page
* update caches.last_modified with changes of additional waypoints
+ XML interface license disclaimer
  • Loading branch information...
following
following committed Mar 18, 2013
1 parent cc2fc6c commit 37b5268a7e15fd17479c0ec6882e9cf1451125a0
Showing with 506 additions and 127 deletions.
  1. +4 −3 htdocs/adminuser.php
  2. +34 −13 htdocs/config2/locale.inc.php
  3. +6 −0 htdocs/config2/settings-dist.inc.php
  4. +2 −0 htdocs/doc/sql/db-changes.txt
  5. +23 −10 htdocs/doc/sql/static-data/data.sql
  6. +40 −0 htdocs/doc/sql/stored-proc/maintain.php
  7. +2 −0 htdocs/doc/sql/tables/coordinates.sql
  8. +12 −0 htdocs/doc/sql/tables/saved_texts.sql
  9. +6 −0 htdocs/doc/xml/xml11.htm
  10. +3 −8 htdocs/lang/de/ocstyle/main.tpl.php
  11. +25 −1 htdocs/lib/common.inc.php
  12. +3 −0 htdocs/lib/settings-dev.inc.php
  13. +26 −6 htdocs/lib2/OcSmarty.class.php
  14. +7 −4 htdocs/lib2/logic/const.inc.php
  15. +9 −5 htdocs/lib2/logic/logpics.inc.php
  16. +99 −25 htdocs/lib2/logic/user.class.php
  17. +12 −4 htdocs/lib2/translate.class.php
  18. +2 −1 htdocs/map2.php
  19. +8 −0 htdocs/resource2/ocstyle/js/enlargeit/enlargeit.js
  20. +9 −7 htdocs/templates2/ocstyle/adminuser.tpl
  21. +3 −3 htdocs/templates2/ocstyle/articles/EN/impressum.tpl
  22. +4 −3 htdocs/templates2/ocstyle/myhome.tpl
  23. +4 −4 htdocs/templates2/ocstyle/picture.tpl
  24. +7 −0 htdocs/templates2/ocstyle/res_logentry.tpl
  25. +1 −1 htdocs/templates2/ocstyle/res_logentry_logitem.tpl
  26. +5 −5 htdocs/templates2/ocstyle/res_logpictures.tpl
  27. +9 −9 htdocs/templates2/ocstyle/sys_main.tpl
  28. +3 −2 htdocs/templates2/ocstyle/viewprofile.tpl
  29. +4 −0 htdocs/util2/license/.htaccess
  30. +38 −0 htdocs/util2/license/process-old-disabled-users.php
  31. +17 −2 htdocs/viewprofile.php
  32. +77 −9 htdocs/xml/ocxml11.php
  33. +2 −2 htdocs/xml/ocxml12.dtd
@@ -106,15 +106,15 @@ function formAction()
function searchUser()
{
global $tpl;
global $tpl, $opt;
$username = isset($_REQUEST['username']) ? $_REQUEST['username'] : '';
$msg = isset($_REQUEST['msg']) ? $_REQUEST['msg'] : '';
$tpl->assign('username', $username);
$tpl->assign('msg', $msg);
$rs = sql("SELECT `user_id`, `username`, `email`, `email_problems`, `date_created`, `last_modified`, `is_active_flag`, `activation_code`, `first_name`, `last_name`, `data_license`=1 AS `license_declined` FROM `user` WHERE `username`='&1' OR `email`='&1'", $username);
$rs = sql("SELECT `user_id`, `username`, `email`, `email_problems`, `date_created`, `last_modified`, `is_active_flag`, `activation_code`, `first_name`, `last_name`, `data_license`='&2' AS `license_declined` FROM `user` WHERE `username`='&1' OR `email`='&1'", $username, NEW_DATA_LICENSE_ACTIVELY_DECLINED);
$r = sql_fetch_assoc($rs);
sql_free_result($rs);
if ($r == false)
@@ -138,7 +138,8 @@ function searchUser()
$tpl->error(ERROR_UNKNOWN);
$tpl->assign('candisable', $user->canDisable());
$tpl->assign('candelete', $user->canDelete());
$tpl->assign('cansetemail', !$user->missedDataLicenseMail());
$tpl->assign('cansetemail', !$user->missedDataLicenseMail() && $r['email'] != "");
$tpl->assign('licensefunctions', $opt['logic']['license']['admin']);
$tpl->display();
}
@@ -97,9 +97,12 @@
$opt['locale']['EN']['format']['datetimesec'] = '%x %X';
$opt['locale']['EN']['format']['time'] = '%I:%M %p';
$opt['locale']['EN']['format']['timesec'] = '%X';
$opt['locale']['EN']['format']['phpdate'] = 'm/d/Y';
$opt['locale']['EN']['country'] = 'UK';
$opt['locale']['EN']['page']['subtitle1'] = 'Geocaching with Opencaching';
$opt['locale']['EN']['page']['subtitle2'] = '';
$opt['locale']['EN']['page']['license_url'] = 'http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.en';
$opt['locale']['EN']['page']['license'] = '<a rel="license" href="%1" target="_blank"><img alt="Creative Commons License Terms" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/de/88x31.png" /></a><br />The www.opencaching.de content is licensed under <br /><a rel="license" href=%1" target="_blank">Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Germany</a> License.';
$opt['locale']['DE']['format']['dm'] = '%d.%m.';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
@@ -109,133 +112,151 @@
$opt['locale']['DE']['format']['datetimesec'] = '%x %X';
$opt['locale']['DE']['format']['time'] = '%H:%M';
$opt['locale']['DE']['format']['timesec'] = '%X';
$opt['locale']['DE']['format']['phpdate'] = 'd.m.Y';
$opt['locale']['DE']['country'] = 'DE';
$opt['locale']['DE']['page']['subtitle1'] = 'Geocaching in Deutschland,';
$opt['locale']['DE']['page']['subtitle2'] = 'Österreich und der Schweiz';
$opt['locale']['DE']['page']['subtitle1'] = 'Geocaching mit Opencaching';
$opt['locale']['DE']['page']['subtitle2'] = '';
$opt['locale']['DE']['page']['license_url'] = 'http://creativecommons.org/licenses/by-nc-nd/3.0/de/';
$opt['locale']['DE']['page']['license'] = '<a rel="license" href="%1" target="_blank"><img alt="Creative Commons Lizenzvertrag" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/de/88x31.png" /></a><br />Der Inhalt von www.opencaching.de steht unter einer <br /><a rel="license" href="%1" target="_blank">Creative Commons Namensnennung-NichtKommerziell-KeineBearbeitung-3.0-Deutschland</a>-Lizenz.';
$opt['locale']['DE']['helpwiki'] = "http://wiki.opencaching.de/index.php/";
$opt['locale']['FR']['format']['dm'] = '%d.%m.';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['FR']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['FR']['format']['date'] = '%x';
$opt['locale']['FR']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['FR']['format']['datetime'] = '%x %H:%M';
$opt['locale']['FR']['format']['datetimesec'] = '%x %X';
$opt['locale']['FR']['format']['time'] = '%H:%M';
$opt['locale']['FR']['format']['timesec'] = '%X';
$opt['locale']['FR']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['FR']['country'] = 'FR';
$opt['locale']['PL']['format']['dm'] = '%d.%m.';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['PL']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['PL']['format']['date'] = '%x';
$opt['locale']['PL']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['PL']['format']['datetime'] = '%x %H:%M';
$opt['locale']['PL']['format']['datetimesec'] = '%x %X';
$opt['locale']['PL']['format']['time'] = '%H:%M';
$opt['locale']['PL']['format']['timesec'] = '%X';
$opt['locale']['PL']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['PL']['country'] = 'PL';
$opt['locale']['NL']['format']['dm'] = '%d.%m.';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['NL']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['NL']['format']['date'] = '%x';
$opt['locale']['NL']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['NL']['format']['datetime'] = '%x %H:%M';
$opt['locale']['NL']['format']['datetimesec'] = '%x %X';
$opt['locale']['NL']['format']['time'] = '%H:%M';
$opt['locale']['NL']['format']['timesec'] = '%X';
$opt['locale']['NL']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['NL']['page']['subtitle1'] = 'Geocaching met Opencaching';
$opt['locale']['NL']['page']['subtitle2'] = '';
$opt['locale']['NL']['country'] = 'NL';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['IT']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['IT']['format']['dm'] = '%d.%m.';
$opt['locale']['IT']['format']['date'] = '%x';
$opt['locale']['IT']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['IT']['format']['datetime'] = '%x %H:%M';
$opt['locale']['IT']['format']['datetimesec'] = '%x %X';
$opt['locale']['IT']['format']['time'] = '%H:%M';
$opt['locale']['IT']['format']['timesec'] = '%X';
$opt['locale']['IT']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['IT']['country'] = 'IT';
$opt['locale']['IT']['page']['subtitle1'] = 'Geocaching con Opencaching';
$opt['locale']['IT']['page']['subtitle2'] = '';
$opt['locale']['IT']['page']['license_url'] = 'http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.it';
$opt['locale']['IT']['page']['license'] = '<a rel="license" href="%1" target="_blank"><img alt="Creative Commons License Terms" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/de/88x31.png" /></a><br />Il contenuto di www.opencaching.de è rilasciato sotto <br />Licenza <a rel="license" href="%1" target="_blank">Attribuzione - Non commerciale - Non opere derivate 3.0 Germania</a>.';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['RU']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['RU']['format']['dm'] = '%d.%m.';
$opt['locale']['RU']['format']['date'] = '%x';
$opt['locale']['RU']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['RU']['format']['datetime'] = '%x %H:%M';
$opt['locale']['RU']['format']['datetimesec'] = '%x %X';
$opt['locale']['RU']['format']['time'] = '%H:%M';
$opt['locale']['RU']['format']['timesec'] = '%X';
$opt['locale']['RU']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['RU']['country'] = 'RU';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['ES']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['ES']['format']['dm'] = '%d.%m.';
$opt['locale']['ES']['format']['date'] = '%x';
$opt['locale']['ES']['format']['datelong'] = '%d. %B %Y';
$opt['locale']['ES']['format']['datetime'] = '%x %H:%M';
$opt['locale']['ES']['format']['datetimesec'] = '%x %X';
$opt['locale']['ES']['format']['time'] = '%H:%M';
$opt['locale']['ES']['format']['timesec'] = '%X';
$opt['locale']['ES']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['ES']['country'] = 'ES';
$opt['locale']['ES']['page']['subtitle1'] = 'Geocaching con Opencaching';
$opt['locale']['ES']['page']['subtitle2'] = '';
$opt['locale']['ES']['page']['license_url'] = 'http://creativecommons.org/licenses/by-nc-nd/3.0/de/deed.es_ES';
$opt['locale']['ES']['page']['license'] = '<a rel="license" href="%1" target="_blank"><img alt="Creative Commons License Terms" style="border-width:0" src="http://i.creativecommons.org/l/by-nc-nd/3.0/de/88x31.png" /></a><br />El contenido está disponible bajo licencia <br/><a rel="license" href="%1" target="_blank">Reconocimiento-NoComercial-SinObraDerivada 3.0 Alemania</a> Licencia.';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['SV']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['SV']['format']['dm'] = '%d.%m.';
$opt['locale']['SV']['format']['date'] = '%Y-%m-%d';
$opt['locale']['SV']['format']['datelong'] = '%Y-%m-%d';
$opt['locale']['SV']['format']['datetime'] = '%x %H:%M';
$opt['locale']['SV']['format']['datetimesec'] = '%x %X';
$opt['locale']['SV']['format']['time'] = '%H:%M';
$opt['locale']['SV']['format']['timesec'] = '%X';
$opt['locale']['SV']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['SV']['country'] = 'SE';
$opt['locale']['SV']['page']['subtitle1'] = 'Geocaching med Opencaching';
$opt['locale']['SV']['page']['subtitle2'] = '';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['NO']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['NO']['format']['dm'] = '%d.%m.';
$opt['locale']['NO']['format']['date'] = '%Y-%m-%d';
$opt['locale']['NO']['format']['datelong'] = '%Y-%m-%d';
$opt['locale']['NO']['format']['datetime'] = '%x %H:%M';
$opt['locale']['NO']['format']['datetimesec'] = '%x %X';
$opt['locale']['NO']['format']['time'] = '%H:%M';
$opt['locale']['NO']['format']['timesec'] = '%X';
$opt['locale']['NO']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['NO']['country'] = 'NO';
$opt['locale']['NO']['page']['subtitle1'] = 'Geocaching med Opencaching';
$opt['locale']['NO']['page']['subtitle2'] = '';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['DA']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['DA']['format']['dm'] = '%d.%m.';
$opt['locale']['DA']['format']['date'] = '%Y-%m-%d';
$opt['locale']['DA']['format']['datelong'] = '%Y-%m-%d';
$opt['locale']['DA']['format']['datetime'] = '%x %H:%M';
$opt['locale']['DA']['format']['datetimesec'] = '%x %X';
$opt['locale']['DA']['format']['time'] = '%H:%M';
$opt['locale']['DA']['format']['timesec'] = '%X';
$opt['locale']['DA']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['DA']['country'] = 'DK';
$opt['locale']['DA']['page']['subtitle1'] = 'Geocaching med Opencaching';
$opt['locale']['DA']['page']['subtitle2'] = '';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['PT']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['PT']['format']['dm'] = '%d.%m.';
$opt['locale']['PT']['format']['date'] = '%Y-%m-%d';
$opt['locale']['PT']['format']['datelong'] = '%Y-%m-%d';
$opt['locale']['PT']['format']['datetime'] = '%x %H:%M';
$opt['locale']['PT']['format']['datetimesec'] = '%x %X';
$opt['locale']['PT']['format']['time'] = '%H:%M';
$opt['locale']['PT']['format']['timesec'] = '%X';
$opt['locale']['PT']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['PT']['country'] = 'PT';
$opt['locale']['PT']['page']['subtitle1'] = 'Geocaching com Opencaching';
$opt['locale']['PT']['page']['subtitle2'] = '';
$opt['locale']['DE']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['JA']['format']['dateshort'] = '%d.%m.%y';
$opt['locale']['JA']['format']['dm'] = '%d.%m.';
$opt['locale']['JA']['format']['date'] = '%Y-%m-%d';
$opt['locale']['JA']['format']['datelong'] = '%Y-%m-%d';
$opt['locale']['JA']['format']['datetime'] = '%x %H:%M';
$opt['locale']['JA']['format']['datetimesec'] = '%x %X';
$opt['locale']['JA']['format']['time'] = '%H:%M';
$opt['locale']['JA']['format']['timesec'] = '%X';
$opt['locale']['JA']['format']['phpdate'] = 'd-m-Y';
$opt['locale']['JA']['country'] = 'JP';
$opt['locale']['JA']['page']['subtitle1'] = 'Opencachingとジオキャッシング';
$opt['locale']['JA']['page']['subtitle2'] = '';
@@ -365,6 +365,12 @@
$opt['logic']['logs']['purge_email'] = 30;
$opt['logic']['logs']['purge_userdata'] = 14;
/* license-related functions
*/
$opt['logic']['license'] = array(); // PHP warning without this - why only here??
$opt['logic']['license']['admin'] = true;
$opt['logic']['license']['disclaimer'] = false; // also in lib/settings.inc.php
/* Database charset
* frontend and php charsets are UTF-8
* here you can set a different charset for the MySQL-Engine
@@ -52,3 +52,5 @@ date commit ID change
2013-03-14 69abeb67 added fields coordinates_type.preposition and pp_trans_id
2013-03-15 a15b5582 discarded table 'data_license'
2013-03-16 added fields coordinates.date_created and .last_modified
2013-03-18 added table 'saved_texts' + triggers
added triggers to table 'coordinates'
Oops, something went wrong.

0 comments on commit 37b5268

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