@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $tpl->parse( |
80 | 80 | 'writeContent', |
81 | 81 | array( |
82 | - 'categoryHeader' => $PMF_LANG['msgEntriesIn'] . $catName, |
|
82 | + 'categoryHeader' => $PMF_LANG['msgEntriesIn'].$catName, |
|
83 | 83 | 'categoryDescription' => $catDescription, |
84 | 84 | 'categoryFaqsHeader' => $PMF_LANG['msgEntries'], |
85 | 85 | 'categoryContent' => $records, |
@@ -224,7 +224,7 @@ |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'), |
227 | - $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals); |
|
227 | + $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals); |
|
228 | 228 | |
229 | 229 | $retval = @file_put_contents(PMF_ROOT_DIR.'/lang/language_'.strtolower($langCode).'.php', $fileTpl); |
230 | 230 | echo intval($retval); |
@@ -22,10 +22,10 @@ discard block |
||
22 | 22 | |
23 | 23 | if (!defined('IS_VALID_PHPMYFAQ')) { |
24 | 24 | $protocol = 'http'; |
25 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
25 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
26 | 26 | $protocol = 'https'; |
27 | 27 | } |
28 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
28 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
29 | 29 | exit(); |
30 | 30 | } |
31 | 31 | |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | if (is_string($val)) { |
45 | 45 | $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val); |
46 | 46 | $val = str_replace("'", "\\'", $val); |
47 | - $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"] = $val; |
|
47 | + $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"] = $val; |
|
48 | 48 | } elseif (is_array($val)) { |
49 | 49 | /** |
50 | 50 | * Here we deal with a two dimensional array |
@@ -59,13 +59,13 @@ discard block |
||
59 | 59 | |
60 | 60 | foreach ((array)@$_POST['LANG_CONF'] as $key => $val) { |
61 | 61 | // if string like array(blah-blah-blah), extract the contents inside the brackets |
62 | - if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/',$val,$matches1)) { |
|
62 | + if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/', $val, $matches1)) { |
|
63 | 63 | // split the resulting string of delimiters such as "number =>" |
64 | 64 | $valArr = preg_split( |
65 | 65 | '/\s*(\d+)\s*\=\>\s*/', |
66 | 66 | $matches1[1], |
67 | 67 | null, |
68 | - PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY |
|
68 | + PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY |
|
69 | 69 | ); |
70 | 70 | // in an array $valArr contents like "number substring", "substring", "number substring", "substring", ... |
71 | 71 | $numVal = count($valArr); |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | } |
85 | 85 | } |
86 | 86 | } |
87 | - $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ",$newValArr).')'; |
|
87 | + $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ", $newValArr).')'; |
|
88 | 88 | } |
89 | 89 | } else { // compatibility for old behavior |
90 | 90 | $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val); |
91 | 91 | $val = str_replace("'", "\\'", $val); |
92 | - $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = $val; |
|
92 | + $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = $val; |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | |
@@ -104,14 +104,14 @@ discard block |
||
104 | 104 | } |
105 | 105 | |
106 | 106 | $lang = strtolower($_SESSION['trans']['rightVarsOnly']["PMF_LANG[metaLanguage]"]); |
107 | - $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php"; |
|
107 | + $filename = PMF_ROOT_DIR."/lang/language_".$lang.".php"; |
|
108 | 108 | |
109 | - if (!is_writable(PMF_ROOT_DIR . "/lang")) { |
|
109 | + if (!is_writable(PMF_ROOT_DIR."/lang")) { |
|
110 | 110 | $response->setData(0); |
111 | 111 | break; |
112 | 112 | } |
113 | 113 | |
114 | - if (!copy($filename, PMF_ROOT_DIR . "/lang/language_$lang.bak.php")) { |
|
114 | + if (!copy($filename, PMF_ROOT_DIR."/lang/language_$lang.bak.php")) { |
|
115 | 115 | $response->setData(0); |
116 | 116 | break; |
117 | 117 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | if (0 === strpos($key, 'PMF_LANG')) { |
134 | 134 | $val = "'$val'"; |
135 | 135 | } |
136 | - array_push($tmpLines, '$' . str_replace(array('[', ']'), array("['", "']"), $key) . " = $val;"); |
|
136 | + array_push($tmpLines, '$'.str_replace(array('[', ']'), array("['", "']"), $key)." = $val;"); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | $newFileContents .= implode("\n", $tmpLines); |
@@ -153,17 +153,17 @@ discard block |
||
153 | 153 | |
154 | 154 | $lang = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING); |
155 | 155 | |
156 | - if (!is_writable(PMF_ROOT_DIR . "/lang")) { |
|
156 | + if (!is_writable(PMF_ROOT_DIR."/lang")) { |
|
157 | 157 | $response->setData(0); |
158 | 158 | break; |
159 | 159 | } |
160 | 160 | |
161 | - if (!copy(PMF_ROOT_DIR . "/lang/language_$lang.php", PMF_ROOT_DIR . "/lang/language_$lang.bak.php")) { |
|
161 | + if (!copy(PMF_ROOT_DIR."/lang/language_$lang.php", PMF_ROOT_DIR."/lang/language_$lang.bak.php")) { |
|
162 | 162 | $response->setData(0); |
163 | 163 | break; |
164 | 164 | } |
165 | 165 | |
166 | - if (!unlink(PMF_ROOT_DIR . "/lang/language_$lang.php")) { |
|
166 | + if (!unlink(PMF_ROOT_DIR."/lang/language_$lang.php")) { |
|
167 | 167 | $response->setData(0); |
168 | 168 | break; |
169 | 169 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | break; |
179 | 179 | } |
180 | 180 | |
181 | - if (!is_writable(PMF_ROOT_DIR . "/lang")) { |
|
181 | + if (!is_writable(PMF_ROOT_DIR."/lang")) { |
|
182 | 182 | $response->setData(0); |
183 | 183 | break; |
184 | 184 | } |
@@ -187,17 +187,17 @@ discard block |
||
187 | 187 | $langName = @$languageCodes[$langCode]; |
188 | 188 | $langCharset = "UTF-8"; |
189 | 189 | $langDir = PMF_Filter::filterInput(INPUT_POST, 'langdir', FILTER_SANITIZE_STRING); |
190 | - $langNPlurals= strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1)); |
|
190 | + $langNPlurals = strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1)); |
|
191 | 191 | $langDesc = PMF_Filter::filterInput(INPUT_POST, 'langdesc', FILTER_SANITIZE_STRING); |
192 | - $author = (array) @$_POST['author']; |
|
192 | + $author = (array)@$_POST['author']; |
|
193 | 193 | |
194 | - if(empty($langCode) || empty($langName) || empty($langCharset) || |
|
194 | + if (empty($langCode) || empty($langName) || empty($langCharset) || |
|
195 | 195 | empty($langDir) || empty($langDesc) || empty($author)) { |
196 | 196 | $response->setData(0); |
197 | 197 | break; |
198 | 198 | } |
199 | 199 | |
200 | - $fileTpl = <<<FILE |
|
200 | + $fileTpl = <<<FILE |
|
201 | 201 | <?php |
202 | 202 | /** |
203 | 203 | * %s |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'), |
232 | 232 | $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals); |
233 | 233 | |
234 | - $retval = @file_put_contents(PMF_ROOT_DIR . '/lang/language_' . strtolower($langCode) . '.php', $fileTpl); |
|
234 | + $retval = @file_put_contents(PMF_ROOT_DIR.'/lang/language_'.strtolower($langCode).'.php', $fileTpl); |
|
235 | 235 | $response->setData(intval($retval)); |
236 | 236 | break; |
237 | 237 | |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | case 'send_translated_file': |
240 | 240 | |
241 | 241 | $lang = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING); |
242 | - $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php"; |
|
242 | + $filename = PMF_ROOT_DIR."/lang/language_".$lang.".php"; |
|
243 | 243 | |
244 | 244 | if (!file_exists($filename)) { |
245 | 245 | $response->setData(0); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $mail->addTo('[email protected]'); |
259 | 259 | $mail->addAttachment($filename, null, 'text/plain'); |
260 | 260 | |
261 | - $response->setData((int) $mail->send()); |
|
261 | + $response->setData((int)$mail->send()); |
|
262 | 262 | break; |
263 | 263 | } |
264 | 264 |
@@ -367,8 +367,8 @@ |
||
367 | 367 | define('PMF_GET_KEY_NAME_LANGUAGE', 'lang'); |
368 | 368 | define('PMF_GET_KEY_NAME_SESSIONID', 'sid'); |
369 | 369 | // Misc parameters |
370 | -define('PMF_LANGUAGE_EXPIRED_TIME', 3600); // 30 minutes |
|
371 | -define('PMF_SESSION_EXPIRED_TIME', 3600); // 30 minutes |
|
370 | +define('PMF_LANGUAGE_EXPIRED_TIME', 3600); // 30 minutes |
|
371 | +define('PMF_SESSION_EXPIRED_TIME', 3600); // 30 minutes |
|
372 | 372 | define('PMF_REMEMBERME_EXPIRED_TIME', 1209600); // 2 weeks |
373 | 373 | |
374 | 374 | // |
@@ -664,14 +664,14 @@ |
||
664 | 664 | $PMF_LANG['ad_entry_visibility'] = 'Objavi?'; |
665 | 665 | |
666 | 666 | // added v2.0.0 - 2006-01-02 by Lars |
667 | -$PMF_LANG['ad_user_error_password'] = "Molimo unesite lozinku. "; |
|
668 | -$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Lozinke se ne poklapaju. "; |
|
669 | -$PMF_LANG['ad_user_error_loginInvalid'] = "Unešeno korisničko ime nije nađeno."; |
|
670 | -$PMF_LANG['ad_user_error_noEmail'] = "Unesite važeću email adresu. "; |
|
671 | -$PMF_LANG['ad_user_error_noRealName'] = "Unesite Vaše pravo ime. "; |
|
672 | -$PMF_LANG['ad_user_error_delete'] = "Korisnički nalog ne može biti izbrisan. "; |
|
673 | -$PMF_LANG['ad_user_error_noId'] = "Nije priložen ID. "; |
|
674 | -$PMF_LANG['ad_user_error_protectedAccount'] = "Korisnički nalog je zaštićen. "; |
|
667 | +$PMF_LANG['ad_user_error_password'] = "Molimo unesite lozinku. "; |
|
668 | +$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Lozinke se ne poklapaju. "; |
|
669 | +$PMF_LANG['ad_user_error_loginInvalid'] = "Unešeno korisničko ime nije nađeno."; |
|
670 | +$PMF_LANG['ad_user_error_noEmail'] = "Unesite važeću email adresu. "; |
|
671 | +$PMF_LANG['ad_user_error_noRealName'] = "Unesite Vaše pravo ime. "; |
|
672 | +$PMF_LANG['ad_user_error_delete'] = "Korisnički nalog ne može biti izbrisan. "; |
|
673 | +$PMF_LANG['ad_user_error_noId'] = "Nije priložen ID. "; |
|
674 | +$PMF_LANG['ad_user_error_protectedAccount'] = "Korisnički nalog je zaštićen. "; |
|
675 | 675 | $PMF_LANG['ad_user_deleteUser'] = "Obriši korisnika"; |
676 | 676 | $PMF_LANG['ad_user_status'] = "Status:"; |
677 | 677 | $PMF_LANG['ad_user_lastModified'] = "zadnji put menjano:"; |
@@ -20,10 +20,10 @@ |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 |
@@ -19,16 +19,16 @@ |
||
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
23 | 23 | $protocol = 'https'; |
24 | 24 | } |
25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | 26 | exit(); |
27 | 27 | } |
28 | 28 | |
29 | 29 | $faqsession->userTracking('open_questions', 0); |
30 | 30 | |
31 | -$tpl->parse ( |
|
31 | +$tpl->parse( |
|
32 | 32 | 'writeContent', |
33 | 33 | array( |
34 | 34 | 'msgOpenQuestions' => $PMF_LANG['msgOpenQuestions'], |
@@ -20,10 +20,10 @@ |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 |
@@ -20,10 +20,10 @@ |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 |
@@ -20,10 +20,10 @@ |
||
20 | 20 | |
21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
22 | 22 | $protocol = 'http'; |
23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
24 | 24 | $protocol = 'https'; |
25 | 25 | } |
26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
27 | 27 | exit(); |
28 | 28 | } |
29 | 29 |