@@ -32,7 +32,7 @@ |
||
| 32 | 32 | if (!isset($counter[$name])) { |
| 33 | 33 | $counter[$name] = 0; |
| 34 | 34 | } |
| 35 | - $counter[$name] ++; |
|
| 35 | + $counter[$name]++; |
|
| 36 | 36 | |
| 37 | 37 | if ($smarty->_cache_including) { |
| 38 | 38 | $param = isset($smarty->_cache_info['cached_vars'][$name][$counter[$name]]) ? $smarty->_cache_info['cached_vars'][$name][$counter[$name]] : []; |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | ]; |
| 81 | 81 | |
| 82 | 82 | $nTimestamp = time(); |
| 83 | - for ($nIndex = 0; $nIndex < count($seasons); $nIndex ++) { |
|
| 83 | + for ($nIndex = 0; $nIndex < count($seasons); $nIndex++) { |
|
| 84 | 84 | if (strtotime($seasons[$nIndex][0]) > $nTimestamp) { |
| 85 | 85 | return $params['winter']; |
| 86 | 86 | } //''; |
@@ -1011,7 +1011,7 @@ |
||
| 1011 | 1011 | } |
| 1012 | 1012 | $logs_restored = true; |
| 1013 | 1013 | } |
| 1014 | - // if it was not already restored by a later restore operation ... |
|
| 1014 | + // if it was not already restored by a later restore operation ... |
|
| 1015 | 1015 | } elseif (sql_value("SELECT `id` FROM `cache_logs` WHERE `id`='&1'", 0, $revert_logid) == 0) { |
| 1016 | 1016 | // id, uuid, date_created and last_modified are set automatically; |
| 1017 | 1017 | // picture will be updated automatically on picture-restore |
@@ -132,8 +132,8 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | */ |
| 134 | 134 | |
| 135 | -require __DIR__ . '/lib2/web.inc.php'; |
|
| 136 | -require_once __DIR__ . '/lib2/logic/labels.inc.php'; |
|
| 135 | +require __DIR__.'/lib2/web.inc.php'; |
|
| 136 | +require_once __DIR__.'/lib2/logic/labels.inc.php'; |
|
| 137 | 137 | |
| 138 | 138 | $tpl->name = 'restorecaches'; |
| 139 | 139 | $tpl->menuitem = MNU_ADMIN_RESTORE; |
@@ -308,12 +308,12 @@ discard block |
||
| 308 | 308 | |
| 309 | 309 | function get_archive_data($caches) |
| 310 | 310 | { |
| 311 | - $cachelist = "(" . implode(",", $caches) . ")"; |
|
| 311 | + $cachelist = "(".implode(",", $caches).")"; |
|
| 312 | 312 | $data = array(); |
| 313 | 313 | $admins = array(); |
| 314 | 314 | |
| 315 | 315 | // make waypoint index |
| 316 | - $rs = sql("SELECT `cache_id`, `wp_oc` FROM `caches` WHERE `cache_id` IN " . $cachelist); |
|
| 316 | + $rs = sql("SELECT `cache_id`, `wp_oc` FROM `caches` WHERE `cache_id` IN ".$cachelist); |
|
| 317 | 317 | while ($r = sql_fetch_assoc($rs)) { |
| 318 | 318 | $wp_oc[$r['cache_id']] = $r['wp_oc']; |
| 319 | 319 | } |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | `latitude`, |
| 329 | 329 | `restored_by` |
| 330 | 330 | FROM `cache_coordinates` |
| 331 | - WHERE `cache_id` IN " . $cachelist . " |
|
| 331 | + WHERE `cache_id` IN " . $cachelist." |
|
| 332 | 332 | ORDER BY `date_created` ASC" |
| 333 | 333 | ); |
| 334 | 334 | // order is relevant, because multiple changes per day possible |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | while ($r = sql_fetch_assoc($rs)) { |
| 337 | 337 | $coord = new coordinate($r['latitude'], $r['longitude']); |
| 338 | 338 | $coord = $coord->getDecimalMinutes(); |
| 339 | - $coord = $coord['lat'] . " " . $coord['lon']; |
|
| 339 | + $coord = $coord['lat']." ".$coord['lon']; |
|
| 340 | 340 | if (isset($lastcoord[$r['cache_id']]) && $coord != $lastcoord[$r['cache_id']]) { |
| 341 | 341 | // the database contains lots of old coord records with unchanged coords, wtf? |
| 342 | 342 | append_data($data, $admins, $wp_oc, $r, "coord", $lastcoord[$r['cache_id']], $coord); |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | // cache country |
| 349 | 349 | $rs = sql("SELECT `cache_id`, LEFT(`date_created`,10) AS `date_modified`, `country`, `restored_by` |
| 350 | 350 | FROM `cache_countries` |
| 351 | - WHERE `cache_id` IN " . $cachelist . " |
|
| 351 | + WHERE `cache_id` IN " . $cachelist." |
|
| 352 | 352 | ORDER BY `date_created` ASC"); |
| 353 | 353 | // order is relevant, because multiple changes per day possible |
| 354 | 354 | $lastcountry = array(); |
@@ -364,17 +364,17 @@ discard block |
||
| 364 | 364 | // all other cache data |
| 365 | 365 | // first the current data ... |
| 366 | 366 | $nextcd = array(); |
| 367 | - $rs = sql("SELECT * FROM `caches` WHERE `cache_id` IN " . $cachelist); |
|
| 367 | + $rs = sql("SELECT * FROM `caches` WHERE `cache_id` IN ".$cachelist); |
|
| 368 | 368 | while ($r = sql_fetch_assoc($rs)) { |
| 369 | 369 | $nextcd[$r['wp_oc']] = $r; |
| 370 | - $user_id = $r['user_id']; // is used later for logs |
|
| 370 | + $user_id = $r['user_id']; // is used later for logs |
|
| 371 | 371 | } |
| 372 | 372 | sql_free_result($rs); |
| 373 | 373 | |
| 374 | 374 | // .. and then the changes |
| 375 | 375 | $rs = sql( |
| 376 | 376 | "SELECT * FROM `caches_modified` |
| 377 | - WHERE `cache_id` IN " . $cachelist . " |
|
| 377 | + WHERE `cache_id` IN " . $cachelist." |
|
| 378 | 378 | ORDER BY `date_modified` DESC" |
| 379 | 379 | ); |
| 380 | 380 | while ($r = sql_fetch_assoc($rs)) { |
@@ -417,8 +417,8 @@ discard block |
||
| 417 | 417 | $wp_oc, |
| 418 | 418 | $r, |
| 419 | 419 | "time", |
| 420 | - $r['search_time'] . ' h', |
|
| 421 | - $nextcd[$wp]['search_time'] . ' h' |
|
| 420 | + $r['search_time'].' h', |
|
| 421 | + $nextcd[$wp]['search_time'].' h' |
|
| 422 | 422 | ); |
| 423 | 423 | } |
| 424 | 424 | if ($r['way_length'] != $nextcd[$wp]['way_length']) { |
@@ -428,8 +428,8 @@ discard block |
||
| 428 | 428 | $wp_oc, |
| 429 | 429 | $r, |
| 430 | 430 | "way", |
| 431 | - $r['way_length'] . ' km', |
|
| 432 | - $nextcd[$wp]['way_length'] . ' km' |
|
| 431 | + $r['way_length'].' km', |
|
| 432 | + $nextcd[$wp]['way_length'].' km' |
|
| 433 | 433 | ); |
| 434 | 434 | } |
| 435 | 435 | if ($r['wp_gc'] != $nextcd[$wp]['wp_gc']) { |
@@ -465,8 +465,8 @@ discard block |
||
| 465 | 465 | // attributes |
| 466 | 466 | $rs = sql( |
| 467 | 467 | "SELECT * FROM `caches_attributes_modified` |
| 468 | - WHERE `cache_id` IN " . $cachelist . " /* OConly attrib is shown, but not restorable */ |
|
| 469 | - ORDER BY `date_modified` ASC"); // order doesn't matter as long it is date only |
|
| 468 | + WHERE `cache_id` IN " . $cachelist." /* OConly attrib is shown, but not restorable */ |
|
| 469 | + ORDER BY `date_modified` ASC"); // order doesn't matter as long it is date only |
|
| 470 | 470 | while ($r = sql_fetch_assoc($rs)) { |
| 471 | 471 | append_data( |
| 472 | 472 | $data, |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | $wp_oc, |
| 475 | 475 | $r, |
| 476 | 476 | "attrib", |
| 477 | - ($r['was_set'] ? "-" : "+") . labels::getLabelValue('cache_attrib', $r['attrib_id']), |
|
| 477 | + ($r['was_set'] ? "-" : "+").labels::getLabelValue('cache_attrib', $r['attrib_id']), |
|
| 478 | 478 | '' |
| 479 | 479 | ); |
| 480 | 480 | } |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | LENGTH(`short_desc`) AS `sdl`, |
| 513 | 513 | `restored_by` |
| 514 | 514 | FROM `cache_desc_modified` |
| 515 | - WHERE `cache_id` IN " . $cachelist . " |
|
| 515 | + WHERE `cache_id` IN " . $cachelist." |
|
| 516 | 516 | ORDER BY `date_modified` DESC" |
| 517 | 517 | ); |
| 518 | 518 | // order doesn't matter as long only one change per day is recorded |
@@ -534,8 +534,8 @@ discard block |
||
| 534 | 534 | $admins, |
| 535 | 535 | $wp_oc, |
| 536 | 536 | $r, |
| 537 | - "desc(" . $r['language'] . ")", |
|
| 538 | - $r['dl'] + 0, $next['dl'] + 0 . " bytes" |
|
| 537 | + "desc(".$r['language'].")", |
|
| 538 | + $r['dl'] + 0, $next['dl'] + 0." bytes" |
|
| 539 | 539 | ); |
| 540 | 540 | } |
| 541 | 541 | if ($r['hl'] + 0 != $next['hl'] + 0) { |
@@ -544,9 +544,9 @@ discard block |
||
| 544 | 544 | $admins, |
| 545 | 545 | $wp_oc, |
| 546 | 546 | $r, |
| 547 | - "hint(" . $r['language'] . ")", |
|
| 547 | + "hint(".$r['language'].")", |
|
| 548 | 548 | $r['hl'] + 0, |
| 549 | - $next['hl'] + 0 . " bytes" |
|
| 549 | + $next['hl'] + 0." bytes" |
|
| 550 | 550 | ); |
| 551 | 551 | } |
| 552 | 552 | if ($r['sdl'] + 0 != $next['sdl'] + 0) { |
@@ -555,9 +555,9 @@ discard block |
||
| 555 | 555 | $admins, |
| 556 | 556 | $wp_oc, |
| 557 | 557 | $r, |
| 558 | - "shortdesc(" . $r['language'] . ")", |
|
| 558 | + "shortdesc(".$r['language'].")", |
|
| 559 | 559 | $r['sdl'] + 0, |
| 560 | - $next['sdl'] + 0 . " bytes" |
|
| 560 | + $next['sdl'] + 0." bytes" |
|
| 561 | 561 | ); |
| 562 | 562 | } |
| 563 | 563 | |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | (SELECT 1 AS `op`, `deletion_date` AS `date_modified`, `cache_id`, |
| 581 | 581 | `user_id`, `type`, `date`, `restored_by` |
| 582 | 582 | FROM `cache_logs_archived` |
| 583 | - WHERE `cache_id` IN " . $cachelist . "AND `deleted_by`='&1' AND `user_id`<>'&1' |
|
| 583 | + WHERE `cache_id` IN " . $cachelist."AND `deleted_by`='&1' AND `user_id`<>'&1' |
|
| 584 | 584 | UNION |
| 585 | 585 | SELECT 2 AS `op`, `date_modified`, `cache_id`, |
| 586 | 586 | (SELECT `user_id` FROM `cache_logs_archived` WHERE `id`=`original_id`), |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | (SELECT `date` FROM `cache_logs_archived` WHERE `id`=`original_id`), |
| 589 | 589 | `restored_by` |
| 590 | 590 | FROM `cache_logs_restored` |
| 591 | - WHERE `cache_id` IN " . $cachelist . ") `logs` |
|
| 591 | + WHERE `cache_id` IN " . $cachelist.") `logs` |
|
| 592 | 592 | INNER JOIN `user` ON `user`.`user_id`=`logs`.`user_id` |
| 593 | 593 | ORDER BY `logs`.`date_modified` ASC", |
| 594 | 594 | // order may not be exact when redoing reverts, because delete and insert |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | $wp_oc, |
| 603 | 603 | $r, |
| 604 | 604 | $r["op"] == 1 ? "dellog" : "restorelog", |
| 605 | - "<a href='viewprofile.php?userid=" . $r['user_id'] . "' target='_blank'>" . $r['username'] . "</a>/" . $r['date'], |
|
| 605 | + "<a href='viewprofile.php?userid=".$r['user_id']."' target='_blank'>".$r['username']."</a>/".$r['date'], |
|
| 606 | 606 | '' |
| 607 | 607 | ); |
| 608 | 608 | } |
@@ -618,9 +618,9 @@ discard block |
||
| 618 | 618 | |
| 619 | 619 | $piccacheid = "IF(`object_type`=2, `object_id`, IF(`object_type`=1, IFNULL((SELECT `cache_id` FROM `cache_logs` WHERE `id`=`object_id`),(SELECT `cache_id` FROM `cache_logs_archived` WHERE `id`=`object_id`)), 0))"; |
| 620 | 620 | $rs = sql( |
| 621 | - "SELECT *, " . $piccacheid . "AS `cache_id` FROM `pictures_modified` |
|
| 622 | - WHERE " . $piccacheid . " IN " . $cachelist . " |
|
| 623 | - ORDER BY `date_modified` ASC"); // order is relevant for the case of restore-reverts |
|
| 621 | + "SELECT *, ".$piccacheid."AS `cache_id` FROM `pictures_modified` |
|
| 622 | + WHERE " . $piccacheid." IN ".$cachelist." |
|
| 623 | + ORDER BY `date_modified` ASC"); // order is relevant for the case of restore-reverts |
|
| 624 | 624 | while ($r = sql_fetch_assoc($rs)) { |
| 625 | 625 | $r['date_modified'] = substr($r['date_modified'], 0, 10); |
| 626 | 626 | switch ($r['operation']) { |
@@ -642,14 +642,14 @@ discard block |
||
| 642 | 642 | $picchange .= "-cache"; |
| 643 | 643 | break; |
| 644 | 644 | } |
| 645 | - append_data($data, $admins, $wp_oc, $r, $picchange . "pic", $r['title'], ''); |
|
| 645 | + append_data($data, $admins, $wp_oc, $r, $picchange."pic", $r['title'], ''); |
|
| 646 | 646 | } |
| 647 | 647 | sql_free_result($rs); |
| 648 | 648 | |
| 649 | 649 | // admins |
| 650 | 650 | foreach ($admins as $adate => $adata) { |
| 651 | 651 | foreach ($adata as $awp => $alist) { |
| 652 | - $data[$adate][$awp] .= "<br /><strong class='adminrestore'>admins:</strong> " . implode(',', $alist); |
|
| 652 | + $data[$adate][$awp] .= "<br /><strong class='adminrestore'>admins:</strong> ".implode(',', $alist); |
|
| 653 | 653 | } |
| 654 | 654 | } |
| 655 | 655 | |
@@ -698,9 +698,9 @@ discard block |
||
| 698 | 698 | } else { |
| 699 | 699 | $text .= " class='userchange'"; |
| 700 | 700 | } |
| 701 | - $text .= ">$field</strong>: $oldvalue" . ($newvalue != "" ? " → $newvalue" : ""); |
|
| 701 | + $text .= ">$field</strong>: $oldvalue".($newvalue != "" ? " → $newvalue" : ""); |
|
| 702 | 702 | if (isset($data[$mdate][$wp])) { |
| 703 | - $data[$mdate][$wp] .= ", " . $text; |
|
| 703 | + $data[$mdate][$wp] .= ", ".$text; |
|
| 704 | 704 | } else { |
| 705 | 705 | $data[$mdate][$wp] = $text; |
| 706 | 706 | } |
@@ -713,8 +713,8 @@ discard block |
||
| 713 | 713 | $admins[$mdate][$wp] = []; |
| 714 | 714 | } |
| 715 | 715 | $admins[$mdate][$wp][$r['restored_by'] + 0] |
| 716 | - = "<a href='viewprofile.php?userid=" . $r['restored_by'] . "' target='_blank'>" . |
|
| 717 | - sql_value("SELECT `username` FROM `user` WHERE `user_id`='&1'", "", $r['restored_by']) . |
|
| 716 | + = "<a href='viewprofile.php?userid=".$r['restored_by']."' target='_blank'>". |
|
| 717 | + sql_value("SELECT `username` FROM `user` WHERE `user_id`='&1'", "", $r['restored_by']). |
|
| 718 | 718 | "</a>"; |
| 719 | 719 | } |
| 720 | 720 | } |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | { |
| 725 | 725 | global $opt, $login; |
| 726 | 726 | |
| 727 | - sql("SET @restoredby='&1'", $login->userid); // is evaluated by trigger functions |
|
| 727 | + sql("SET @restoredby='&1'", $login->userid); // is evaluated by trigger functions |
|
| 728 | 728 | sql_slave("SET @restoredby='&1'", $login->userid); |
| 729 | 729 | |
| 730 | 730 | $restored = array(); |
@@ -834,12 +834,12 @@ discard block |
||
| 834 | 834 | if ($setfields != "") { |
| 835 | 835 | $setfields .= ","; |
| 836 | 836 | } |
| 837 | - $setfields .= "`$field`='" . sql_escape($r[$field]) . "'"; |
|
| 837 | + $setfields .= "`$field`='".sql_escape($r[$field])."'"; |
|
| 838 | 838 | $restored[$wp][$field] = true; |
| 839 | 839 | } |
| 840 | 840 | } |
| 841 | 841 | if ($setfields != "" && !$simulate) { |
| 842 | - sql("UPDATE `caches` SET " . $setfields . " WHERE `cache_id`='&1'", $cacheid); |
|
| 842 | + sql("UPDATE `caches` SET ".$setfields." WHERE `cache_id`='&1'", $cacheid); |
|
| 843 | 843 | } |
| 844 | 844 | } |
| 845 | 845 | sql_free_result($rs); |
@@ -1016,7 +1016,7 @@ discard block |
||
| 1016 | 1016 | // id, uuid, date_created and last_modified are set automatically; |
| 1017 | 1017 | // picture will be updated automatically on picture-restore |
| 1018 | 1018 | $log = new cachelog(); |
| 1019 | - $log->setNode($r['node']); // cachelog class currently does not initialize node field |
|
| 1019 | + $log->setNode($r['node']); // cachelog class currently does not initialize node field |
|
| 1020 | 1020 | $log->setCacheId($r['cache_id']); |
| 1021 | 1021 | $log->setUserId($r['user_id']); |
| 1022 | 1022 | $log->setType($r['type'], true); |
@@ -1068,7 +1068,7 @@ discard block |
||
| 1068 | 1068 | } // not already processed |
| 1069 | 1069 | |
| 1070 | 1070 | if ($error != "") { |
| 1071 | - $restored[$wp]['internal error - could not $error log ' + $r['id'] + "/" + $logid]; |
|
| 1071 | + $restored[$wp]['internal error - could not $error log ' +$r['id'] + "/" +$logid]; |
|
| 1072 | 1072 | } |
| 1073 | 1073 | if ($logs_restored) { |
| 1074 | 1074 | $restored[$wp]['logs'] = true; |
@@ -1202,7 +1202,7 @@ discard block |
||
| 1202 | 1202 | } // not already processed |
| 1203 | 1203 | |
| 1204 | 1204 | if ($error != "") { |
| 1205 | - $restored[$wp]['internal error - could not $error picture ' . $r['id'] + "/" + $picid] = true; |
|
| 1205 | + $restored[$wp]['internal error - could not $error picture '.$r['id'] + "/" +$picid] = true; |
|
| 1206 | 1206 | } |
| 1207 | 1207 | if ($pics_restored) { |
| 1208 | 1208 | $restored[$wp]['pictures'] = true; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | 'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'], |
| 34 | 34 | 'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0), |
| 35 | 35 | 'DEBUG_PREVENT_SEMAPHORES' |
| 36 | - => !$opt['php']['semaphores'], # not available on old developer system |
|
| 36 | + => !$opt['php']['semaphores'], # not available on old developer system |
|
| 37 | 37 | 'DB_SERVER' => $opt['db']['servername'], |
| 38 | 38 | 'DB_NAME' => $opt['db']['placeholder']['db'], |
| 39 | 39 | 'DB_USERNAME' => $opt['db']['username'], |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'OC_NODE_ID' => $opt['logic']['node']['id'], |
| 55 | 55 | 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
| 56 | 56 | 'OCDE_HTML_PURIFIER_SETTINGS' |
| 57 | - => $opt['html_purifier'], |
|
| 57 | + => $opt['html_purifier'], |
|
| 58 | 58 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
| 59 | 59 | ); |
| 60 | 60 | } |
@@ -16,24 +16,24 @@ discard block |
||
| 16 | 16 | # [3] http://code.google.com/p/opencaching-api/issues/detail?id=132 |
| 17 | 17 | |
| 18 | 18 | $opt['rootpath'] = $GLOBALS['rootpath']; |
| 19 | - require $opt['rootpath'] . 'lib2/const.inc.php'; # (into the *local* scope!) |
|
| 20 | - require $opt['rootpath'] . 'config2/settings-dist.inc.php'; |
|
| 21 | - require $opt['rootpath'] . 'config2/settings.inc.php'; |
|
| 19 | + require $opt['rootpath'].'lib2/const.inc.php'; # (into the *local* scope!) |
|
| 20 | + require $opt['rootpath'].'config2/settings-dist.inc.php'; |
|
| 21 | + require $opt['rootpath'].'config2/settings.inc.php'; |
|
| 22 | 22 | |
| 23 | 23 | return array( |
| 24 | 24 | |
| 25 | 25 | # Settings which ARE NOT present in settings.inc.php: |
| 26 | 26 | |
| 27 | - 'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode". |
|
| 27 | + 'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode". |
|
| 28 | 28 | |
| 29 | 29 | # Settings which ARE present in settings.inc.php: |
| 30 | 30 | |
| 31 | 31 | 'ADMINS' => array($opt['db']['warn']['mail'], '[email protected]'), |
| 32 | 32 | 'FROM_FIELD' => $opt['mail']['contact'], |
| 33 | - 'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'], |
|
| 33 | + 'DATA_LICENSE_URL' => $opt['page']['absolute_url'].$opt['logic']['license']['terms'], |
|
| 34 | 34 | 'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0), |
| 35 | 35 | 'DEBUG_PREVENT_SEMAPHORES' |
| 36 | - => !$opt['php']['semaphores'], # not available on old developer system |
|
| 36 | + => !$opt['php']['semaphores'], # not available on old developer system |
|
| 37 | 37 | 'DB_SERVER' => $opt['db']['servername'], |
| 38 | 38 | 'DB_NAME' => $opt['db']['placeholder']['db'], |
| 39 | 39 | 'DB_USERNAME' => $opt['db']['username'], |
@@ -43,16 +43,16 @@ discard block |
||
| 43 | 43 | 'TIMEZONE' => $opt['php']['timezone'], |
| 44 | 44 | 'SITE_URL' => $opt['page']['absolute_url'], |
| 45 | 45 | 'REGISTRATION_URL' => $opt['page']['https']['mode'] != HTTPS_DISABLED |
| 46 | - ? 'https://' . $opt['page']['domain'] . '/register.php' |
|
| 47 | - : $opt['page']['absolute_url'] . 'register.php', |
|
| 46 | + ? 'https://'.$opt['page']['domain'].'/register.php' |
|
| 47 | + : $opt['page']['absolute_url'].'register.php', |
|
| 48 | 48 | 'VAR_DIR' => $opt['okapi']['var_dir'], |
| 49 | 49 | 'IMAGES_DIR' => rtrim($opt['logic']['pictures']['dir'], '/'), |
| 50 | 50 | 'IMAGES_URL' => rtrim($opt['logic']['pictures']['url'], '/').'/', |
| 51 | 51 | 'IMAGE_MAX_UPLOAD_SIZE' => 2 * $opt['logic']['pictures']['maxsize'], |
| 52 | - 'IMAGE_MAX_PIXEL_COUNT' => 786432, # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings |
|
| 53 | - 'SITE_LOGO' => $opt['page']['absolute_url'] . 'resource2/' . $opt['template']['default']['style'] . '/images/oclogo/oc_logo_alpha3.png', |
|
| 52 | + 'IMAGE_MAX_PIXEL_COUNT' => 786432, # 1024 x 768; TODO: move PICTURE_MAX_LONG_SIDE to settings |
|
| 53 | + 'SITE_LOGO' => $opt['page']['absolute_url'].'resource2/'.$opt['template']['default']['style'].'/images/oclogo/oc_logo_alpha3.png', |
|
| 54 | 54 | 'OC_NODE_ID' => $opt['logic']['node']['id'], |
| 55 | - 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
|
| 55 | + 'OC_COOKIE_NAME' => $opt['session']['cookiename'].'data', |
|
| 56 | 56 | 'OCDE_HTML_PURIFIER_SETTINGS' |
| 57 | 57 | => $opt['html_purifier'], |
| 58 | 58 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | - if (isset($_REQUEST['lang'])) { |
|
| 2 | + if (isset($_REQUEST['lang'])) { |
|
| 3 | 3 | $lang = $_REQUEST['lang']; |
| 4 | - } |
|
| 5 | - else { |
|
| 4 | + } |
|
| 5 | + else { |
|
| 6 | 6 | $lang = 'de'; |
| 7 | - } |
|
| 7 | + } |
|
| 8 | 8 | ?> |
| 9 | 9 | tinyMCE_GZ.init({ |
| 10 | 10 | plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table', |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | |
| 48 | 48 | function imageBrowser(field_name, url, type, win) |
| 49 | 49 | { |
| 50 | - window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid']+0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 50 | + window.open('../../../../imagebrowser.php?logid=<?php echo isset($_REQUEST['logid']) ? ($_REQUEST['logid'] + 0) : 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 51 | 51 | fileBrowserWin = win; |
| 52 | 52 | fileBrowserFieldName = field_name; |
| 53 | 53 | } |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | - if (isset($_REQUEST['cacheid'])) { |
|
| 2 | + if (isset($_REQUEST['cacheid'])) { |
|
| 3 | 3 | $cacheID = $_REQUEST['cacheid']; |
| 4 | - } |
|
| 5 | - else { |
|
| 4 | + } |
|
| 5 | + else { |
|
| 6 | 6 | $cacheID = 0; |
| 7 | - } |
|
| 8 | - if (isset($_REQUEST['lang'])) { |
|
| 7 | + } |
|
| 8 | + if (isset($_REQUEST['lang'])) { |
|
| 9 | 9 | $lang = $_REQUEST['lang']; |
| 10 | - } |
|
| 11 | - else { |
|
| 10 | + } |
|
| 11 | + else { |
|
| 12 | 12 | $lang = 'de'; |
| 13 | - } |
|
| 13 | + } |
|
| 14 | 14 | ?> |
| 15 | 15 | tinyMCE_GZ.init({ |
| 16 | 16 | plugins : 'advhr,contextmenu,emotions,insertdatetime,paste,table', |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | |
| 54 | 54 | function imageBrowser(field_name, url, type, win) |
| 55 | 55 | { |
| 56 | - window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID+0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 56 | + window.open('../../../../imagebrowser.php?cacheid=<?php echo $cacheID + 0; ?>', '', 'width=450,height=550,menubar=no,scrollbars=yes,status=no,location=no,resizable=yes,status=no,dependent'); |
|
| 57 | 57 | fileBrowserWin = win; |
| 58 | 58 | fileBrowserFieldName = field_name; |
| 59 | 59 | } |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | - if (isset($_REQUEST['lang'])) |
|
| 2 | + if (isset($_REQUEST['lang'])) |
|
| 3 | 3 | $lang = $_REQUEST['lang']; |
| 4 | - else |
|
| 4 | + else |
|
| 5 | 5 | $lang = 'de'; |
| 6 | 6 | ?> |
| 7 | 7 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | global $login; |
| 31 | 31 | |
| 32 | 32 | $fields = |
| 33 | - "`pics`.`uuid` AS `pic_uuid`, |
|
| 33 | + "`pics`.`uuid` AS `pic_uuid`, |
|
| 34 | 34 | `pics`.`url` AS `pic_url`, |
| 35 | 35 | `pics`.`title`, |
| 36 | 36 | `pics`.`date_created`, |
@@ -17,12 +17,12 @@ discard block |
||
| 17 | 17 | const FOR_STARTPAGE_GALLERY = 1; |
| 18 | 18 | const FOR_NEWPICS_GALLERY = 2; |
| 19 | 19 | const FOR_USER_STAT = 3; |
| 20 | - const FOR_USER_GALLERY = 4; // params: userid |
|
| 20 | + const FOR_USER_GALLERY = 4; // params: userid |
|
| 21 | 21 | const FOR_MYHOME_GALLERY = 5; |
| 22 | - const FOR_CACHE_STAT = 6; // params: cacheid |
|
| 23 | - const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
| 22 | + const FOR_CACHE_STAT = 6; // params: cacheid |
|
| 23 | + const FOR_CACHE_GALLERY = 7; // params: cacheid |
|
| 24 | 24 | |
| 25 | - const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
| 25 | + const MAX_PICTURES_PER_GALLERY_PAGE = 48; // must be multiple of 6 |
|
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | public static function get($purpose, $userid = 0, $cacheid = 0) |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $pictures = self::get($purpose, $userid, $cacheid); |
| 233 | 233 | $tpl->assign('pictures', array_slice($pictures, $startat, self::MAX_PICTURES_PER_GALLERY_PAGE)); |
| 234 | 234 | |
| 235 | - $pager = new pager($url . "&startat={offset}"); |
|
| 235 | + $pager = new pager($url."&startat={offset}"); |
|
| 236 | 236 | $pager->make_from_offset($startat, count($pictures), self::MAX_PICTURES_PER_GALLERY_PAGE); |
| 237 | 237 | } |
| 238 | 238 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // number of points in the polygon |
| 30 | 30 | $n = count($polygon); |
| 31 | 31 | $poly1 = $polygon[0]; |
| 32 | - for ($i = 1; $i <= $n; $i ++) { |
|
| 32 | + for ($i = 1; $i <= $n; $i++) { |
|
| 33 | 33 | $poly1XY = explode(' ', $poly1); |
| 34 | 34 | $poly1x = $poly1XY[0]; |
| 35 | 35 | $poly1y = $poly1XY[1]; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if ($poly1y != $poly2y) { |
| 45 | 45 | $xinters = ($py - $poly1y) * ($poly2x - $poly1x) / ($poly2y - $poly1y) + $poly1x; |
| 46 | 46 | if ($poly1x == $poly2x || $px <= $xinters) { |
| 47 | - $counter ++; |
|
| 47 | + $counter++; |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | } |