Migrate Ajaxplorer props to Pydio (in share DB entries)

This commit is contained in:
Daniel Berteaud 2013-10-22 19:09:54 +02:00
parent 0c3950edb6
commit eb4db1e78b
2 changed files with 17 additions and 2 deletions

View File

@ -21,8 +21,8 @@ foreach (0..32){
$id .= $chars[rand @chars];
}
foreach my $share ($a->get_all_by_prop(type => 'share')){
$pydio = $share->prop('Ajaxplorer') || 'disabled';
$indexer = $share->prop('AjaxplorerIndexer') || 'enabled';
$pydio = $share->prop('Pydio') || 'disabled';
$indexer = $share->prop('PydioIndexer') || 'enabled';
next if ($pydio ne 'enabled' || $indexer ne 'enabled');
my $name = $share->key;
# Check if the lock file is present and if it's too old (last index crashed ?)

View File

@ -0,0 +1,15 @@
{
# Rename Ajaxplorer props to Pydio
foreach my $share ($DB->get_all_by_prop(type => 'share')){
my $ajaxplorer = $DB->get_prop_and_delete($share->key, 'Ajaxplorer');
next unless defined ($ajaxplorer);
$share->merge_props(
Pydio => $ajaxplorer
);
my $indexer = $DB->get_prop_and_delete($share->key, 'AjaxplorerIndexer');
next unless defined ($indexer);
$share->merge_props(
PydioIndexer => $indexer
);
}
}