Migrate Ajaxplorer props to Pydio (in share DB entries)
This commit is contained in:
parent
0c3950edb6
commit
eb4db1e78b
|
@ -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 ?)
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue