@@ -630,7 +630,7 @@ |
||
630 | 630 | |
631 | 631 | if (!$faq->getNumberOfVotings($recordId)) { |
632 | 632 | $faq->addVoting($votingData); |
633 | - } else { |
|
633 | + } else { |
|
634 | 634 | $faq->updateVoting($votingData); |
635 | 635 | } |
636 | 636 | $faqRating = new PMF_Rating($faqConfig); |
@@ -16,17 +16,17 @@ |
||
16 | 16 | if($image->resize(CONFIG_IMG_THUMBNAIL_MAX_X, CONFIG_IMG_THUMBNAIL_MAX_Y, true, true)) |
17 | 17 | { |
18 | 18 | $image->showImage(); |
19 | - }else |
|
19 | + } else |
|
20 | 20 | { |
21 | 21 | echo PREVIEW_NOT_PREVIEW . "."; |
22 | 22 | } |
23 | - }else |
|
23 | + } else |
|
24 | 24 | { |
25 | 25 | echo PREVIEW_NOT_PREVIEW . ".."; |
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | - }else |
|
29 | + } else |
|
30 | 30 | { |
31 | 31 | echo PREVIEW_NOT_PREVIEW . "..."; |
32 | 32 | } |
@@ -16,21 +16,19 @@ discard block |
||
16 | 16 | if(CONFIG_SYS_VIEW_ONLY) |
17 | 17 | { |
18 | 18 | $error = SYS_DISABLED; |
19 | - } |
|
20 | - elseif(empty($_POST['file_path'])) |
|
19 | + } elseif(empty($_POST['file_path'])) |
|
21 | 20 | { |
22 | 21 | $error = IMG_SAVE_EMPTY_PATH; |
23 | - }elseif(!file_exists($_POST['file_path'])) |
|
22 | + } elseif(!file_exists($_POST['file_path'])) |
|
24 | 23 | { |
25 | 24 | $error = IMG_SAVE_NOT_EXISTS; |
26 | - }elseif(!isUnderRoot($_POST['file_path'])) |
|
25 | + } elseif(!isUnderRoot($_POST['file_path'])) |
|
27 | 26 | { |
28 | 27 | $error = IMG_SAVE_PATH_DISALLOWED; |
29 | - }else if(!sizeof($lastestSessionImageInfo)) |
|
28 | + } else if(!sizeof($lastestSessionImageInfo)) |
|
30 | 29 | { |
31 | 30 | $error = IMG_UNDO_NO_HISTORY_AVAIALBE; |
32 | - } |
|
33 | - else |
|
31 | + } else |
|
34 | 32 | { |
35 | 33 | //get the original image which is the lastest session image if any when the system is in demo |
36 | 34 | $sessionImage = $session->getSessionDir() . $lastestSessionImageInfo['name']; |
@@ -38,7 +36,7 @@ discard block |
||
38 | 36 | if(CONFIG_SYS_DEMO_ENABLE && sizeof($originalSessionImageInfo)) |
39 | 37 | { |
40 | 38 | $originalImage = $session->getSessionDir() . $originalSessionImageInfo['info']['name']; |
41 | - }else |
|
39 | + } else |
|
42 | 40 | { |
43 | 41 | $originalImage = $_POST['file_path']; |
44 | 42 | } |
@@ -51,7 +49,7 @@ discard block |
||
51 | 49 | if(!@copy($sessionImage, $originalImage)) |
52 | 50 | { |
53 | 51 | $error = IMG_UNDO_COPY_FAILED; |
54 | - }else |
|
52 | + } else |
|
55 | 53 | { |
56 | 54 | |
57 | 55 | //remove the session image |
@@ -69,7 +67,7 @@ discard block |
||
69 | 67 | } |
70 | 68 | $imagePath = $originalImage; |
71 | 69 | |
72 | - }else |
|
70 | + } else |
|
73 | 71 | { |
74 | 72 | $error = IMG_SAVE_IMG_OPEN_FAILED; |
75 | 73 | } |
@@ -11,17 +11,15 @@ discard block |
||
11 | 11 | if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_DELETE) |
12 | 12 | { |
13 | 13 | $error = SYS_DISABLED; |
14 | - } |
|
15 | - elseif(!empty($_GET['delete'])) |
|
14 | + } elseif(!empty($_GET['delete'])) |
|
16 | 15 | {//delete the selected file from context menu |
17 | 16 | if(!file_exists($_GET['delete'])) |
18 | 17 | { |
19 | 18 | $error = ERR_FILE_NOT_AVAILABLE; |
20 | - } |
|
21 | - elseif(!isUnderRoot($_GET['delete'])) |
|
19 | + } elseif(!isUnderRoot($_GET['delete'])) |
|
22 | 20 | { |
23 | 21 | $error = ERR_FOLDER_PATH_NOT_ALLOWED; |
24 | - }else |
|
22 | + } else |
|
25 | 23 | { |
26 | 24 | include_once(CLASS_FILE); |
27 | 25 | $file = new file(); |
@@ -30,7 +28,7 @@ discard block |
||
30 | 28 | && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, getBaseName($_GET['delete']))) |
31 | 29 | { |
32 | 30 | $file->delete(addTrailingSlash(backslashToSlash($_GET['delete']))); |
33 | - }elseif(is_file($_GET['delete']) |
|
31 | + } elseif(is_file($_GET['delete']) |
|
34 | 32 | && isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, getBaseName($_GET['delete'])) |
35 | 33 | && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, getBaseName($_GET['delete'])) |
36 | 34 | ) |
@@ -38,13 +36,12 @@ discard block |
||
38 | 36 | $file->delete(($_GET['delete'])); |
39 | 37 | } |
40 | 38 | } |
41 | - }else |
|
39 | + } else |
|
42 | 40 | { |
43 | 41 | if(!isset($_POST['selectedDoc']) || !is_array($_POST['selectedDoc']) || sizeof($_POST['selectedDoc']) < 1) |
44 | 42 | { |
45 | 43 | $error = ERR_NOT_FILE_SELECTED; |
46 | - } |
|
47 | - else |
|
44 | + } else |
|
48 | 45 | { |
49 | 46 | |
50 | 47 | include_once(CLASS_FILE); |
@@ -59,7 +56,7 @@ discard block |
||
59 | 56 | && !isInvalidPattern(CONFIG_SYS_EXC_DIR_PATTERN, $doc)) |
60 | 57 | { |
61 | 58 | $file->delete(addTrailingSlash(backslashToSlash($doc))); |
62 | - }elseif(is_file($doc) |
|
59 | + } elseif(is_file($doc) |
|
63 | 60 | && isValidPattern(CONFIG_SYS_INC_FILE_PATTERN, $doc) |
64 | 61 | && !isInvalidPattern(CONFIG_SYS_EXC_FILE_PATTERN, $doc) |
65 | 62 | ) |
@@ -6,17 +6,16 @@ discard block |
||
6 | 6 | if(CONFIG_SYS_VIEW_ONLY || (!CONFIG_OPTIONS_CUT && !CONFIG_OPTIONS_COPY)) |
7 | 7 | { |
8 | 8 | $error = SYS_DISABLED; |
9 | - } |
|
10 | - elseif(empty($_GET['current_folder_path'])) |
|
9 | + } elseif(empty($_GET['current_folder_path'])) |
|
11 | 10 | { |
12 | 11 | $error = ERR_NOT_DEST_FOLDER_SPECIFIED; |
13 | - }elseif(!file_exists($_GET['current_folder_path']) || !is_dir($_GET['current_folder_path'])) |
|
12 | + } elseif(!file_exists($_GET['current_folder_path']) || !is_dir($_GET['current_folder_path'])) |
|
14 | 13 | { |
15 | 14 | $error = ERR_DEST_FOLDER_NOT_FOUND; |
16 | - }elseif(!isUnderRoot($_GET['current_folder_path'])) |
|
15 | + } elseif(!isUnderRoot($_GET['current_folder_path'])) |
|
17 | 16 | { |
18 | 17 | $error = ERR_DEST_FOLDER_NOT_ALLOWED; |
19 | - }else |
|
18 | + } else |
|
20 | 19 | { |
21 | 20 | |
22 | 21 | include_once(CLASS_MANAGER); |
@@ -98,7 +97,7 @@ discard block |
||
98 | 97 | $fileMoved[sizeof($fileMoved)] = $tem; |
99 | 98 | $tem = null; |
100 | 99 | } |
101 | - }else |
|
100 | + } else |
|
102 | 101 | { |
103 | 102 | $unmovedDocDueToSamePath[] = $doc; |
104 | 103 | } |
@@ -111,7 +110,7 @@ discard block |
||
111 | 110 | if(sizeof($unmovedDocDueToSamePath) == sizeof($selectedDocuments)) |
112 | 111 | { |
113 | 112 | $error = ERR_DEST_FOLDER_NOT_ALLOWED; |
114 | - }elseif(sizeof($unmovedDocDueToSamePath)) |
|
113 | + } elseif(sizeof($unmovedDocDueToSamePath)) |
|
115 | 114 | { |
116 | 115 | foreach($unmovedDocDueToSamePath as $v) |
117 | 116 | { |
@@ -13,15 +13,13 @@ |
||
13 | 13 | if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_COPY) |
14 | 14 | { |
15 | 15 | $error = SYS_DISABLED; |
16 | - } |
|
17 | - elseif(!isset($_POST['selectedDoc']) || !is_array($_POST['selectedDoc']) || sizeof($_POST['selectedDoc']) < 1) |
|
16 | + } elseif(!isset($_POST['selectedDoc']) || !is_array($_POST['selectedDoc']) || sizeof($_POST['selectedDoc']) < 1) |
|
18 | 17 | { |
19 | 18 | $error = ERR_NOT_DOC_SELECTED_FOR_COPY; |
20 | - } |
|
21 | - elseif(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath'])) |
|
19 | + } elseif(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath'])) |
|
22 | 20 | { |
23 | 21 | $error = ERR_FOLDER_PATH_NOT_ALLOWED; |
24 | - }else |
|
22 | + } else |
|
25 | 23 | { |
26 | 24 | require_once(CLASS_SESSION_ACTION); |
27 | 25 | $sessionAction = new SessionAction(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | { |
15 | 15 | $fileList = array(); |
16 | 16 | $folderInfo = array('path'=>getCurrentFolderPath()); |
17 | - }else |
|
17 | + } else |
|
18 | 18 | { |
19 | 19 | require_once(CLASS_MANAGER); |
20 | 20 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'detail'=>LBL_BTN_VIEW_DETAILS, |
31 | 31 | 'thumbnail'=>LBL_BTN_VIEW_THUMBNAIL, |
32 | 32 | ); |
33 | - }else |
|
33 | + } else |
|
34 | 34 | { |
35 | 35 | $views = array( |
36 | 36 | 'detail'=>LBL_BTN_VIEW_DETAILS, |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | default: |
49 | 49 | $view = CONFIG_DEFAULT_VIEW; |
50 | 50 | } |
51 | - }else |
|
51 | + } else |
|
52 | 52 | { |
53 | 53 | $view = CONFIG_DEFAULT_VIEW; |
54 | 54 | } |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | ); |
310 | 310 | </script> |
311 | 311 | <?php |
312 | - }else |
|
312 | + } else |
|
313 | 313 | { |
314 | 314 | include_once(CONFIG_URL_LIST_LISTING); |
315 | 315 | } |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | ); |
354 | 354 | </script> |
355 | 355 | <?php |
356 | - }else |
|
356 | + } else |
|
357 | 357 | { |
358 | 358 | ?> |
359 | 359 | <select class="input inputSearch" name="search_folder" id="search_folder"> |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $fileList = $search->getFoundFiles(); |
34 | 34 | $folderInfo = $search->getRootFolderInfo(); |
35 | 35 | |
36 | - }else |
|
36 | + } else |
|
37 | 37 | { |
38 | 38 | include_once(CLASS_MANAGER); |
39 | 39 | include_once(CLASS_SESSION_ACTION); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | $pagination->setUrl(CONFIG_URL_FILEnIMAGE_MANAGER); |
51 | 51 | |
52 | - }else |
|
52 | + } else |
|
53 | 53 | { |
54 | 54 | include_once(CLASS_PAGINATION); |
55 | 55 | $pagination = new pagination(false); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | default: |
114 | 114 | $view = CONFIG_DEFAULT_VIEW; |
115 | 115 | } |
116 | - }else |
|
116 | + } else |
|
117 | 117 | { |
118 | 118 | $view = CONFIG_DEFAULT_VIEW; |
119 | 119 | } |
@@ -17,21 +17,19 @@ discard block |
||
17 | 17 | if(CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_NEWFOLDER) |
18 | 18 | { |
19 | 19 | $error = SYS_DISABLED; |
20 | - } |
|
21 | - elseif(empty($_POST['new_folder'])) |
|
20 | + } elseif(empty($_POST['new_folder'])) |
|
22 | 21 | { |
23 | 22 | $error = ERR_FOLDER_NAME_EMPTY; |
24 | - }elseif(!preg_match("/^[a-zA-Z0-9_\- ]+$/", $_POST['new_folder'])) |
|
23 | + } elseif(!preg_match("/^[a-zA-Z0-9_\- ]+$/", $_POST['new_folder'])) |
|
25 | 24 | { |
26 | 25 | $error = ERR_FOLDER_FORMAT; |
27 | - }else if(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath'])) |
|
26 | + } else if(empty($_POST['currentFolderPath']) || !isUnderRoot($_POST['currentFolderPath'])) |
|
28 | 27 | { |
29 | 28 | $error = ERR_FOLDER_PATH_NOT_ALLOWED; |
30 | - } |
|
31 | - elseif(file_exists(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'])) |
|
29 | + } elseif(file_exists(addTrailingSlash($_POST['currentFolderPath']) . $_POST['new_folder'])) |
|
32 | 30 | { |
33 | 31 | $error = ERR_FOLDER_EXISTS; |
34 | - }else |
|
32 | + } else |
|
35 | 33 | { |
36 | 34 | include_once(CLASS_FILE); |
37 | 35 | $file = new file(); |
@@ -60,7 +58,7 @@ discard block |
||
60 | 58 | } |
61 | 59 | $info .= sprintf(", %s:'%s'", $k, $v); |
62 | 60 | } |
63 | - }else |
|
61 | + } else |
|
64 | 62 | { |
65 | 63 | $error = ERR_FOLDER_CREATION_FAILED; |
66 | 64 | } |