Hello,
is it possible to disable locks on phocadownload ?
User never get skilled enough to always remember to save/close their items and other users are always waiting for those item to get unlocked.
I've seen some Joomla extension that clean the "locks" of many joomla sections but not in phocadownload.
What could be the solution to avoid this problem (I know, it is a user mistake, but ...)
Totally remove locks (checked_out)
-
- Phoca Member
- Posts: 33
- Joined: 09 Oct 2012, 12:45
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Totally remove locks (checked_out)
Hi, all this is managed by Joomla! so if there exists some extension for this, I think, such needs to be customized and extended to the Phoca Download tables (if possible) Unfortunately, this is not managed by Phoca Download and there is no part to customize it in Phoca Download
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 33
- Joined: 09 Oct 2012, 12:45
Re: Totally remove locks (checked_out)
Hello !!
I've found the "autocheckin" extension that works good:
https://extensions.joomla.org/extension ... utocheckin
It needs to be updated to work also with phocadownload, but it is very simple.
Just add two block of code to support phocadownload files and categories to the plugin file
(/plugins/system/autocheckin/autocheckin.php)
I hope it helps !!
I've found the "autocheckin" extension that works good:
https://extensions.joomla.org/extension ... utocheckin
It needs to be updated to work also with phocadownload, but it is very simple.
Just add two block of code to support phocadownload files and categories to the plugin file
(/plugins/system/autocheckin/autocheckin.php)
Code: Select all
$query = 'SELECT id,checked_out,checked_out_time FROM #__phocadownload WHERE checked_out > 0';
$db->setQuery($query);
$erg = $db->loadObjectList();
$anz = count($erg);
for($x=0;$x < $anz;++$x) {
$unter = strtotime($zeit) - strtotime($erg[$x]->checked_out_time);
if ($unter >= $maxsec) {
$query = 'UPDATE #__phocadownload SET checked_out = 0 WHERE id = ' . $erg[$x]->id;
$db->setQuery($query);
$erg1 = $db->query();
}
}
$query = 'SELECT id,checked_out,checked_out_time FROM #__phocadownload_categories WHERE checked_out > 0';
$db->setQuery($query);
$erg = $db->loadObjectList();
$anz = count($erg);
for($x=0;$x < $anz;++$x) {
$unter = strtotime($zeit) - strtotime($erg[$x]->checked_out_time);
if ($unter >= $maxsec) {
$query = 'UPDATE #__phocadownload_categories SET checked_out = 0 WHERE id = ' . $erg[$x]->id;
$db->setQuery($query);
$erg1 = $db->query();
}
}
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Totally remove locks (checked_out)
Ok, thank you for this info.
Jan
Jan
If you find Phoca extensions useful, please support the project