Code Duplication    Length = 8-8 lines in 2 locations

ajaxfileedit.php 1 location

@@ 398-405 (lines=8) @@
395
$pageX         = $wikiPage->getPage($input['page']);
396
$mayEdit       = $wikiPage->checkEdit();
397
398
if (!$mayEdit) {
399
    header('Status: 403 Forbidden - No Permission');
400
    if (!$mayEdit) {
401
        $out['message'] = _MD_GWIKI_AJAX_FILEEDIT_NO_AUTH;
402
    }
403
    echo json_encode($out);
404
    exit;
405
}
406
407
$q_newfile = $wikiPage->escapeForDB($newfile);
408
$q_keyword = $wikiPage->escapeForDB($input['page']);

ajaximgedit.php 1 location

@@ 232-239 (lines=8) @@
229
$pageX         = $wikiPage->getPage($input['page']);
230
$mayEdit       = $wikiPage->checkEdit();
231
232
if (!$mayEdit) {
233
    header('Status: 403 Forbidden - No Permission');
234
    if (!$mayEdit) {
235
        $out['message'] = _MD_GWIKI_AJAX_IMGEDIT_NO_AUTH;
236
    }
237
    echo json_encode($out);
238
    exit;
239
}
240
241
/*
242
 * This creates issues if page being edited has not been saved yet, so let's not be anal about it