@@ -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 |
@@ -26,6 +26,9 @@ |
||
26 | 26 | |
27 | 27 | class ServiceProFTPd extends Service { |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $template |
|
31 | + */ |
|
29 | 32 | public function renderInPage(HTTPRequest $request, $title, $template, $presenter = null) { |
30 | 33 | $this->displayHeader($request, $title); |
31 | 34 |
@@ -21,7 +21,6 @@ |
||
21 | 21 | |
22 | 22 | namespace Tuleap\ProFTPd\SystemEvent; |
23 | 23 | |
24 | -use Backend; |
|
25 | 24 | use RuntimeException; |
26 | 25 | use Tuleap\ProFTPd\Admin; |
27 | 26 | use ProjectManager; |
@@ -39,6 +39,10 @@ discard block |
||
39 | 39 | return 0; |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @param integer $user_id |
|
44 | + * @param integer $group_id |
|
45 | + */ |
|
42 | 46 | public function storeWebDownload($user_id, $group_id, $current_time, $file_path) { |
43 | 47 | $user_id = $this->da->escapeInt($user_id); |
44 | 48 | $group_id = $this->da->escapeInt($group_id); |
@@ -69,6 +73,10 @@ discard block |
||
69 | 73 | return $this->update($sql); |
70 | 74 | } |
71 | 75 | |
76 | + /** |
|
77 | + * @param integer $user_id |
|
78 | + * @param integer $group_id |
|
79 | + */ |
|
72 | 80 | public function store( |
73 | 81 | $user_id, |
74 | 82 | $group_id, |
@@ -48,6 +48,9 @@ discard block |
||
48 | 48 | /** @var string */ |
49 | 49 | private $base_dir; |
50 | 50 | |
51 | + /** |
|
52 | + * @param string $base_dir |
|
53 | + */ |
|
51 | 54 | public function __construct(Dao $dao, Parser $parser, UserManager $user_manager, ProjectManager $project_manager, $base_dir) { |
52 | 55 | $this->dao = $dao; |
53 | 56 | $this->parser = $parser; |
@@ -64,6 +67,9 @@ discard block |
||
64 | 67 | return $this->errors; |
65 | 68 | } |
66 | 69 | |
70 | + /** |
|
71 | + * @param string $filepath |
|
72 | + */ |
|
67 | 73 | public function import($filepath) { |
68 | 74 | $latest_timestamp = $this->dao->searchLatestEntryTimestamp(); |
69 | 75 | $this->parseFile($filepath, $latest_timestamp); |
@@ -82,6 +88,9 @@ discard block |
||
82 | 88 | fclose($fd); |
83 | 89 | } |
84 | 90 | |
91 | + /** |
|
92 | + * @param string $line |
|
93 | + */ |
|
85 | 94 | private function parseLine($line, $latest_timestamp) { |
86 | 95 | try { |
87 | 96 | $entry = $this->parser->extract(trim($line)); |
@@ -20,6 +20,9 @@ |
||
20 | 20 | |
21 | 21 | class ProftpdPluginInfo extends PluginFileInfo { |
22 | 22 | |
23 | + /** |
|
24 | + * @param proftpdPlugin $plugin |
|
25 | + */ |
|
23 | 26 | function __construct($plugin) { |
24 | 27 | parent::__construct($plugin, 'config'); |
25 | 28 | $this->setPluginDescriptor(new ProftpdPluginDescriptor()); |
@@ -249,6 +249,9 @@ discard block |
||
249 | 249 | } |
250 | 250 | |
251 | 251 | //============================================================================= |
252 | +/** |
|
253 | + * @param integer $HaveResetButton |
|
254 | + */ |
|
252 | 255 | function form_End($SubmitLegend = DEFAULT_SUBMIT_BUTTON, |
253 | 256 | $HaveResetButton = FORM_HAVE_RESET_BUTTON) |
254 | 257 | { |
@@ -402,6 +405,10 @@ discard block |
||
402 | 405 | var $Param; |
403 | 406 | } |
404 | 407 | |
408 | +/** |
|
409 | + * @param string $ParamName |
|
410 | + * @param integer $Tests |
|
411 | + */ |
|
405 | 412 | function form_Validation($ParamName, $Tests, $OptionalParam = NULL) |
406 | 413 | { |
407 | 414 | global $gValidationCollection, $gInForm; |
@@ -663,6 +670,9 @@ discard block |
||
663 | 670 | } |
664 | 671 | |
665 | 672 | //============================================================================= |
673 | +/** |
|
674 | + * @param string $JavaScript |
|
675 | + */ |
|
666 | 676 | function form_genJSButton($Caption, $JavaScript, $ImageFileHTMLPath = NULL) |
667 | 677 | { |
668 | 678 | // JavaScript must use only single quotes, since the double quotes are used to enclose it |
@@ -735,6 +745,11 @@ discard block |
||
735 | 745 | } |
736 | 746 | |
737 | 747 | //============================================================================= |
748 | +/** |
|
749 | + * @param string $ParamName |
|
750 | + * @param string $Caption |
|
751 | + * @param integer $Width |
|
752 | + */ |
|
738 | 753 | function form_genTextBox($ParamName, $Caption, $DefaultValue = "", $Width = FORM_TEXT_AREA_WIDTH, $MaxInputLength = 0) |
739 | 754 | { |
740 | 755 | // |
@@ -939,6 +954,10 @@ discard block |
||
939 | 954 | } |
940 | 955 | |
941 | 956 | //============================================================================= |
957 | +/** |
|
958 | + * @param string $ParamName |
|
959 | + * @param string $Caption |
|
960 | + */ |
|
942 | 961 | function form_genTextArea($ParamName, $Caption, $DefaultValue = "", $MinRows = FORM_TEXT_AREA_DEPTH, $Cols = FORM_TEXT_AREA_WIDTH) |
943 | 962 | { |
944 | 963 | global $gInForm, $gFormCaptions, $gFirstFormTextBox; |
@@ -976,6 +995,9 @@ discard block |
||
976 | 995 | } |
977 | 996 | |
978 | 997 | //============================================================================= |
998 | +/** |
|
999 | + * @param integer $BorderWidth |
|
1000 | + */ |
|
979 | 1001 | function form_TableStart($BorderWidth) |
980 | 1002 | { |
981 | 1003 | print "\n<table border='$BorderWidth' cellspacing='1' cellpadding='2'><tr style='vertical-align: top;'>\n"; |
@@ -1065,6 +1087,9 @@ discard block |
||
1065 | 1087 | **/ |
1066 | 1088 | |
1067 | 1089 | //============================================================================= |
1090 | +/** |
|
1091 | + * @param string $tableName |
|
1092 | + */ |
|
1068 | 1093 | function update_database($tableName, $items, $selectCriteria = "") |
1069 | 1094 | { |
1070 | 1095 | // |
@@ -106,7 +106,6 @@ discard block |
||
106 | 106 | * Build the top list of link for the 2 ways (links and back_links). |
107 | 107 | * |
108 | 108 | * @param String $way Either 'links' or 'back_links' |
109 | - * @param String $sql The SQL to get the links |
|
110 | 109 | * @return String |
111 | 110 | */ |
112 | 111 | function getLinksByLinkType($way, DataAccessResult $dar) { |
@@ -137,7 +136,6 @@ discard block |
||
137 | 136 | * "back links" |
138 | 137 | * |
139 | 138 | * @param String $way Either 'links' or 'back_links' |
140 | - * @param String $res One row of link |
|
141 | 139 | * @return String |
142 | 140 | */ |
143 | 141 | function getLinks($way, DataAccessResult $dar) { |