@@ -10,32 +10,32 @@ discard block |
||
10 | 10 | $oSecurity = new Security(); |
11 | 11 | $oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl'); |
12 | 12 | |
13 | - if($this->module_info->list_count) $this->list_count = $this->module_info->list_count; |
|
14 | - if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count; |
|
15 | - if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count; |
|
16 | - if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
17 | - if($this->module_info->page_count) $this->page_count = $this->module_info->page_count; |
|
18 | - if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count; |
|
13 | + if ($this->module_info->list_count) $this->list_count = $this->module_info->list_count; |
|
14 | + if ($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count; |
|
15 | + if ($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count; |
|
16 | + if ($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
17 | + if ($this->module_info->page_count) $this->page_count = $this->module_info->page_count; |
|
18 | + if ($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count; |
|
19 | 19 | $this->except_notice = $this->module_info->except_notice == 'N' ? false : true; |
20 | 20 | |
21 | 21 | // $this->_getStatusNameListecret option backward compatibility |
22 | 22 | $oDocumentModel = getModel('document'); |
23 | 23 | |
24 | 24 | $statusList = $this->_getStatusNameList($oDocumentModel); |
25 | - if(isset($statusList['SECRET'])) |
|
25 | + if (isset($statusList['SECRET'])) |
|
26 | 26 | { |
27 | 27 | $this->module_info->secret = 'Y'; |
28 | 28 | } |
29 | 29 | |
30 | 30 | // use_category <=1.5.x, hide_category >=1.7.x |
31 | 31 | $count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl)); |
32 | - if($count_category) |
|
32 | + if ($count_category) |
|
33 | 33 | { |
34 | - if($this->module_info->hide_category) |
|
34 | + if ($this->module_info->hide_category) |
|
35 | 35 | { |
36 | 36 | $this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y'; |
37 | 37 | } |
38 | - else if($this->module_info->use_category) |
|
38 | + else if ($this->module_info->use_category) |
|
39 | 39 | { |
40 | 40 | $this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y'; |
41 | 41 | } |
@@ -55,10 +55,10 @@ discard block |
||
55 | 55 | * check the consultation function, if the user is admin then swich off consultation function |
56 | 56 | * if the user is not logged, then disppear write document/write comment./ view document |
57 | 57 | **/ |
58 | - if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read) |
|
58 | + if ($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read) |
|
59 | 59 | { |
60 | 60 | $this->consultation = true; |
61 | - if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
61 | + if (!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
62 | 62 | } else { |
63 | 63 | $this->consultation = false; |
64 | 64 | } |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | $extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl); |
68 | 68 | Context::set('extra_keys', $extra_keys); |
69 | 69 | |
70 | - $template_path = sprintf("%sm.skins/%s/",$this->module_path, $this->module_info->mskin); |
|
71 | - if(!is_dir($template_path)||!$this->module_info->mskin) |
|
70 | + $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin); |
|
71 | + if (!is_dir($template_path) || !$this->module_info->mskin) |
|
72 | 72 | { |
73 | 73 | $this->module_info->mskin = 'default'; |
74 | - $template_path = sprintf("%sm.skins/%s/",$this->module_path, $this->module_info->mskin); |
|
74 | + $template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin); |
|
75 | 75 | } |
76 | 76 | $this->setTemplatePath($template_path); |
77 | 77 | Context::addJsFilter($this->module_path.'tpl/filter', 'input_password.xml'); |
@@ -87,13 +87,13 @@ discard block |
||
87 | 87 | function getBoardCommentPage() |
88 | 88 | { |
89 | 89 | $document_srl = Context::get('document_srl'); |
90 | - $oDocumentModel =& getModel('document'); |
|
91 | - if(!$document_srl) |
|
90 | + $oDocumentModel = & getModel('document'); |
|
91 | + if (!$document_srl) |
|
92 | 92 | { |
93 | 93 | return new Object(-1, "msg_invalid_request"); |
94 | 94 | } |
95 | 95 | $oDocument = $oDocumentModel->getDocument($document_srl); |
96 | - if(!$oDocument->isExists()) |
|
96 | + if (!$oDocument->isExists()) |
|
97 | 97 | { |
98 | 98 | return new Object(-1, "msg_invalid_request"); |
99 | 99 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | function dispBoardMessage($msg_code) |
107 | 107 | { |
108 | 108 | $msg = Context::getLang($msg_code); |
109 | - $oMessageObject = &ModuleHandler::getModuleInstance('message','mobile'); |
|
109 | + $oMessageObject = &ModuleHandler::getModuleInstance('message', 'mobile'); |
|
110 | 110 | $oMessageObject->setError(-1); |
111 | 111 | $oMessageObject->setMessage($msg); |
112 | 112 | $oMessageObject->dispMessage(); |
@@ -10,12 +10,24 @@ discard block |
||
10 | 10 | $oSecurity = new Security(); |
11 | 11 | $oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl'); |
12 | 12 | |
13 | - if($this->module_info->list_count) $this->list_count = $this->module_info->list_count; |
|
14 | - if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count; |
|
15 | - if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count; |
|
16 | - if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
17 | - if($this->module_info->page_count) $this->page_count = $this->module_info->page_count; |
|
18 | - if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count; |
|
13 | + if($this->module_info->list_count) { |
|
14 | + $this->list_count = $this->module_info->list_count; |
|
15 | + } |
|
16 | + if($this->module_info->mobile_list_count) { |
|
17 | + $this->list_count = $this->module_info->mobile_list_count; |
|
18 | + } |
|
19 | + if($this->module_info->search_list_count) { |
|
20 | + $this->search_list_count = $this->module_info->search_list_count; |
|
21 | + } |
|
22 | + if($this->module_info->mobile_search_list_count) { |
|
23 | + $this->search_list_count = $this->module_info->mobile_search_list_count; |
|
24 | + } |
|
25 | + if($this->module_info->page_count) { |
|
26 | + $this->page_count = $this->module_info->page_count; |
|
27 | + } |
|
28 | + if($this->module_info->mobile_page_count) { |
|
29 | + $this->page_count = $this->module_info->mobile_page_count; |
|
30 | + } |
|
19 | 31 | $this->except_notice = $this->module_info->except_notice == 'N' ? false : true; |
20 | 32 | |
21 | 33 | // $this->_getStatusNameListecret option backward compatibility |
@@ -34,18 +46,15 @@ discard block |
||
34 | 46 | if($this->module_info->hide_category) |
35 | 47 | { |
36 | 48 | $this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y'; |
37 | - } |
|
38 | - else if($this->module_info->use_category) |
|
49 | + } else if($this->module_info->use_category) |
|
39 | 50 | { |
40 | 51 | $this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y'; |
41 | - } |
|
42 | - else |
|
52 | + } else |
|
43 | 53 | { |
44 | 54 | $this->module_info->hide_category = 'N'; |
45 | 55 | $this->module_info->use_category = 'Y'; |
46 | 56 | } |
47 | - } |
|
48 | - else |
|
57 | + } else |
|
49 | 58 | { |
50 | 59 | $this->module_info->hide_category = 'Y'; |
51 | 60 | $this->module_info->use_category = 'N'; |
@@ -58,7 +67,9 @@ discard block |
||
58 | 67 | if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read) |
59 | 68 | { |
60 | 69 | $this->consultation = true; |
61 | - if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
70 | + if(!Context::get('is_logged')) { |
|
71 | + $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false; |
|
72 | + } |
|
62 | 73 | } else { |
63 | 74 | $this->consultation = false; |
64 | 75 | } |