@@ -638,14 +638,14 @@ discard block |
||
| 638 | 638 | $PMF_LANG["ad_entry_visibility"] = "sichtbar"; |
| 639 | 639 | |
| 640 | 640 | // added v2.0.0 - 2006-01-02 by Lars |
| 641 | -$PMF_LANG["ad_user_error_password"] = "Bitte geben Sie ein Passwort ein. "; |
|
| 642 | -$PMF_LANG["ad_user_error_passwordsDontMatch"] = "Die Passwörter stimmen nicht überein. "; |
|
| 643 | -$PMF_LANG["ad_user_error_loginInvalid"] = "Der ausgewählte Benutzer ist ungültig."; |
|
| 644 | -$PMF_LANG["ad_user_error_noEmail"] = "Bitte geben Sie eine korrekte E-Mailadresse ein. "; |
|
| 645 | -$PMF_LANG["ad_user_error_noRealName"] = "Bitte geben Sie ihren Namen ein. "; |
|
| 646 | -$PMF_LANG["ad_user_error_delete"] = "Der Benutzeraccount kann nicht gelöscht werden. "; |
|
| 647 | -$PMF_LANG["ad_user_error_noId"] = "Keine ID ausgewählt. "; |
|
| 648 | -$PMF_LANG["ad_user_error_protectedAccount"] = "Der Benutzeraccount ist geschützt. "; |
|
| 641 | +$PMF_LANG["ad_user_error_password"] = "Bitte geben Sie ein Passwort ein. "; |
|
| 642 | +$PMF_LANG["ad_user_error_passwordsDontMatch"] = "Die Passwörter stimmen nicht überein. "; |
|
| 643 | +$PMF_LANG["ad_user_error_loginInvalid"] = "Der ausgewählte Benutzer ist ungültig."; |
|
| 644 | +$PMF_LANG["ad_user_error_noEmail"] = "Bitte geben Sie eine korrekte E-Mailadresse ein. "; |
|
| 645 | +$PMF_LANG["ad_user_error_noRealName"] = "Bitte geben Sie ihren Namen ein. "; |
|
| 646 | +$PMF_LANG["ad_user_error_delete"] = "Der Benutzeraccount kann nicht gelöscht werden. "; |
|
| 647 | +$PMF_LANG["ad_user_error_noId"] = "Keine ID ausgewählt. "; |
|
| 648 | +$PMF_LANG["ad_user_error_protectedAccount"] = "Der Benutzeraccount ist geschützt. "; |
|
| 649 | 649 | $PMF_LANG["ad_user_deleteUser"] = "Lösche Benutzer"; |
| 650 | 650 | $PMF_LANG["ad_user_status"] = "Status"; |
| 651 | 651 | $PMF_LANG["ad_user_lastModified"] = "Letzte Änderung:"; |
@@ -975,9 +975,9 @@ discard block |
||
| 975 | 975 | $PMF_LANG["ad_record_active"] = "aktiviert"; |
| 976 | 976 | |
| 977 | 977 | // added 2.6.0-alpha - 2009-11-02 by max |
| 978 | -$LANG_CONF["search.numberSearchTerms"] = array(0 => "input", 1 => "Anzahl der beliebtesten Suchbegriffe"); |
|
| 978 | +$LANG_CONF["search.numberSearchTerms"] = array(0 => "input", 1 => "Anzahl der beliebtesten Suchbegriffe"); |
|
| 979 | 979 | $LANG_CONF["records.orderingPopularFaqs"] = array(0 => "select", 1 => "Sortierung der TOP-FAQ"); |
| 980 | -$PMF_LANG["list_all_users"] = "Alle Benutzer anzeigen"; |
|
| 980 | +$PMF_LANG["list_all_users"] = "Alle Benutzer anzeigen"; |
|
| 981 | 981 | |
| 982 | 982 | $PMF_LANG["records.orderingPopularFaqs.visits"] = "nach Anzahl der Besucher"; |
| 983 | 983 | $PMF_LANG["records.orderingPopularFaqs.voting"] = "nach Bewertung der Besucher"; |
@@ -36,47 +36,47 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | switch ($ajaxAction) { |
| 38 | 38 | |
| 39 | - case 'upload': |
|
| 39 | + case 'upload': |
|
| 40 | 40 | |
| 41 | - $uploadDir = PMF_ROOT_DIR . '/images/'; |
|
| 42 | - $uploadFile = basename($_FILES['upload']['name']); |
|
| 43 | - $isUploaded = false; |
|
| 44 | - $height = $width = 0; |
|
| 45 | - $validFileExtensions = [ 'gif', 'jpg', 'jpeg', 'png' ]; |
|
| 41 | + $uploadDir = PMF_ROOT_DIR . '/images/'; |
|
| 42 | + $uploadFile = basename($_FILES['upload']['name']); |
|
| 43 | + $isUploaded = false; |
|
| 44 | + $height = $width = 0; |
|
| 45 | + $validFileExtensions = [ 'gif', 'jpg', 'jpeg', 'png' ]; |
|
| 46 | 46 | |
| 47 | - if ($csrfOkay) { |
|
| 48 | - if (is_uploaded_file($uploadedFile['tmp_name']) && |
|
| 49 | - $uploadedFile['size'] < $faqConfig->get('records.maxAttachmentSize') |
|
| 50 | - ) { |
|
| 47 | + if ($csrfOkay) { |
|
| 48 | + if (is_uploaded_file($uploadedFile['tmp_name']) && |
|
| 49 | + $uploadedFile['size'] < $faqConfig->get('records.maxAttachmentSize') |
|
| 50 | + ) { |
|
| 51 | 51 | |
| 52 | - $fileInfo = getimagesize($uploadedFile['tmp_name']); |
|
| 53 | - $fileExtension = pathinfo($uploadFile, PATHINFO_EXTENSION);; |
|
| 52 | + $fileInfo = getimagesize($uploadedFile['tmp_name']); |
|
| 53 | + $fileExtension = pathinfo($uploadFile, PATHINFO_EXTENSION);; |
|
| 54 | 54 | |
| 55 | - if (false === $fileInfo) { |
|
| 56 | - $isUploaded = false; |
|
| 57 | - } |
|
| 58 | - |
|
| 59 | - if (($fileInfo[2] !== IMAGETYPE_GIF) && |
|
| 60 | - ($fileInfo[2] !== IMAGETYPE_JPEG) && |
|
| 61 | - ($fileInfo[2] !== IMAGETYPE_PNG)) { |
|
| 62 | - $isUploaded = false; |
|
| 63 | - } else { |
|
| 64 | - $isUploaded = true; |
|
| 65 | - } |
|
| 66 | - |
|
| 67 | - if (!in_array($fileExtension, $validFileExtensions)) { |
|
| 68 | - $isUploaded = false; |
|
| 69 | - } |
|
| 55 | + if (false === $fileInfo) { |
|
| 56 | + $isUploaded = false; |
|
| 57 | + } |
|
| 70 | 58 | |
| 71 | - if ($fileInfo && $isUploaded) { |
|
| 72 | - list($width, $height) = $fileInfo; |
|
| 73 | - if (move_uploaded_file($uploadedFile['tmp_name'], $uploadDir . $uploadFile)) { |
|
| 74 | - $isUploaded = true; |
|
| 59 | + if (($fileInfo[2] !== IMAGETYPE_GIF) && |
|
| 60 | + ($fileInfo[2] !== IMAGETYPE_JPEG) && |
|
| 61 | + ($fileInfo[2] !== IMAGETYPE_PNG)) { |
|
| 62 | + $isUploaded = false; |
|
| 75 | 63 | } else { |
| 64 | + $isUploaded = true; |
|
| 65 | + } |
|
| 66 | + |
|
| 67 | + if (!in_array($fileExtension, $validFileExtensions)) { |
|
| 76 | 68 | $isUploaded = false; |
| 77 | 69 | } |
| 78 | - } |
|
| 79 | - ?> |
|
| 70 | + |
|
| 71 | + if ($fileInfo && $isUploaded) { |
|
| 72 | + list($width, $height) = $fileInfo; |
|
| 73 | + if (move_uploaded_file($uploadedFile['tmp_name'], $uploadDir . $uploadFile)) { |
|
| 74 | + $isUploaded = true; |
|
| 75 | + } else { |
|
| 76 | + $isUploaded = false; |
|
| 77 | + } |
|
| 78 | + } |
|
| 79 | + ?> |
|
| 80 | 80 | <script> |
| 81 | 81 | window.parent.window.pmfImageUpload.uploadFinished({ |
| 82 | 82 | filename: '<?php echo $faqConfig->getDefaultUrl() . 'images/' . $uploadFile ?>', |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | }); |
| 88 | 88 | </script> |
| 89 | 89 | <?php |
| 90 | - } else { |
|
| 91 | - ?> |
|
| 90 | + } else { |
|
| 91 | + ?> |
|
| 92 | 92 | <script> |
| 93 | 93 | window.parent.window.pmfImageUpload.uploadFinished({ |
| 94 | 94 | filename: '', |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | }); |
| 100 | 100 | </script> |
| 101 | 101 | <?php |
| 102 | - } |
|
| 103 | - } else { |
|
| 104 | - ?> |
|
| 102 | + } |
|
| 103 | + } else { |
|
| 104 | + ?> |
|
| 105 | 105 | <script> |
| 106 | 106 | window.parent.window.pmfImageUpload.uploadFinished({ |
| 107 | 107 | filename: '', |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | }); |
| 113 | 113 | </script> |
| 114 | 114 | <?php |
| 115 | - } |
|
| 115 | + } |
|
| 116 | 116 | |
| 117 | - break; |
|
| 117 | + break; |
|
| 118 | 118 | } |
| 119 | 119 | \ No newline at end of file |
@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | case 'upload': |
| 40 | 40 | |
| 41 | - $uploadDir = PMF_ROOT_DIR . '/images/'; |
|
| 41 | + $uploadDir = PMF_ROOT_DIR.'/images/'; |
|
| 42 | 42 | $uploadFile = basename($_FILES['upload']['name']); |
| 43 | 43 | $isUploaded = false; |
| 44 | 44 | $height = $width = 0; |
| 45 | - $validFileExtensions = [ 'gif', 'jpg', 'jpeg', 'png' ]; |
|
| 45 | + $validFileExtensions = ['gif', 'jpg', 'jpeg', 'png']; |
|
| 46 | 46 | |
| 47 | 47 | if ($csrfOkay) { |
| 48 | 48 | if (is_uploaded_file($uploadedFile['tmp_name']) && |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | ) { |
| 51 | 51 | |
| 52 | 52 | $fileInfo = getimagesize($uploadedFile['tmp_name']); |
| 53 | - $fileExtension = pathinfo($uploadFile, PATHINFO_EXTENSION);; |
|
| 53 | + $fileExtension = pathinfo($uploadFile, PATHINFO_EXTENSION); ; |
|
| 54 | 54 | |
| 55 | 55 | if (false === $fileInfo) { |
| 56 | 56 | $isUploaded = false; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | if ($fileInfo && $isUploaded) { |
| 72 | 72 | list($width, $height) = $fileInfo; |
| 73 | - if (move_uploaded_file($uploadedFile['tmp_name'], $uploadDir . $uploadFile)) { |
|
| 73 | + if (move_uploaded_file($uploadedFile['tmp_name'], $uploadDir.$uploadFile)) { |
|
| 74 | 74 | $isUploaded = true; |
| 75 | 75 | } else { |
| 76 | 76 | $isUploaded = false; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ?> |
| 80 | 80 | <script> |
| 81 | 81 | window.parent.window.pmfImageUpload.uploadFinished({ |
| 82 | - filename: '<?php echo $faqConfig->getDefaultUrl() . 'images/' . $uploadFile ?>', |
|
| 82 | + filename: '<?php echo $faqConfig->getDefaultUrl().'images/'.$uploadFile ?>', |
|
| 83 | 83 | result: '<?php echo $isUploaded ? 'file_uploaded' : 'error' ?>', |
| 84 | 84 | resultCode: '<?php echo $isUploaded ? 'success' : 'failed' ?>', |
| 85 | 85 | height: <?php echo $height ?>, |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | foreach ($attributes[0] as $attribute) { |
| 125 | 125 | $attributeName = stristr($attribute, '=', true); |
| 126 | 126 | if (!in_array($attributeName, $keep)) { |
| 127 | - $html = str_replace(' ' . $attribute, '', $html); |
|
| 127 | + $html = str_replace(' '.$attribute, '', $html); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | |
@@ -62,9 +62,12 @@ |
||
| 62 | 62 | <input type="hidden" name="showcat" value="<?php echo $showcat ?>"> |
| 63 | 63 | <?php if ($faqConfig->get('security.permLevel') !== 'basic'): ?> |
| 64 | 64 | <input type="hidden" name="restricted_groups[]" value="<?php echo $group_permission[0] ?>"> |
| 65 | - <?php else: ?> |
|
| 65 | + <?php else { |
|
| 66 | + : ?> |
|
| 66 | 67 | <input type="hidden" name="restricted_groups[]" value="-1"> |
| 67 | - <?php endif; ?> |
|
| 68 | + <?php endif; |
|
| 69 | +} |
|
| 70 | +?> |
|
| 68 | 71 | <input type="hidden" name="restricted_users" value="<?php echo $user_permission[0] ?>"> |
| 69 | 72 | <input type="hidden" name="csrf" value="<?php echo $user->getCsrfTokenFromSession() ?>"> |
| 70 | 73 | <input type="hidden" name="active" value="<?php echo $category->categoryName[$id]['active'] ?>"> |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | * @author Matteo Scaramuccia <[email protected]> |
| 16 | 16 | * @copyright 2009-2018 phpMyFAQ Team |
| 17 | 17 | * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
| 18 | - |
|
| 19 | 18 | * @link http://www.phpmyfaq.de |
| 20 | 19 | * @since 2009-09-24 |
| 21 | 20 | */ |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | if ('medium' === $this->_config->get('security.permLevel')) { |
| 125 | 125 | $groupPermissions = $this->faq->getPermission('group', $result->id); |
| 126 | 126 | if (is_array($groupPermissions)) { |
| 127 | - foreach($groupPermissions as $permission) { |
|
| 127 | + foreach ($groupPermissions as $permission) { |
|
| 128 | 128 | if (in_array($permission, $currentGroupIds)) { |
| 129 | 129 | $permission = true; |
| 130 | 130 | } |
@@ -222,6 +222,6 @@ discard block |
||
| 222 | 222 | $score += $object->relevance_keywords; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | - return round($score / 3 * 100); |
|
| 225 | + return round($score/3*100); |
|
| 226 | 226 | } |
| 227 | 227 | } |
@@ -295,7 +295,7 @@ |
||
| 295 | 295 | $result = $this->config->getDb()->query($query); |
| 296 | 296 | if ($this->config->getDb()->numRows($result) > 0) { |
| 297 | 297 | while ($row = $this->config->getDb()->fetchObject($result)) { |
| 298 | - $num[$row->id] = (int) $row->num_comments; |
|
| 298 | + $num[$row->id] = (int)$row->num_comments; |
|
| 299 | 299 | } |
| 300 | 300 | } |
| 301 | 301 | |
@@ -210,11 +210,11 @@ discard block |
||
| 210 | 210 | $fdTable.'.active AS active', |
| 211 | 211 | $fdTable.'.thema AS thema', |
| 212 | 212 | $fdTable.'.content AS content', |
| 213 | - $fdTable.'.updated AS updated', )) |
|
| 213 | + $fdTable.'.updated AS updated',)) |
|
| 214 | 214 | ->setJoinedTable($fcrTable) |
| 215 | 215 | ->setJoinedColumns(array( |
| 216 | 216 | $fdTable.'.id = '.$fcrTable.'.record_id', |
| 217 | - $fdTable.'.lang = '.$fcrTable.'.record_lang', )); |
|
| 217 | + $fdTable.'.lang = '.$fcrTable.'.record_lang',)); |
|
| 218 | 218 | |
| 219 | 219 | if (is_numeric($searchTerm)) { |
| 220 | 220 | $search->setMatchingColumns(array($fdTable.'.solution_id')); |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $faqsFound = []; |
| 231 | 231 | |
| 232 | 232 | while ($row = $faqConfig->getDb()->fetchObject($result)) { |
| 233 | - if ($searchCat != 0 && $searchCat != (int) $row->category_id) { |
|
| 233 | + if ($searchCat != 0 && $searchCat != (int)$row->category_id) { |
|
| 234 | 234 | continue; |
| 235 | 235 | } |
| 236 | 236 | |
@@ -405,7 +405,7 @@ discard block |
||
| 405 | 405 | <input type="checkbox" lang="<?php echo $record['lang'] ?>" |
| 406 | 406 | onclick="saveStatus(<?php echo $cid.', ['.$record['id'].']' ?>, 'sticky', '<?php echo $user->getCsrfTokenFromSession() ?>');" |
| 407 | 407 | id="sticky_record_<?php echo $cid.'_'.$record['id'] ?>" |
| 408 | - <?php echo($record['sticky'] ? 'checked' : ' ') ?>> |
|
| 408 | + <?php echo($record['sticky'] ? 'checked' : ' ') ?>> |
|
| 409 | 409 | </label> |
| 410 | 410 | </td> |
| 411 | 411 | <td> |