Skip to content

Commit

Permalink
"MDL-19654, repository draft plugin removal"
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed Dec 15, 2009
1 parent 062d21c commit 0f8b3f0
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 180 deletions.
15 changes: 0 additions & 15 deletions repository/draft/db/access.php

This file was deleted.

12 changes: 0 additions & 12 deletions repository/draft/db/install.php

This file was deleted.

20 changes: 0 additions & 20 deletions repository/draft/db/upgrade.php

This file was deleted.

Binary file removed repository/draft/icon.png
Binary file not shown.
107 changes: 0 additions & 107 deletions repository/draft/repository.class.php

This file was deleted.

2 changes: 0 additions & 2 deletions repository/draft/version.php

This file was deleted.

3 changes: 2 additions & 1 deletion repository/repository.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,8 @@ repository_client.end = function(client_id, obj) {
repository_client.files[client_id] = 0;
}
if(fp.env=='filepicker') {
fp.target.value = obj['id'];
if (fp.target)
fp.target.value = obj['id'];
}else if(fp.env=='editor'){
if (obj['type'] == 'link') {
fp.target.value = obj['url']+'#'+new_filename;
Expand Down
24 changes: 1 addition & 23 deletions repository/repository_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,6 @@

/// Check for actions that do not need repository ID
switch ($action) {
// delete a file from filemanger
case 'delete':
try {
if (!$context = get_context_instance(CONTEXT_USER, $USER->id)) {
}
$contextid = $context->id;
$fs = get_file_storage();
if ($file = $fs->get_file($contextid, 'user_draft', $itemid, '/', $title)) {
if($result = $file->delete()) {
echo $client_id;
} else {
echo '';
}
} else {
echo '';
}
exit;
} catch (repository_exception $e) {
$err->e = $e->getMessage();
die(json_encode($err));
}
break;
case 'gsearch': // Global Search
$params = array();
$params['context'] = array(get_context_instance_by_id($contextid), get_system_context());
Expand Down Expand Up @@ -230,7 +208,7 @@
case 'download':
try {
// we have two special repoisitory type need to deal with
if ($repo->options['type'] == 'local' or $repo->options['type'] == 'draft') {
if ($repo->options['type'] == 'local') {
$fileinfo = $repo->move_to_draft($file, $title, $itemid, $save_path);
$info = array();
$info['client_id'] = $client_id;
Expand Down

0 comments on commit 0f8b3f0

Please sign in to comment.