@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * Delete entry from wiki_page table identified by wiki page Id. |
84 | 84 | * |
85 | 85 | * @param int $id id of wiki page |
86 | - * @return true if there is no error |
|
86 | + * @return boolean if there is no error |
|
87 | 87 | */ |
88 | 88 | function deleteWikiPage($id) { |
89 | 89 | $sql = sprintf('DELETE FROM plugin_phpwiki_page'. |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * Delete all entries from wiki_version table that refers to the same wiki page identified by its Id |
96 | 96 | * |
97 | 97 | * @param int $id id of wiki page |
98 | - * @return true if there is no error |
|
98 | + * @return boolean if there is no error |
|
99 | 99 | */ |
100 | 100 | function deleteWikiPageVersion($id) { |
101 | 101 | $sql = sprintf('DELETE FROM plugin_phpwiki_version'. |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * Delete links from and to wiki page identified by its Id |
108 | 108 | * |
109 | 109 | * @param int $id id of wiki page |
110 | - * @return true if there is no error |
|
110 | + * @return boolean if there is no error |
|
111 | 111 | */ |
112 | 112 | function deleteLinksFromToWikiPage($id) { |
113 | 113 | $sql = sprintf('DELETE FROM plugin_phpwiki_link'. |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * Delete wiki page identified by its Id from non empty pages list |
121 | 121 | * |
122 | 122 | * @param int $id id of wiki page |
123 | - * @return true if there is no error |
|
123 | + * @return boolean if there is no error |
|
124 | 124 | */ |
125 | 125 | function deleteWikiPageFromNonEmptyList($id) { |
126 | 126 | $sql = sprintf('DELETE FROM plugin_phpwiki_nonempty'. |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * Delete recent infos of wiki page identified by its Id. |
133 | 133 | * |
134 | 134 | * @param int $id id of wiki page |
135 | - * @return true if there is no error |
|
135 | + * @return boolean if there is no error |
|
136 | 136 | */ |
137 | 137 | function deleteWikiPageRecentInfos($id) { |
138 | 138 | $sql = sprintf('DELETE FROM plugin_phpwiki_recent'. |
@@ -163,6 +163,9 @@ |
||
163 | 163 | return $this->getPluginPath() . '/index.php?group_id=' . $project_id . '&pagename=' . urlencode($page_name) . '&s=' . urlencode($words); |
164 | 164 | } |
165 | 165 | |
166 | + /** |
|
167 | + * @param integer $project_id |
|
168 | + */ |
|
166 | 169 | private function getSearchPageName($project_id) { |
167 | 170 | $wiki_dao = new PHPWikiDao(); |
168 | 171 | $search_page = self::SEARCH_PAGENAME_EN; |
@@ -18,6 +18,10 @@ |
||
18 | 18 | */ |
19 | 19 | |
20 | 20 | class PHPWikiPluginInfo extends PluginInfo { |
21 | + |
|
22 | + /** |
|
23 | + * @param phpwikiPlugin $plugin |
|
24 | + */ |
|
21 | 25 | public function __construct($plugin) { |
22 | 26 | parent::__construct($plugin); |
23 | 27 | $this->setPluginDescriptor(new PHPWikiPluginDescriptor()); |
@@ -160,7 +160,7 @@ |
||
160 | 160 | /** |
161 | 161 | * _browsePages - private |
162 | 162 | * |
163 | - * @param string[] $pagelist List of page names. |
|
163 | + * @param string[] $pageList List of page names. |
|
164 | 164 | */ |
165 | 165 | function _browsePages(&$pageList) { |
166 | 166 | print '<ul class="WikiEntries">'; |
@@ -41,6 +41,8 @@ |
||
41 | 41 | /** |
42 | 42 | * Generate url to Expend/Collapse a part of a page |
43 | 43 | * @see my_hide_url |
44 | + * @param string $svc |
|
45 | + * @param integer $db_item_id |
|
44 | 46 | */ |
45 | 47 | function hide_url ($svc, $db_item_id, $defaultHide=false, $hide=null) { |
46 | 48 | $pref_name = 'hide_'.$svc.$db_item_id; |
@@ -314,6 +314,9 @@ |
||
314 | 314 | ); |
315 | 315 | } |
316 | 316 | |
317 | + /** |
|
318 | + * @param string $url |
|
319 | + */ |
|
317 | 320 | private function checkSynchronizerToken($url) { |
318 | 321 | $token = new CSRFSynchronizerToken($url); |
319 | 322 | $token->check(); |
@@ -11,6 +11,9 @@ |
||
11 | 11 | */ |
12 | 12 | class PluginsAdministrationPluginInfo extends PluginInfo { |
13 | 13 | |
14 | + /** |
|
15 | + * @param PluginsAdministrationPlugin $plugin |
|
16 | + */ |
|
14 | 17 | function PluginsAdministrationPluginInfo(&$plugin) { |
15 | 18 | $this->PluginInfo($plugin); |
16 | 19 | $this->setPluginDescriptor(new PluginsAdministrationPluginDescriptor()); |
@@ -450,6 +450,9 @@ |
||
450 | 450 | return $unavailable_flag .' '. $available_flag; |
451 | 451 | } |
452 | 452 | |
453 | + /** |
|
454 | + * @param string $state |
|
455 | + */ |
|
453 | 456 | private function getFlag($plugin_id, $state, $is_active, $dont_touch) { |
454 | 457 | $style = ''; |
455 | 458 | $badge = ''; |
@@ -65,14 +65,23 @@ |
||
65 | 65 | return $this->getParentDirectory($safe_path); |
66 | 66 | } |
67 | 67 | |
68 | + /** |
|
69 | + * @param string $path |
|
70 | + */ |
|
68 | 71 | private function shouldGoToParentDirectory($path) { |
69 | 72 | return strstr($path, '..'); |
70 | 73 | } |
71 | 74 | |
75 | + /** |
|
76 | + * @param string $path |
|
77 | + */ |
|
72 | 78 | private function getSafeParentDirectoryPath($path) { |
73 | 79 | return strstr($path, '..', true); |
74 | 80 | } |
75 | 81 | |
82 | + /** |
|
83 | + * @param string $safe_path |
|
84 | + */ |
|
76 | 85 | private function getParentDirectory($safe_path) { |
77 | 86 | $clean_path = rtrim($safe_path, '/'); |
78 | 87 |