@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../Exception.php'; |
|
2 | +require_once __DIR__.'/../Exception.php'; |
|
3 | 3 | // adjusted path for OC distribution |
4 | 4 | |
5 | 5 | class Net_IDNA2_Exception_Nameprep extends Net_IDNA2_Exception |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function __construct($name) |
17 | 17 | { |
18 | 18 | global $opt; |
19 | - $this->pidfile_path = $opt['rootpath'] . "cache2/$name.pid"; |
|
19 | + $this->pidfile_path = $opt['rootpath']."cache2/$name.pid"; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | if (file_exists($this->pidfile_path)) { |
32 | - echo "Error: Pidfile (" . $this->pidfile_path . ") already present\n"; |
|
32 | + echo "Error: Pidfile (".$this->pidfile_path.") already present\n"; |
|
33 | 33 | |
34 | 34 | return false; |
35 | 35 | } else { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | return true; |
41 | 41 | } else { |
42 | - echo "can't create Pidfile " . $this->pidfile_path . "\n"; |
|
42 | + echo "can't create Pidfile ".$this->pidfile_path."\n"; |
|
43 | 43 | |
44 | 44 | return false; |
45 | 45 | } |
@@ -59,19 +59,19 @@ discard block |
||
59 | 59 | |
60 | 60 | // bad PID file, e.g. due to system malfunction while creating the file? |
61 | 61 | if ($pid_daemon <= 0) { |
62 | - echo "removing bad pid_file (" . $this->pidfile_path . ")\n"; |
|
62 | + echo "removing bad pid_file (".$this->pidfile_path.")\n"; |
|
63 | 63 | unlink($this->pidfile_path); |
64 | 64 | |
65 | 65 | return false; |
66 | 66 | } // process running? |
67 | 67 | elseif (posix_kill($pid_daemon, 0)) { |
68 | 68 | // yes, good bye |
69 | - echo "Error: process for " . $this->pidfile_path . " is already running with pid=$pid_daemon\n"; |
|
69 | + echo "Error: process for ".$this->pidfile_path." is already running with pid=$pid_daemon\n"; |
|
70 | 70 | |
71 | 71 | return false; |
72 | 72 | } else { |
73 | 73 | // no, remove pid_file |
74 | - echo "process not running, removing old pid_file (" . $this->pidfile_path . ")\n"; |
|
74 | + echo "process not running, removing old pid_file (".$this->pidfile_path.")\n"; |
|
75 | 75 | unlink($this->pidfile_path); |
76 | 76 | |
77 | 77 | return true; |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | unlink($this->pidfile_path); |
94 | 94 | } |
95 | 95 | } else { |
96 | - echo "Error: can't delete own pidfile (" . $this->pidfile_path . ")\n"; |
|
96 | + echo "Error: can't delete own pidfile (".$this->pidfile_path.")\n"; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | if ($message) { |
100 | - echo $message . "\n"; |
|
100 | + echo $message."\n"; |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 |
@@ -19,23 +19,23 @@ discard block |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | // chicken-egg problem ... |
22 | -require_once $opt['rootpath'] . 'lib2/const.inc.php'; |
|
22 | +require_once $opt['rootpath'].'lib2/const.inc.php'; |
|
23 | 23 | |
24 | 24 | // do all output in HTML format |
25 | 25 | $opt['gui'] = GUI_HTML; |
26 | 26 | |
27 | 27 | // include the main library |
28 | -require_once $opt['rootpath'] . 'lib2/common.inc.php'; |
|
28 | +require_once $opt['rootpath'].'lib2/common.inc.php'; |
|
29 | 29 | |
30 | 30 | // enforce http or https? |
31 | 31 | if ($opt['page']['https']['mode'] == HTTPS_DISABLED) { |
32 | 32 | if ($opt['page']['https']['active']) { |
33 | - $tpl->redirect('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
33 | + $tpl->redirect('http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); |
|
34 | 34 | } |
35 | 35 | $opt['page']['force_https_login'] = false; |
36 | 36 | } elseif ($opt['page']['https']['mode'] == HTTPS_ENFORCED) { |
37 | 37 | if (!$opt['page']['https']['active']) { |
38 | - $tpl->redirect('https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']); |
|
38 | + $tpl->redirect('https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']); |
|
39 | 39 | } |
40 | 40 | $opt['page']['force_https_login'] = true; |
41 | 41 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (substr($helppage, 0, 1) == "!") { |
84 | 84 | substr($helppage, 1); |
85 | 85 | } elseif ($helppage != "" && isset($opt['locale'][$help_locale]['helpwiki'])) { |
86 | - return $opt['locale'][$help_locale]['helpwiki'] . str_replace(' ', '_', $helppage); |
|
86 | + return $opt['locale'][$help_locale]['helpwiki'].str_replace(' ', '_', $helppage); |
|
87 | 87 | } else { |
88 | 88 | return ""; |
89 | 89 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | return ""; |
99 | 99 | } else { |
100 | 100 | $imgtitle = $translate->t($title, '', basename(__FILE__), __LINE__); |
101 | - $imgtitle = "alt='" . $imgtitle . "' title='" . $imgtitle . "'"; |
|
101 | + $imgtitle = "alt='".$imgtitle."' title='".$imgtitle."'"; |
|
102 | 102 | |
103 | - return "<a class='nooutline' href='" . $helpurl . "' " . $imgtitle . " target='_blank'>"; |
|
103 | + return "<a class='nooutline' href='".$helpurl."' ".$imgtitle." target='_blank'>"; |
|
104 | 104 | } |
105 | 105 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * Shortcut for cachelist search |
8 | 8 | ***************************************************************************/ |
9 | 9 | |
10 | -require __DIR__ . '/lib2/web.inc.php'; |
|
10 | +require __DIR__.'/lib2/web.inc.php'; |
|
11 | 11 | |
12 | 12 | $id = isset($_REQUEST['id']) ? $_REQUEST['id'] + 0 : 0; |
13 | 13 | $password = isset($_REQUEST['key']) ? $_REQUEST['key'] : ''; |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | - $tpl->redirect("search.php?searchto=searchbylist&listid=" . $id . |
|
37 | - ($password != "" ? "&listkey=" . urlencode($password) : "") . |
|
38 | - "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname" . $invalid_waypoints); |
|
36 | + $tpl->redirect("search.php?searchto=searchbylist&listid=".$id. |
|
37 | + ($password != "" ? "&listkey=".urlencode($password) : ""). |
|
38 | + "&showresult=1&f_disabled=0&f_inactive=0&f_ignored=1&sort=byname".$invalid_waypoints); |
|
39 | 39 | } else { |
40 | 40 | $tpl->redirect("cachelists.php"); |
41 | 41 | } |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require_once __DIR__ . '/./lib2/web.inc.php'; |
|
8 | +require_once __DIR__.'/./lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'mystatpic'; |
11 | 11 | $tpl->menuitem = MNU_MYPROFILE_DATA_STATPIC; |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'query'; |
11 | 11 | $tpl->menuitem = MNU_MYPROFILE_QUERIES; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if ($submit == true) { |
73 | 73 | $options = sql_value("SELECT `options` FROM `queries` WHERE `id`='&1'", false, $queryid); |
74 | 74 | if (!$options) { |
75 | - $tpl->error(ERROR_UNKNOWN); // query does not exist |
|
75 | + $tpl->error(ERROR_UNKNOWN); // query does not exist |
|
76 | 76 | } elseif ($sortby || $sortorder || $creationdate) { |
77 | 77 | $oa = unserialize($options); |
78 | 78 | if ($sortby) { |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'myprofile'; |
11 | 11 | $tpl->menuitem = MNU_MYPROFILE_DATA; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | if ($login->userid == 0) { |
21 | 21 | if ($action == 'change' || $action == 'changeemail') { |
22 | - $tpl->redirect('login.php?target=' . urlencode('myprofile.php?action=change')); |
|
22 | + $tpl->redirect('login.php?target='.urlencode('myprofile.php?action=change')); |
|
23 | 23 | } else { |
24 | 24 | $tpl->redirect('login.php?target=myprofile.php'); |
25 | 25 | } |
@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $cache_id = isset($_GET['cacheid']) ? $_GET['cacheid'] + 0 : 0; |
11 | 11 | $action = isset($_GET['action']) ? $_GET['action'] : ''; |
12 | -$target = isset($_GET['target']) ? $_GET['target'] : 'viewcache.php?cacheid=' . $cache_id; |
|
12 | +$target = isset($_GET['target']) ? $_GET['target'] : 'viewcache.php?cacheid='.$cache_id; |
|
13 | 13 | |
14 | 14 | $login->verify(); |
15 | 15 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $map_result_id = sql_value( |
42 | 42 | "SELECT `result_id` |
43 | 43 | FROM `map2_result` |
44 | - WHERE INSTR(sqlquery,\"`user_id`='" . sql_escape($login->userid) . "'\") |
|
44 | + WHERE INSTR(sqlquery,\"`user_id`='" . sql_escape($login->userid)."'\") |
|
45 | 45 | LIMIT 1", |
46 | 46 | 0 |
47 | 47 | ); |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | * Unicode Reminder メモ |
6 | 6 | ***************************************************************************/ |
7 | 7 | |
8 | -require __DIR__ . '/lib2/web.inc.php'; |
|
8 | +require __DIR__.'/lib2/web.inc.php'; |
|
9 | 9 | |
10 | 10 | $tpl->name = 'mailto'; |
11 | 11 | $tpl->menuitem = MNU_USER_MAILTO; |
12 | 12 | |
13 | 13 | $login->verify(); |
14 | 14 | if ($login->userid == 0) { |
15 | - $tpl->redirect('login.php?target=' . urlencode($tpl->target)); |
|
15 | + $tpl->redirect('login.php?target='.urlencode($tpl->target)); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | $userid = isset($_REQUEST['userid']) ? $_REQUEST['userid'] + 0 : 0; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $wp = $_REQUEST['wp']; |
37 | 37 | $cachename = trim(sql_value("SELECT `name` FROM `caches` WHERE `wp_oc`='&1'", '', $wp)); |
38 | 38 | if ($cachename) { |
39 | - $subject = $translate->t('Your geocache', '', 0, 0) . ' "' . $cachename . '" (' . $wp . ')'; |
|
39 | + $subject = $translate->t('Your geocache', '', 0, 0).' "'.$cachename.'" ('.$wp.')'; |
|
40 | 40 | } |
41 | 41 | } elseif (isset($_REQUEST['reportid']) && $login->admin) { |
42 | 42 | $rs = sql( |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $_REQUEST['reportid'] |
48 | 48 | ); |
49 | 49 | if ($r = sql_fetch_assoc($rs)) { |
50 | - $subject = $translate->t('Your geocache report for', '', 0, 0) . ' ' . $r['wp_oc'] . ' (' . $r['name'] . ')'; |
|
50 | + $subject = $translate->t('Your geocache report for', '', 0, 0).' '.$r['wp_oc'].' ('.$r['name'].')'; |
|
51 | 51 | } |
52 | 52 | sql_free_result($rs); |
53 | 53 | } |