@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | api_protect_course_script(); |
19 | 19 | api_block_anonymous_users(); |
20 | 20 | |
21 | -if(!isset($_POST['output_svg']) && !isset($_POST['output_png'])) { |
|
22 | - api_not_allowed();//from Chamilo |
|
21 | +if (!isset($_POST['output_svg']) && !isset($_POST['output_png'])) { |
|
22 | + api_not_allowed(); //from Chamilo |
|
23 | 23 | die(); |
24 | 24 | } |
25 | 25 | |
@@ -43,16 +43,16 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | //get SVG-Edit values |
46 | -$filename = $file;//from svg-edit |
|
47 | -$extension = $suffix;// from svg-edit |
|
48 | -$content = $contents;//from svg-edit |
|
46 | +$filename = $file; //from svg-edit |
|
47 | +$extension = $suffix; // from svg-edit |
|
48 | +$content = $contents; //from svg-edit |
|
49 | 49 | |
50 | -$title = Database::escape_string(str_replace('_',' ',$filename)); |
|
50 | +$title = Database::escape_string(str_replace('_', ' ', $filename)); |
|
51 | 51 | |
52 | 52 | //get Chamilo variables |
53 | 53 | |
54 | 54 | if (!isset($_SESSION['draw_dir']) && !isset($_SESSION['whereami'])) { |
55 | - api_not_allowed();//from Chamilo |
|
55 | + api_not_allowed(); //from Chamilo |
|
56 | 56 | die(); |
57 | 57 | } |
58 | 58 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $relativeUrlPath = $_SESSION['draw_dir']; |
62 | 62 | $currentTool = $_SESSION['whereami']; |
63 | 63 | $dirBaseDocuments = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
64 | -$saveDir=$dirBaseDocuments.$_SESSION['draw_dir']; |
|
64 | +$saveDir = $dirBaseDocuments.$_SESSION['draw_dir']; |
|
65 | 65 | |
66 | 66 | // a bit title security |
67 | 67 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | |
96 | 96 | //checks if the file exists, then rename the new |
97 | -if (file_exists($saveDir.'/'.$filename.'.'.$extension) && $currentTool=='document/createdraw') { |
|
97 | +if (file_exists($saveDir.'/'.$filename.'.'.$extension) && $currentTool == 'document/createdraw') { |
|
98 | 98 | $message = get_lang('FileExistsChangeToSave'); |
99 | 99 | $params = array( |
100 | 100 | 'message' => $message, |
@@ -110,21 +110,21 @@ discard block |
||
110 | 110 | $documentPath = $saveDir.'/'.$drawFileName; |
111 | 111 | |
112 | 112 | //add new document to disk |
113 | -file_put_contents( $documentPath, $contents ); |
|
113 | +file_put_contents($documentPath, $contents); |
|
114 | 114 | |
115 | -if ($currentTool=='document/createdraw') { |
|
115 | +if ($currentTool == 'document/createdraw') { |
|
116 | 116 | //add document to database |
117 | 117 | $doc_id = add_document($_course, $relativeUrlPath.'/'.$drawFileName, 'file', filesize($documentPath), $title); |
118 | 118 | api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $groupId, null, null, null, $current_session_id); |
119 | 119 | |
120 | -} elseif($currentTool=='document/editdraw') { |
|
120 | +} elseif ($currentTool == 'document/editdraw') { |
|
121 | 121 | |
122 | 122 | //check path |
123 | - if (!isset($_SESSION['draw_file'])){ |
|
124 | - api_not_allowed();//from Chamilo |
|
123 | + if (!isset($_SESSION['draw_file'])) { |
|
124 | + api_not_allowed(); //from Chamilo |
|
125 | 125 | die(); |
126 | 126 | } |
127 | - if ($_SESSION['draw_file'] == $drawFileName ){ |
|
127 | + if ($_SESSION['draw_file'] == $drawFileName) { |
|
128 | 128 | $document_id = DocumentManager::get_document_id($_course, $relativeUrlPath.'/'.$drawFileName); |
129 | 129 | update_existing_document($_course, $document_id, filesize($documentPath), null); |
130 | 130 | api_item_property_update($_course, TOOL_DOCUMENT, $document_id, 'DocumentUpdated', $_user['user_id'], $groupId, null, null, null, $current_session_id); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | interface HookResubscribeObserverInterface extends HookObserverInterface |
13 | 13 | { |
14 | 14 | /** |
15 | - * @param HookResubscribeObserverInterface $hook |
|
15 | + * @param HookResubscribeEventInterface $hook |
|
16 | 16 | * |
17 | 17 | * @return int |
18 | 18 | */ |
@@ -12,7 +12,7 @@ |
||
12 | 12 | interface HookSkypeObserverInterface extends HookObserverInterface |
13 | 13 | { |
14 | 14 | /** |
15 | - * @param HookSkypeObserverInterface $hook |
|
15 | + * @param HookSkypeEventInterface $hook |
|
16 | 16 | * |
17 | 17 | * @return int |
18 | 18 | */ |
@@ -21,7 +21,7 @@ |
||
21 | 21 | /** |
22 | 22 | * @param array $additionalParameters |
23 | 23 | * |
24 | - * @return mixed |
|
24 | + * @return void |
|
25 | 25 | */ |
26 | 26 | public function send($additionalParameters); |
27 | 27 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * Instance the plugin |
32 | 32 | * @staticvar null $result |
33 | - * @return AdvancedSubscriptionPlugin |
|
33 | + * @return PENSPlugin |
|
34 | 34 | */ |
35 | 35 | public static function create() |
36 | 36 | { |
@@ -70,6 +70,8 @@ |
||
70 | 70 | |
71 | 71 | /** |
72 | 72 | * @inheritdoc |
73 | + * @param string $toolbar |
|
74 | + * @param string $prefix |
|
73 | 75 | */ |
74 | 76 | public function __construct( |
75 | 77 | $toolbar = null, |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar(); |
147 | 147 | } |
148 | 148 | |
149 | - $config['customConfig'] = api_get_path(WEB_LIBRARY_JS_PATH) . 'ckeditor/config_js.php'; |
|
150 | - $config['flash_flvPlayer'] = api_get_path(WEB_LIBRARY_JS_PATH) . 'ckeditor/plugins/flash/swf/player.swf'; |
|
149 | + $config['customConfig'] = api_get_path(WEB_LIBRARY_JS_PATH).'ckeditor/config_js.php'; |
|
150 | + $config['flash_flvPlayer'] = api_get_path(WEB_LIBRARY_JS_PATH).'ckeditor/plugins/flash/swf/player.swf'; |
|
151 | 151 | |
152 | 152 | /*filebrowserFlashBrowseUrl |
153 | 153 | filebrowserFlashUploadUrl |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | 'wordLimit' => 'unlimited' |
173 | 173 | );*/ |
174 | 174 | |
175 | - $config['skin'] = 'bootstrapck,' . api_get_path(WEB_LIBRARY_JS_PATH) . 'ckeditor/skins/bootstrapck/'; |
|
175 | + $config['skin'] = 'bootstrapck,'.api_get_path(WEB_LIBRARY_JS_PATH).'ckeditor/skins/bootstrapck/'; |
|
176 | 176 | |
177 | 177 | if (isset($this->config)) { |
178 | 178 | $this->config = array_merge($config, $this->config); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | return [ |
204 | 204 | ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'], |
205 | 205 | ['Undo', 'Redo'], |
206 | - ['Link', 'Image', 'Video', 'Oembed','Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'], |
|
206 | + ['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'], |
|
207 | 207 | ['BulletedList', 'NumberedList', 'HorizontalRule'], |
208 | 208 | ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], |
209 | 209 | ['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'], |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * Set accessUrlId |
41 | 41 | * |
42 | 42 | * @param integer $accessUrlId |
43 | - * @return AccessUrlRelSession |
|
43 | + * @return AccessUrlRelCourseCategory |
|
44 | 44 | */ |
45 | 45 | public function setAccessUrlId($accessUrlId) |
46 | 46 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Set fromUser |
63 | 63 | * |
64 | 64 | * @param integer $fromUser |
65 | - * @return Chat |
|
65 | + * @return ChatVideo |
|
66 | 66 | */ |
67 | 67 | public function setFromUser($fromUser) |
68 | 68 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * Set toUser |
86 | 86 | * |
87 | 87 | * @param integer $toUser |
88 | - * @return Chat |
|
88 | + * @return ChatVideo |
|
89 | 89 | */ |
90 | 90 | public function setToUser($toUser) |
91 | 91 | { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * Set room_name |
109 | 109 | * |
110 | 110 | * @param string $roomName |
111 | - * @return Chat |
|
111 | + * @return ChatVideo |
|
112 | 112 | */ |
113 | 113 | public function setRoomName($roomName) |
114 | 114 | { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * Set datetime |
132 | 132 | * |
133 | 133 | * @param \DateTime $datetime |
134 | - * @return Chat |
|
134 | + * @return ChatVideo |
|
135 | 135 | */ |
136 | 136 | public function setDatetime($datetime) |
137 | 137 | { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * Set code |
40 | 40 | * |
41 | 41 | * @param string $code |
42 | - * @return Class |
|
42 | + * @return ClassItem |
|
43 | 43 | */ |
44 | 44 | public function setCode($code) |
45 | 45 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Set name |
63 | 63 | * |
64 | 64 | * @param string $name |
65 | - * @return Class |
|
65 | + * @return ClassItem |
|
66 | 66 | */ |
67 | 67 | public function setName($name) |
68 | 68 | { |