2012-07-13 13:17:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// touch shared directories to trigger one-time re-scan for all users
|
|
|
|
$datadir = \OCP\Config::getSystemValue('datadirectory');
|
|
|
|
$currentVersion=OC_Appconfig::getValue('files_sharing', 'installed_version');
|
|
|
|
if (version_compare($currentVersion, '0.2.2', '<')) {
|
2012-08-29 06:42:49 +00:00
|
|
|
if ($handle = opendir($datadir)) {
|
|
|
|
while (false !== ($entry = readdir($handle))) {
|
|
|
|
$sharedFolder = $datadir.'/'.$entry.'/files/Shared';
|
|
|
|
if ($entry != "." && $entry != ".." && is_dir($sharedFolder)) {
|
|
|
|
touch($sharedFolder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
closedir($handle);
|
2012-07-13 13:17:36 +00:00
|
|
|
}
|
|
|
|
}
|