@@ -48,6 +48,9 @@ |
||
48 | 48 | var $user_can_admin; |
49 | 49 | var $docmanPath; |
50 | 50 | |
51 | + /** |
|
52 | + * @param HTTPRequest $request |
|
53 | + */ |
|
51 | 54 | function __construct($plugin, $docmanPath,$pluginPath, $themePath, $request) { |
52 | 55 | $this->request = $request; |
53 | 56 | $this->user = null; |
@@ -25,6 +25,10 @@ |
||
25 | 25 | |
26 | 26 | class DocmanWatermark_HTTPController extends DocmanWatermark_Controller { |
27 | 27 | |
28 | + /** |
|
29 | + * @param DocmanWatermarkPlugin $plugin |
|
30 | + * @param string $pluginPath |
|
31 | + */ |
|
28 | 32 | public function __construct($plugin, $docmanPath,$pluginPath, $themePath) { |
29 | 33 | parent::__construct($plugin, $docmanPath,$pluginPath, $themePath, HTTPRequest::instance()); |
30 | 34 | } |
@@ -41,6 +41,9 @@ discard block |
||
41 | 41 | return false; |
42 | 42 | } |
43 | 43 | |
44 | + /** |
|
45 | + * @param integer $itemId |
|
46 | + */ |
|
44 | 47 | public function searchItemNotWatermarked($itemId) { |
45 | 48 | $sql = 'SELECT NULL FROM plugin_docmanwatermark_item_excluded WHERE item_id = '.$this->da->quoteSmart($itemId); |
46 | 49 | $dar = $this->retrieve($sql); |
@@ -50,6 +53,9 @@ discard block |
||
50 | 53 | return false; |
51 | 54 | } |
52 | 55 | |
56 | + /** |
|
57 | + * @param integer $itemId |
|
58 | + */ |
|
53 | 59 | public function enableWatermarking($itemId) { |
54 | 60 | $sql = 'DELETE FROM plugin_docmanwatermark_item_excluded WHERE item_id = '.$this->da->quoteSmart($itemId); |
55 | 61 | if ($this->update($sql)) { |
@@ -58,6 +64,9 @@ discard block |
||
58 | 64 | return false; |
59 | 65 | } |
60 | 66 | |
67 | + /** |
|
68 | + * @param integer $itemId |
|
69 | + */ |
|
61 | 70 | public function disableWatermarking($itemId) { |
62 | 71 | $sql = 'INSERT INTO plugin_docmanwatermark_item_excluded (item_id) VALUES ('.$this->da->quoteSmart($itemId).')'; |
63 | 72 | if ($this->update($sql)) { |
@@ -96,6 +96,7 @@ |
||
96 | 96 | * Current code is not really clean, but as there is no clean interface |
97 | 97 | * for ugroups & permission manangement... |
98 | 98 | * |
99 | + * @param Docman_Item $item |
|
99 | 100 | * @return Array |
100 | 101 | */ |
101 | 102 | public function getPeopleToNotifyWhenWatermarkingIsDisabled($item) { |
@@ -32,6 +32,9 @@ |
||
32 | 32 | return $this->retrieve($sql); |
33 | 33 | } |
34 | 34 | |
35 | + /** |
|
36 | + * @param integer $watermarked |
|
37 | + */ |
|
35 | 38 | function logEvent($itemId, $userId, $watermarked) { |
36 | 39 | $sql = 'INSERT INTO plugin_docmanwatermark_item_excluded_log'. |
37 | 40 | '(item_id, time, who, watermarked) VALUES '. |
@@ -44,6 +44,9 @@ |
||
44 | 44 | return $this->dao; |
45 | 45 | } |
46 | 46 | |
47 | + /** |
|
48 | + * @param DocmanWatermark_Metadata $wmd |
|
49 | + */ |
|
47 | 50 | public function setField($wmd) { |
48 | 51 | // remove the old field related watermarking values if any |
49 | 52 | $dwmvf = new DocmanWatermark_MetadataValueFactory(); |
@@ -107,6 +107,7 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * Private Method to copy the watermarkmetadata setup from the src project to target project |
109 | 109 | * @param int md_id: the metadata id to insert in the table plugin_docman_watermark_md_extension |
110 | + * @param integer $md_id |
|
110 | 111 | * @return void |
111 | 112 | */ |
112 | 113 | private function copyWatermarkMetadata($md_id){ |
@@ -120,7 +121,6 @@ discard block |
||
120 | 121 | |
121 | 122 | /** |
122 | 123 | * Private Method to copy the metadata values setup from the src project to target project |
123 | - * @param ArrayIterator(int) $dwmvs : iterator of metadata values to insert in the table plugin_docman_watermark_love_md_extension |
|
124 | 124 | * @return void |
125 | 125 | */ |
126 | 126 |
@@ -239,6 +239,7 @@ |
||
239 | 239 | * |
240 | 240 | * @param float $percentage. watermarking percentage. |
241 | 241 | * @param int $pageCount Total number of pages in the pdf document. |
242 | + * @param double $percentage |
|
242 | 243 | * |
243 | 244 | * @return array $pagesToWatermark page numbers |
244 | 245 | */ |
@@ -193,7 +193,7 @@ |
||
193 | 193 | /** |
194 | 194 | * Wrapper for DocmanWatermark_MetadataFactory object |
195 | 195 | * |
196 | - * @return DocmanWatermark_MetadataFactory |
|
196 | + * @return DocmanWatermark_ItemFactory |
|
197 | 197 | */ |
198 | 198 | function getDocmanWatermark_ItemFactory() { |
199 | 199 | include_once 'DocmanWatermark_ItemFactory.class.php'; |