more bug fixes
This commit is contained in:
parent
b21461d50c
commit
469950a1ef
4 changed files with 12 additions and 3 deletions
|
|
@ -298,6 +298,7 @@ sub addAssetVersioning {
|
||||||
$sth = WebGUI::SQL->read("select olderVersions from FileAsset");
|
$sth = WebGUI::SQL->read("select olderVersions from FileAsset");
|
||||||
while (my ($old) = $sth->array) {
|
while (my ($old) = $sth->array) {
|
||||||
foreach my $storageId (split("\n",$old)) {
|
foreach my $storageId (split("\n",$old)) {
|
||||||
|
next unless ($storageId);
|
||||||
WebGUI::Storage->get($storageId)->delete;
|
WebGUI::Storage->get($storageId)->delete;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,8 @@ Deletes this storage location and its contents (if any) from the filesystem and
|
||||||
|
|
||||||
sub delete {
|
sub delete {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
rmtree($self->getPath);
|
my $path = $self->getPath;
|
||||||
|
rmtree($path) if ($path);
|
||||||
undef $self;
|
undef $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -390,6 +391,7 @@ The unique identifier for this file system storage location.
|
||||||
sub get {
|
sub get {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $id = shift;
|
my $id = shift;
|
||||||
|
return undef unless $id;
|
||||||
$id =~ m/^(.{2})(.{2})/;
|
$id =~ m/^(.{2})(.{2})/;
|
||||||
my $self = {_id => $id, _part1 => $1, _part2 => $2};
|
my $self = {_id => $id, _part1 => $1, _part2 => $2};
|
||||||
bless $self, ref($class)||$class;
|
bless $self, ref($class)||$class;
|
||||||
|
|
@ -587,6 +589,10 @@ If specified, we'll return a path to the file rather than the storage location.
|
||||||
sub getPath {
|
sub getPath {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $file = shift;
|
my $file = shift;
|
||||||
|
unless ($session{config}{uploadsPath} && $self->{_part1} && $self->{_part2} && $self->getId) {
|
||||||
|
$self->_addError("storage object malformed");
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
my $path = $session{config}{uploadsPath}
|
my $path = $session{config}{uploadsPath}
|
||||||
.$session{os}{slash}.$self->{_part1}
|
.$session{os}{slash}.$self->{_part1}
|
||||||
.$session{os}{slash}.$self->{_part2}
|
.$session{os}{slash}.$self->{_part2}
|
||||||
|
|
|
||||||
|
|
@ -471,7 +471,8 @@ function AssetManager_addAssetMetaData(url, rank,title) {
|
||||||
|
|
||||||
//********Event Handlers***********
|
//********Event Handlers***********
|
||||||
function AssetManager_initializeDragEventHandlers() {
|
function AssetManager_initializeDragEventHandlers() {
|
||||||
document.onmousedown=AssetManager_documentMouseDown;
|
var old = (document.onmousedown) ? document.onmousedown : function () {};
|
||||||
|
document.onmousedown= function () {old();AssetManager_documentMouseDown();};
|
||||||
document.onmouseup=AssetManager_documentMouseUp;
|
document.onmouseup=AssetManager_documentMouseUp;
|
||||||
document.onmousemove=AssetManager_documentMouseMove;
|
document.onmousemove=AssetManager_documentMouseMove;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
var ie5=document.all&&document.getElementById
|
var ie5=document.all&&document.getElementById
|
||||||
var contextMenu_items = new Array();
|
var contextMenu_items = new Array();
|
||||||
|
|
||||||
document.onmousedown=contextMenu_hide;
|
var contextMenu_old = (document.onmousedown) ? document.onmousdown : function () {};
|
||||||
|
document.onmousedown= function () {contextMenu_old();contextMenu_hide();};
|
||||||
|
|
||||||
function contextMenu_renderLeftClick(menuId,e) {
|
function contextMenu_renderLeftClick(menuId,e) {
|
||||||
contextMenu_hide(e);
|
contextMenu_hide(e);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue