moved sqlfs filesystem check from Admin to Admin >> Filemanager, as most people seem to expect it there

This commit is contained in:
Ralf Becker 2012-02-29 15:00:25 +00:00
parent 9696717e37
commit 8dc0cc4e05
5 changed files with 37 additions and 30 deletions

View File

@ -22,7 +22,6 @@ class admin_prefs_sidebox_hooks
*/
var $public_functions = array(
'register_all_hooks' => True,
'fsck' => true,
);
/**
@ -102,11 +101,6 @@ class admin_prefs_sidebox_hooks
$file['Find and Register all Application Hooks'] = egw::link('/index.php','menuaction=admin.admin_prefs_sidebox_hooks.register_all_hooks');
}
//if (! $GLOBALS['egw']->acl->check('applications_access',16,'admin'))
{
$file['Check virtual filesystem'] = egw::link('/index.php','menuaction=admin.admin_prefs_sidebox_hooks.fsck');
}
if (! $GLOBALS['egw']->acl->check('asyncservice_access',1,'admin'))
{
$file['Asynchronous timed services'] = egw::link('/index.php','menuaction=admin.uiasyncservice.index');
@ -154,24 +148,4 @@ class admin_prefs_sidebox_hooks
}
$GLOBALS['egw']->redirect_link('/admin/index.php');
}
/**
* Run fsck on sqlfs
*/
function fsck()
{
$check_only = !isset($_POST['fix']);
if (!($msgs = sqlfs_utils::fsck($check_only)))
{
$msgs = lang('Filesystem check reported no problems.');
}
$content = '<p>'.implode("</p>\n<p>", (array)$msgs)."</p>\n";
$content .= html::form('<p>'.($check_only&&is_array($msgs)?html::submit_button('fix', lang('Fix reported problems')):'').
html::submit_button('cancel', lang('Cancel'), "window.location.href='".egw::link('/admin/index.php')."'; return false;").'</p>',
'','/index.php',array('menuaction'=>'admin.admin_prefs_sidebox_hooks.fsck'));
$GLOBALS['egw']->framework->render($content, lang('Admin').' - '.lang('Check virtual filesystem'), true);
}
}

View File

@ -120,7 +120,6 @@ change password hash to admin de Passwort Verschlüsselung ändern zu
check acl for entries of not (longer) existing accounts admin de Prüfe ACL Einträge auf Bezüge zu nicht (mehr) existierenden Benutzerkonten
check ip address of all sessions admin de IP-Adresse für alle Sessions überprüfen
check items to <b>%1</b> to %2 for %3 admin de Durch Abhaken %3 in %2 <b>%1</b>
check virtual filesystem admin de Virtuelles Dateisystem überprüfen
children admin de Kinder
click to select a color admin de Anclicken um eine Farbe auszuwählen
color admin de Farbe
@ -273,7 +272,6 @@ false admin de Falsch
field '%1' already exists !!! admin de Feld '%1' existiert bereits !!!
file space admin de Speicherplatz
file space must be an integer admin de Speicherplatz muss eine Zahl sein
filesystem check reported no problems. admin de Überprüfung des Dateisystem ergab keine Probleme.
find and register all application hooks admin de Suchen und registrieren der "Hooks" aller Anwendungen
for the times above admin de für die oben angegebenen Zeiten
for the times below (empty values count as '*', all empty = every minute) admin de für die darunter angegebenen Zeiten (leere Felder zählen als "*", alles leer = jede Minute)

View File

@ -121,7 +121,6 @@ change password hash to admin en Change password hash to
check acl for entries of not (longer) existing accounts admin en Check ACL for entries of not (longer) existing accounts
check ip address of all sessions admin en Check IP address of all sessions
check items to <b>%1</b> to %2 for %3 admin en Check items to <b>%1</b> to %2 for %3
check virtual filesystem admin en Check virtual filesystem
children admin en Children
click to select a color admin en Click to select a color
color admin en Color
@ -274,7 +273,6 @@ false admin en false
field '%1' already exists !!! admin en Field '%1' already exists !!!
file space admin en File space
file space must be an integer admin en File space must be an integer
filesystem check reported no problems. admin en Filesystem check reported no problems.
find and register all application hooks admin en Find and register all application hooks
for the times above admin en For the times above
for the times below (empty values count as '*', all empty = every minute) admin en For the times below: empty values count as '*', all empty = every minute.

View File

@ -14,6 +14,15 @@
*/
class filemanager_hooks
{
/**
* Functions callable via menuaction
*
* @var unknown_type
*/
var $public_functions = array(
'fsck' => true,
);
static $appname = 'filemanager';
static $foldercount = 1;
@ -79,6 +88,7 @@ class filemanager_hooks
$file = Array(
'Site Configuration' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname='.self::$appname),
'Custom fields' => $GLOBALS['egw']->link('/index.php','menuaction=admin.customfields.edit&appname='.self::$appname),
'Check virtual filesystem' => egw::link('/index.php','menuaction=filemanager.filemanager_hooks.fsck'),
);
// add other administration links, eg. of filesystem backends like versioning
if (($other = $GLOBALS['egw']->hooks->process('filemanager_admin',array(),true)))
@ -192,4 +202,28 @@ class filemanager_hooks
);
return $settings;
}
/**
* Run fsck on sqlfs
*/
function fsck()
{
if (!isset($GLOBALS['egw_info']['user']['apps']['admin']))
{
throw new egw_exception_no_permission_admin();
}
$check_only = !isset($_POST['fix']);
if (!($msgs = sqlfs_utils::fsck($check_only)))
{
$msgs = lang('Filesystem check reported no problems.');
}
$content = '<p>'.implode("</p>\n<p>", (array)$msgs)."</p>\n";
$content .= html::form('<p>'.($check_only&&is_array($msgs)?html::submit_button('fix', lang('Fix reported problems')):'').
html::submit_button('cancel', lang('Cancel'), "window.location.href='".egw::link('/admin/index.php')."'; return false;").'</p>',
'','/index.php',array('menuaction'=>'filemanager.filemanager_hooks.fsck'));
$GLOBALS['egw']->framework->render($content, lang('Admin').' - '.lang('Check virtual filesystem'), true);
}
}

View File

@ -30,6 +30,7 @@ cancel editing %1 without saving filemanager de Beende das Bearbeiten von %1 ohn
cannot create directory because it begins or ends in a space filemanager de Die Erstellung des Verzeichnisses schlug fehl, da es mit einem Leerzeichen beginnt oder endet
cautiously rejecting to remove folder '%1'! filemanager de Löschen des Verzeichnisses '%1' aus Vorsicht zurück gewiesen!
check all filemanager de Alle auswählen
check virtual filesystem filemanager de Virtuelles Dateisystem überprüfen
clear search filemanager de Suchfelder zurücksetzen
comment filemanager de Kommentar
copied filemanager de kopiert
@ -93,6 +94,8 @@ filemanager configuration admin de Dateimanager Konfiguration
filename must not be empty! filemanager de Dateinamen darf nicht leer sein!
files from subdirectories filemanager de Dateien aus Unterverzeichnissen
files in this directory filemanager de Dateien in diesem Verzeichnis
filesystem check reported no problems. filemanager de Überprüfung des Dateisystem ergab keine Probleme.
fix reported problems filemanager de Gefundene Probleme beheben
folder up filemanager de darüberliegendes Verzeichnis
general filemanager de Allgemein
go home filemanager de Heimatverzeichnis