@@ -471,7 +471,7 @@ |
||
471 | 471 | </td> |
472 | 472 | <td> |
473 | 473 | <?php if ($user->perm->checkRight($user->getUserId(), |
474 | - 'approverec') && isset($numVisits[$record['id']])) { ?> |
|
474 | + 'approverec') && isset($numVisits[$record['id']])) { ?> |
|
475 | 475 | <label> |
476 | 476 | <input type="checkbox" lang="<?= $record['lang'] ?>" |
477 | 477 | onclick="saveStatus(<?= $cid . ', [' . $record['id'] . ']' ?>, 'active', '<?= $user->getCsrfTokenFromSession() ?>');" |
@@ -233,11 +233,11 @@ discard block |
||
233 | 233 | $fdTable.'.active AS active', |
234 | 234 | $fdTable.'.thema AS thema', |
235 | 235 | $fdTable.'.content AS content', |
236 | - $fdTable.'.updated AS updated', )) |
|
236 | + $fdTable.'.updated AS updated',)) |
|
237 | 237 | ->setJoinedTable($fcrTable) |
238 | 238 | ->setJoinedColumns(array( |
239 | 239 | $fdTable.'.id = '.$fcrTable.'.record_id', |
240 | - $fdTable.'.lang = '.$fcrTable.'.record_lang', )); |
|
240 | + $fdTable.'.lang = '.$fcrTable.'.record_lang',)); |
|
241 | 241 | |
242 | 242 | if (is_numeric($searchTerm)) { |
243 | 243 | $search->setMatchingColumns(array($fdTable.'.solution_id')); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | $faqsFound = array(); |
254 | 254 | |
255 | 255 | while ($row = $faqConfig->getDb()->fetchObject($result)) { |
256 | - if ($searchCat != 0 && $searchCat != (int) $row->category_id) { |
|
256 | + if ($searchCat != 0 && $searchCat != (int)$row->category_id) { |
|
257 | 257 | continue; |
258 | 258 | } |
259 | 259 | |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | <?php |
414 | 414 | } |
415 | 415 | ?> |
416 | - <tr id="record_<?= $record['id'] . '_' . $record['lang'] ?>"> |
|
416 | + <tr id="record_<?= $record['id'].'_'.$record['lang'] ?>"> |
|
417 | 417 | <td style="width: 24px; text-align: right;"> |
418 | 418 | <a href="?action=editentry&id=<?= $record['id'] ?>&lang=<?= $record['lang'] ?>"> |
419 | 419 | <?= $record['id'] ?> |
@@ -464,8 +464,8 @@ discard block |
||
464 | 464 | <td style="width: 56px;"> |
465 | 465 | <label> |
466 | 466 | <input type="checkbox" lang="<?= $record['lang'] ?>" |
467 | - onclick="saveStatus(<?= $cid . ', [' . $record['id'] . ']' ?>, 'sticky', '<?= $user->getCsrfTokenFromSession() ?>');" |
|
468 | - id="sticky_record_<?= $cid . '_' . $record['id'] ?>" |
|
467 | + onclick="saveStatus(<?= $cid.', ['.$record['id'].']' ?>, 'sticky', '<?= $user->getCsrfTokenFromSession() ?>');" |
|
468 | + id="sticky_record_<?= $cid.'_'.$record['id'] ?>" |
|
469 | 469 | <?= $record['sticky'] ? 'checked' : ' ' ?>> |
470 | 470 | </label> |
471 | 471 | </td> |
@@ -474,8 +474,8 @@ discard block |
||
474 | 474 | 'approverec') && isset($numVisits[$record['id']])) { ?> |
475 | 475 | <label> |
476 | 476 | <input type="checkbox" lang="<?= $record['lang'] ?>" |
477 | - onclick="saveStatus(<?= $cid . ', [' . $record['id'] . ']' ?>, 'active', '<?= $user->getCsrfTokenFromSession() ?>');" |
|
478 | - id="active_record_<?= $cid . '_' . $record['id'] ?>" |
|
477 | + onclick="saveStatus(<?= $cid.', ['.$record['id'].']' ?>, 'active', '<?= $user->getCsrfTokenFromSession() ?>');" |
|
478 | + id="active_record_<?= $cid.'_'.$record['id'] ?>" |
|
479 | 479 | <?= 'yes' == $record['active'] ? 'checked' : ' ' ?>> |
480 | 480 | </label> |
481 | 481 | <?php } else { ?> |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | if ('' === $categoryId) { |
534 | 534 | $categoryId = 0; |
535 | 535 | } |
536 | - echo ' id_map[' . $categoryId . '] = [' . implode(',', $recordIds) . "];\n"; |
|
536 | + echo ' id_map['.$categoryId.'] = ['.implode(',', $recordIds)."];\n"; |
|
537 | 537 | } |
538 | 538 | ?> |
539 | 539 | for (let i = 0; i < id_map[id].length; i++) { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | } |
146 | 146 | if (!is_null($translateTo)) { |
147 | - $faqData['lang'] = $translateTo; |
|
147 | + $faqData['lang'] = $translateTo; |
|
148 | 148 | } |
149 | 149 | } elseif ('copyentry' === $action) { |
150 | 150 | $faqData['id'] = Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); |
@@ -295,9 +295,9 @@ discard block |
||
295 | 295 | <div class="tab-pane active" id="tab-question-answer"> |
296 | 296 | <!-- Revision --> |
297 | 297 | <?php |
298 | - if ($user->perm->checkRight($currentUserId, 'changebtrevs')) { |
|
299 | - $revisions = $faq->getRevisionIds($faqData['id'], $faqData['lang']); |
|
300 | - if (count($revisions)) { ?> |
|
298 | + if ($user->perm->checkRight($currentUserId, 'changebtrevs')) { |
|
299 | + $revisions = $faq->getRevisionIds($faqData['id'], $faqData['lang']); |
|
300 | + if (count($revisions)) { ?> |
|
301 | 301 | <div class="form-group"> |
302 | 302 | <form id="selectRevision" name="selectRevision" method="post" accept-charset="utf-8" |
303 | 303 | action="?action=editentry&id=<?= $faqData['id'] ?>&lang=<?= $faqData['lang'] ?>"> |
@@ -307,17 +307,17 @@ discard block |
||
307 | 307 | </option> |
308 | 308 | <?php foreach ($revisions as $revisionId => $revisionData) { ?> |
309 | 309 | <option value="<?= $revisionData['revision_id'] ?>" <?php if ($selectedRevisionId == $revisionData['revision_id']) { |
310 | - echo 'selected'; |
|
311 | - } |
|
312 | - ?>> |
|
310 | + echo 'selected'; |
|
311 | + } |
|
312 | + ?>> |
|
313 | 313 | <?php printf( |
314 | - '%s 1.%d: %s - %s', |
|
315 | - $PMF_LANG['ad_entry_revision'], |
|
316 | - $revisionData['revision_id'], |
|
317 | - Date::createIsoDate($revisionData['updated']), |
|
318 | - $revisionData['author'] |
|
319 | - ); |
|
320 | - ?> |
|
314 | + '%s 1.%d: %s - %s', |
|
315 | + $PMF_LANG['ad_entry_revision'], |
|
316 | + $revisionData['revision_id'], |
|
317 | + Date::createIsoDate($revisionData['updated']), |
|
318 | + $revisionData['author'] |
|
319 | + ); |
|
320 | + ?> |
|
321 | 321 | </option> |
322 | 322 | <?php |
323 | 323 | } |
@@ -326,15 +326,15 @@ discard block |
||
326 | 326 | </form> |
327 | 327 | </div> |
328 | 328 | <?php } |
329 | - if (isset($selectedRevisionId) && |
|
329 | + if (isset($selectedRevisionId) && |
|
330 | 330 | isset($faqData['revision_id']) && |
331 | 331 | $selectedRevisionId != $faqData['revision_id']) { |
332 | - $faq->language = $faqData['lang']; |
|
333 | - $faq->getRecord($faqData['id'], $selectedRevisionId, true); |
|
334 | - $faqData = $faq->faqRecord; |
|
335 | - $faqData['tags'] = implode(',', $tagging->getAllTagsById($faqData['id'])); |
|
336 | - } |
|
337 | - } ?> |
|
332 | + $faq->language = $faqData['lang']; |
|
333 | + $faq->getRecord($faqData['id'], $selectedRevisionId, true); |
|
334 | + $faqData = $faq->faqRecord; |
|
335 | + $faqData['tags'] = implode(',', $tagging->getAllTagsById($faqData['id'])); |
|
336 | + } |
|
337 | + } ?> |
|
338 | 338 | |
339 | 339 | <!-- Question --> |
340 | 340 | <div class="form-group"> |
@@ -398,24 +398,24 @@ discard block |
||
398 | 398 | <div class="col-lg-10"> |
399 | 399 | <ul class="list-unstyled adminAttachments"> |
400 | 400 | <?php |
401 | - $attList = Factory::fetchByRecordId($faqConfig, $faqData['id']); |
|
402 | - foreach ($attList as $att) { |
|
403 | - printf( |
|
404 | - '<li><a href="../%s">%s</a> ', |
|
405 | - $att->buildUrl(), |
|
406 | - $att->getFilename() |
|
407 | - ); |
|
408 | - if ($user->perm->checkRight($currentUserId, 'delattachment')) { |
|
409 | - printf( |
|
410 | - '<a class="badge badge-danger" href="?action=delatt&record_id=%d&id=%d&lang=%s"><i aria-hidden="true" class="fas fa-trash"></i></a>', |
|
411 | - $faqData['id'], |
|
412 | - $att->getId(), |
|
413 | - $faqData['lang'] |
|
414 | - ); |
|
415 | - } |
|
416 | - echo "</li>\n"; |
|
417 | - } |
|
418 | - ?> |
|
401 | + $attList = Factory::fetchByRecordId($faqConfig, $faqData['id']); |
|
402 | + foreach ($attList as $att) { |
|
403 | + printf( |
|
404 | + '<li><a href="../%s">%s</a> ', |
|
405 | + $att->buildUrl(), |
|
406 | + $att->getFilename() |
|
407 | + ); |
|
408 | + if ($user->perm->checkRight($currentUserId, 'delattachment')) { |
|
409 | + printf( |
|
410 | + '<a class="badge badge-danger" href="?action=delatt&record_id=%d&id=%d&lang=%s"><i aria-hidden="true" class="fas fa-trash"></i></a>', |
|
411 | + $faqData['id'], |
|
412 | + $att->getId(), |
|
413 | + $faqData['lang'] |
|
414 | + ); |
|
415 | + } |
|
416 | + echo "</li>\n"; |
|
417 | + } |
|
418 | + ?> |
|
419 | 419 | </ul> |
420 | 420 | <?php |
421 | 421 | printf( |
@@ -496,12 +496,12 @@ discard block |
||
496 | 496 | </label> |
497 | 497 | <select name="restricted_groups[]" size="3" class="form-control" multiple> |
498 | 498 | <?php |
499 | - if ( $faqConfig->get('main.enableCategoryRestrictions')) { |
|
500 | - echo $user->perm->getAllGroupsOptions($groupPermission, $currentUserId); |
|
501 | - } else { |
|
502 | - echo $user->perm->getAllGroupsOptions($groupPermission); |
|
503 | - } |
|
504 | - ?> |
|
499 | + if ( $faqConfig->get('main.enableCategoryRestrictions')) { |
|
500 | + echo $user->perm->getAllGroupsOptions($groupPermission, $currentUserId); |
|
501 | + } else { |
|
502 | + echo $user->perm->getAllGroupsOptions($groupPermission); |
|
503 | + } |
|
504 | + ?> |
|
505 | 505 | </select> |
506 | 506 | </div> |
507 | 507 | </div> |
@@ -598,19 +598,19 @@ discard block |
||
598 | 598 | </div> |
599 | 599 | <div class="col-lg-10"> |
600 | 600 | <?php foreach ($faq->getChangeEntries($faqData['id']) as $entry) { |
601 | - $entryUser = new User($faqConfig); |
|
602 | - $entryUser->getUserById($entry['user']); |
|
603 | - ?> |
|
601 | + $entryUser = new User($faqConfig); |
|
602 | + $entryUser->getUserById($entry['user']); |
|
603 | + ?> |
|
604 | 604 | <p class="small pt-0"> |
605 | 605 | <?php printf( |
606 | - '%s 1.%d | %s | %s %s', |
|
607 | - $PMF_LANG['ad_entry_revision'], |
|
608 | - $entry['revision_id'], |
|
609 | - $date->format(date('Y-m-d H:i', $entry['date'])), |
|
610 | - $PMF_LANG['ad_entry_author'], |
|
611 | - $entryUser->getUserData('display_name') |
|
612 | - ); |
|
613 | - ?> |
|
606 | + '%s 1.%d | %s | %s %s', |
|
607 | + $PMF_LANG['ad_entry_revision'], |
|
608 | + $entry['revision_id'], |
|
609 | + $date->format(date('Y-m-d H:i', $entry['date'])), |
|
610 | + $PMF_LANG['ad_entry_author'], |
|
611 | + $entryUser->getUserData('display_name') |
|
612 | + ); |
|
613 | + ?> |
|
614 | 614 | <br> |
615 | 615 | <?= $entry['changelog'] ?> |
616 | 616 | </p> |
@@ -705,16 +705,16 @@ discard block |
||
705 | 705 | <!-- active or not --> |
706 | 706 | <?php if ($user->perm->checkRight($currentUserId, 'approverec')): |
707 | 707 | if (isset($faqData['active']) && $faqData['active'] == 'yes') { |
708 | - $suf = ' checked'; |
|
709 | - $sul = null; |
|
710 | - } elseif ($faqConfig->get('records.defaultActivation')) { |
|
711 | - $suf = ' checked'; |
|
712 | - $sul = null; |
|
713 | - } else { |
|
714 | - $suf = null; |
|
715 | - $sul = ' checked'; |
|
716 | - } |
|
717 | - ?> |
|
708 | + $suf = ' checked'; |
|
709 | + $sul = null; |
|
710 | + } elseif ($faqConfig->get('records.defaultActivation')) { |
|
711 | + $suf = ' checked'; |
|
712 | + $sul = null; |
|
713 | + } else { |
|
714 | + $suf = null; |
|
715 | + $sul = ' checked'; |
|
716 | + } |
|
717 | + ?> |
|
718 | 718 | <div class="form-check"> |
719 | 719 | <input type="radio" id="active" name="active" value="yes" class="form-check-input" |
720 | 720 | <?php if (isset($suf)) { echo $suf; } ?>> |
@@ -855,10 +855,10 @@ discard block |
||
855 | 855 | <!-- Attachment Upload Dialog --> |
856 | 856 | <?php |
857 | 857 | if (0 === $faqData['id']) { |
858 | - $faqData['id'] = $faqConfig->getDb()->nextId( |
|
858 | + $faqData['id'] = $faqConfig->getDb()->nextId( |
|
859 | 859 | Db::getTablePrefix().'faqdata', |
860 | 860 | 'id' |
861 | - ); |
|
861 | + ); |
|
862 | 862 | } |
863 | 863 | ?> |
864 | 864 | <div class="modal fade" id="attachmentModal" tabindex="-1" role="dialog" aria-labelledby="attachmentModalLabel" aria-hidden="true"> |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $queryString = 'saveentry&id='.$faqData['id']; |
140 | 140 | } else { |
141 | 141 | $queryString = 'insertentry'; |
142 | - if (isset($categoryId)){ |
|
142 | + if (isset($categoryId)) { |
|
143 | 143 | $categories = ['category_id' => $categoryId, 'category_lang' => $lang]; |
144 | 144 | } |
145 | 145 | } |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | </label> |
497 | 497 | <select name="restricted_groups[]" size="3" class="form-control" multiple> |
498 | 498 | <?php |
499 | - if ( $faqConfig->get('main.enableCategoryRestrictions')) { |
|
499 | + if ($faqConfig->get('main.enableCategoryRestrictions')) { |
|
500 | 500 | echo $user->perm->getAllGroupsOptions($groupPermission, $currentUserId); |
501 | 501 | } else { |
502 | 502 | echo $user->perm->getAllGroupsOptions($groupPermission); |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | <div class="modal-header"> |
868 | 868 | <h5 class="modal-title" id="attachmentModalLabel"> |
869 | 869 | <?= $PMF_LANG['ad_att_addto'].' '.$PMF_LANG['ad_att_addto_2'] ?> |
870 | - (max <?= round($faqConfig->get('records.maxAttachmentSize') / pow(1024, 2), 2) ?> MB) |
|
870 | + (max <?= round($faqConfig->get('records.maxAttachmentSize')/pow(1024, 2), 2) ?> MB) |
|
871 | 871 | </h5> |
872 | 872 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
873 | 873 | <span aria-hidden="true">×</span> |
@@ -507,9 +507,12 @@ discard block |
||
507 | 507 | </div> |
508 | 508 | </div> |
509 | 509 | </fieldset> |
510 | - <?php else: ?> |
|
510 | + <?php else { |
|
511 | + : ?> |
|
511 | 512 | <input type="hidden" name="grouppermission" value="all"> |
512 | - <?php endif; ?> |
|
513 | + <?php endif; |
|
514 | +} |
|
515 | +?> |
|
513 | 516 | |
514 | 517 | <fieldset class="form-group"> |
515 | 518 | <div class="row"> |
@@ -725,12 +728,15 @@ discard block |
||
725 | 728 | <?php if (isset($sul)) { echo $sul; } ?>> |
726 | 729 | <label class="form-check-label" for="inactive"><?= $PMF_LANG['ad_gen_no'] ?></label> |
727 | 730 | </div> |
728 | - <?php else: ?> |
|
731 | + <?php else { |
|
732 | + : ?> |
|
729 | 733 | <div class="form-check"> |
730 | 734 | <input type="radio" id="inactive" name="active" value="no" class="form-check-input" checked> |
731 | 735 | <label class="form-check-label" for="inactive"><?= $PMF_LANG['ad_gen_no'] ?></label> |
732 | 736 | </div> |
733 | - <?php endif; ?> |
|
737 | + <?php endif; |
|
738 | +} |
|
739 | +?> |
|
734 | 740 | </div> |
735 | 741 | |
736 | 742 | <div class="form-group"> |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | <i aria-hidden="true" class="fas fa-folder-plus"></i> <?= $PMF_LANG['ad_kateg_add']; ?> |
40 | 40 | </a> |
41 | 41 | <a class="btn btn-sm btn-outline-info" href="?action=showcategory"> |
42 | - <i aria-hidden="true" class="fas fa-list"></i> <?= $PMF_LANG['ad_categ_show'];?> |
|
42 | + <i aria-hidden="true" class="fas fa-list"></i> <?= $PMF_LANG['ad_categ_show']; ?> |
|
43 | 43 | </a> |
44 | 44 | </div> |
45 | 45 | </div> |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $subCategories = $category->getChildren($cat['id']); |
319 | 319 | $numSubCategories = count($subCategories); |
320 | 320 | |
321 | - $hasParent = (bool) $cat['parent_id']; |
|
321 | + $hasParent = (bool)$cat['parent_id']; |
|
322 | 322 | |
323 | 323 | if ($hasParent) { |
324 | 324 | printf( |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | if (!is_dir(PMF_ROOT_DIR.'/images')) { |
71 | 71 | echo '<p class="alert alert-danger">'.sprintf($PMF_LANG['ad_dir_missing'], '/images').'</p>'; |
72 | 72 | } else { |
73 | - $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(PMF_ROOT_DIR . '/images/')); |
|
73 | + $files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(PMF_ROOT_DIR.'/images/')); |
|
74 | 74 | foreach ($files as $file) { |
75 | 75 | if ($file->isDir() || !in_array($file->getExtension(), $allowedExtensions)) { |
76 | 76 | continue; |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | $path = str_replace(dirname(__DIR__).'/', '', $file->getPath()); |
79 | 79 | printf( |
80 | 80 | '<div class="mce-file" data-src="%s"><img src="%s" class="mce-file-preview">%s</div>', |
81 | - $faqConfig->getDefaultUrl() . $path . '/' . $file->getFilename(), |
|
82 | - $faqConfig->getDefaultUrl() . $path . '/' . $file->getFilename(), |
|
83 | - $path . '/' . $file->getFilename() |
|
81 | + $faqConfig->getDefaultUrl().$path.'/'.$file->getFilename(), |
|
82 | + $faqConfig->getDefaultUrl().$path.'/'.$file->getFilename(), |
|
83 | + $path.'/'.$file->getFilename() |
|
84 | 84 | ); |
85 | 85 | } |
86 | 86 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $password = Filter::filterInput(INPUT_GET, 'password', FILTER_SANITIZE_STRING); |
61 | 61 | |
62 | 62 | $data = array( |
63 | - 'url' => 'http://' . $url . '.' . $_SERVER['SERVER_NAME'], |
|
63 | + 'url' => 'http://'.$url.'.'.$_SERVER['SERVER_NAME'], |
|
64 | 64 | 'instance' => $instance, |
65 | 65 | 'comment' => $comment, |
66 | 66 | ); |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | $hostname = $urlParts['host']; |
76 | 76 | |
77 | 77 | if ($faqInstanceClient->createClientFolder($hostname)) { |
78 | - $clientDir = PMF_ROOT_DIR . '/multisite/' . $hostname; |
|
78 | + $clientDir = PMF_ROOT_DIR.'/multisite/'.$hostname; |
|
79 | 79 | $clientSetup = new Setup(); |
80 | 80 | $clientSetup->setRootDir($clientDir); |
81 | 81 | |
82 | - $faqInstanceClient->copyConstantsFile($clientDir . '/constants.php'); |
|
82 | + $faqInstanceClient->copyConstantsFile($clientDir.'/constants.php'); |
|
83 | 83 | |
84 | 84 | $dbSetup = array( |
85 | 85 | 'dbServer' => $DB['server'], |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ); |
92 | 92 | $clientSetup->createDatabaseFile($dbSetup, ''); |
93 | 93 | |
94 | - $faqInstanceClient->setClientUrl('http://' . $hostname); |
|
94 | + $faqInstanceClient->setClientUrl('http://'.$hostname); |
|
95 | 95 | $faqInstanceClient->createClientTables($dbSetup['dbPrefix']); |
96 | 96 | |
97 | 97 | Db::setTablePrefix($dbSetup['dbPrefix']); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $dateEnd = Filter::filterInput(INPUT_POST, 'dateEnd', FILTER_SANITIZE_STRING); |
45 | 45 | $question = Filter::filterInput(INPUT_POST, 'question', FILTER_SANITIZE_STRING); |
46 | 46 | $categories = Filter::filterInputArray(INPUT_POST, array('rubrik' => array('filter' => FILTER_VALIDATE_INT, |
47 | - 'flags' => FILTER_REQUIRE_ARRAY, ))); |
|
47 | + 'flags' => FILTER_REQUIRE_ARRAY, ))); |
|
48 | 48 | $record_lang = Filter::filterInput(INPUT_POST, 'lang', FILTER_SANITIZE_STRING); |
49 | 49 | $tags = Filter::filterInput(INPUT_POST, 'tags', FILTER_SANITIZE_STRING); |
50 | 50 | $active = Filter::filterInput(INPUT_POST, 'active', FILTER_SANITIZE_STRING); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $dateEnd = Filter::filterInput(INPUT_POST, 'dateEnd', FILTER_SANITIZE_STRING); |
45 | 45 | $question = Filter::filterInput(INPUT_POST, 'question', FILTER_SANITIZE_STRING); |
46 | 46 | $categories = Filter::filterInputArray(INPUT_POST, array('rubrik' => array('filter' => FILTER_VALIDATE_INT, |
47 | - 'flags' => FILTER_REQUIRE_ARRAY, ))); |
|
47 | + 'flags' => FILTER_REQUIRE_ARRAY,))); |
|
48 | 48 | $record_lang = Filter::filterInput(INPUT_POST, 'lang', FILTER_SANITIZE_STRING); |
49 | 49 | $tags = Filter::filterInput(INPUT_POST, 'tags', FILTER_SANITIZE_STRING); |
50 | 50 | $active = Filter::filterInput(INPUT_POST, 'active', FILTER_SANITIZE_STRING); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $itemsPerPage = 32; |
38 | 38 | $allCrumbs = $fa->getBreadcrumbs(); |
39 | 39 | |
40 | -$crumbs = array_slice($allCrumbs, ($page - 1) * $itemsPerPage, $itemsPerPage); |
|
40 | +$crumbs = array_slice($allCrumbs, ($page - 1)*$itemsPerPage, $itemsPerPage); |
|
41 | 41 | |
42 | 42 | $pagination = new Pagination( |
43 | 43 | $faqConfig, |
@@ -157,15 +157,15 @@ |
||
157 | 157 | <div class="card-body"> |
158 | 158 | <ul class="list-unstyled"> |
159 | 159 | <?php |
160 | - $inactiveFaqs = $faq->getInactiveFaqsData(); |
|
161 | - foreach ($inactiveFaqs as $inactiveFaq) { |
|
160 | + $inactiveFaqs = $faq->getInactiveFaqsData(); |
|
161 | + foreach ($inactiveFaqs as $inactiveFaq) { |
|
162 | 162 | printf( |
163 | 163 | '<li><a href="%s">%s</a></li>', |
164 | 164 | $inactiveFaq['url'], |
165 | 165 | $inactiveFaq['question'] |
166 | 166 | ); |
167 | - } |
|
168 | - ?> |
|
167 | + } |
|
168 | + ?> |
|
169 | 169 | </ul> |
170 | 170 | </div> |
171 | 171 | </div> |
@@ -115,31 +115,31 @@ discard block |
||
115 | 115 | <a href="?action=view" class="list-group-item"> |
116 | 116 | <i aria-hidden="true" class="fas fa-list-alt"></i> <?= $PMF_LANG['ad_start_articles']; ?> |
117 | 117 | <span class="float-right text-muted small"> |
118 | - <em><?= $faqTableInfo[Db::getTablePrefix() . 'faqdata']; ?></em> |
|
118 | + <em><?= $faqTableInfo[Db::getTablePrefix().'faqdata']; ?></em> |
|
119 | 119 | </span> |
120 | 120 | </a> |
121 | 121 | <a href="?action=comments" class="list-group-item"> |
122 | 122 | <i aria-hidden="true" class="fas fa-comments"></i> <?= $PMF_LANG['ad_start_comments']; ?> |
123 | 123 | <span class="float-right text-muted small"> |
124 | - <em><?= $faqTableInfo[Db::getTablePrefix() . 'faqcomments']; ?></em> |
|
124 | + <em><?= $faqTableInfo[Db::getTablePrefix().'faqcomments']; ?></em> |
|
125 | 125 | </span> |
126 | 126 | </a> |
127 | 127 | <a href="?action=question" class="list-group-item"> |
128 | 128 | <i aria-hidden="true" class="fas fa-question-circle"></i> <?= $PMF_LANG['msgOpenQuestions']; ?> |
129 | 129 | <span class="float-right text-muted small"> |
130 | - <em><?= $faqTableInfo[Db::getTablePrefix() . 'faqquestions']; ?></em> |
|
130 | + <em><?= $faqTableInfo[Db::getTablePrefix().'faqquestions']; ?></em> |
|
131 | 131 | </span> |
132 | 132 | </a> |
133 | 133 | <a href="?action=news" class="list-group-item"> |
134 | 134 | <i aria-hidden="true" class="fas fa-list-alt"></i> <?= $PMF_LANG['msgNews']; ?> |
135 | 135 | <span class="float-right text-muted small"> |
136 | - <em><?= $faqTableInfo[Db::getTablePrefix() . 'faqnews']; ?></em> |
|
136 | + <em><?= $faqTableInfo[Db::getTablePrefix().'faqnews']; ?></em> |
|
137 | 137 | </span> |
138 | 138 | </a> |
139 | 139 | <a href="?action=user&user_action=listallusers" class="list-group-item"> |
140 | 140 | <i aria-hidden="true" class="fas fa-users"></i> <?= $PMF_LANG['admin_mainmenu_users']; ?> |
141 | 141 | <span class="float-right text-muted small"> |
142 | - <em><?= $faqTableInfo[Db::getTablePrefix() . 'faquser'] - 1; ?></em> |
|
142 | + <em><?= $faqTableInfo[Db::getTablePrefix().'faquser'] - 1; ?></em> |
|
143 | 143 | </span> |
144 | 144 | </a> |
145 | 145 | <a target="_blank" href="https://itunes.apple.com/app/phpmyfaq/id977896957" class="list-group-item"> |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | ); |
191 | 191 | // Installed phpMyFAQ version is outdated |
192 | 192 | if (-1 == version_compare($versions['installed'], $versions['current'])) { |
193 | - echo '<br />' . $PMF_LANG['ad_you_should_update']; |
|
193 | + echo '<br />'.$PMF_LANG['ad_you_should_update']; |
|
194 | 194 | } |
195 | 195 | } catch (Exception $e) { |
196 | 196 | printf('<p class="alert alert-danger">%s</p>', $e->getMessage()); |
@@ -49,9 +49,12 @@ |
||
49 | 49 | <a href="?action=config"> |
50 | 50 | <?php if ($faqConfig->get('main.maintenanceMode')): ?> |
51 | 51 | <button class="btn btn-sm btn-outline-danger"><?= $PMF_LANG['msgMaintenanceMode'] ?></button> |
52 | - <?php else: ?> |
|
52 | + <?php else { |
|
53 | + : ?> |
|
53 | 54 | <button class="btn btn-sm btn-outline-success"><?= $PMF_LANG['msgOnlineMode'] ?></button> |
54 | - <?php endif; ?> |
|
55 | + <?php endif; |
|
56 | +} |
|
57 | +?> |
|
55 | 58 | </a> |
56 | 59 | </div> |
57 | 60 | </div> |
@@ -102,14 +102,14 @@ |
||
102 | 102 | print '<td>'; |
103 | 103 | if ($cat['lang'] != $LANGCODE) { |
104 | 104 | // translate category |
105 | - printf( |
|
106 | - '<a href="%s?action=translatecategory&cat=%s&trlang=%s" title="%s"><span title="%s" class="fas fa-share"></span></a></a>', |
|
107 | - $currentLink, |
|
108 | - $cat['id'], |
|
109 | - $LANGCODE, |
|
110 | - $PMF_LANG['ad_categ_translate'], |
|
111 | - $PMF_LANG['ad_categ_translate'] |
|
112 | - ); |
|
105 | + printf( |
|
106 | + '<a href="%s?action=translatecategory&cat=%s&trlang=%s" title="%s"><span title="%s" class="fas fa-share"></span></a></a>', |
|
107 | + $currentLink, |
|
108 | + $cat['id'], |
|
109 | + $LANGCODE, |
|
110 | + $PMF_LANG['ad_categ_translate'], |
|
111 | + $PMF_LANG['ad_categ_translate'] |
|
112 | + ); |
|
113 | 113 | } |
114 | 114 | printf(' %s<strong>%s</strong>', |
115 | 115 | $indent, |
@@ -54,7 +54,7 @@ |
||
54 | 54 | 'parent_id' => $parentId, |
55 | 55 | 'name' => Filter::filterInput(INPUT_POST, 'name', FILTER_SANITIZE_STRING), |
56 | 56 | 'description' => Filter::filterInput(INPUT_POST, 'description', FILTER_SANITIZE_STRING), |
57 | - 'user_id' => Filter::filterInput(INPUT_POST, 'user_id', FILTER_VALIDATE_INT), ); |
|
57 | + 'user_id' => Filter::filterInput(INPUT_POST, 'user_id', FILTER_VALIDATE_INT),); |
|
58 | 58 | |
59 | 59 | // translate.category only returns non-existent languages to translate too |
60 | 60 | if ($category->addCategory($categoryData, $parentId, $categoryData['id'])) { |