diff --git a/docs/create.sql b/docs/create.sql index d65e68d4a..60fa478aa 100644 --- a/docs/create.sql +++ b/docs/create.sql @@ -1475,11 +1475,11 @@ INSERT INTO international VALUES (37,'WebGUI','Dutch','Geen toegang!'); INSERT INTO international VALUES (37,'WebGUI','English','Permission Denied!'); INSERT INTO international VALUES (37,'WebGUI','Español','Permiso Denegado!'); INSERT INTO international VALUES (37,'WebGUI','Português','Permissão negada!'); -INSERT INTO international VALUES (38,'WebGUI','Deutsch','Sie sind nicht berechtigt, diese Aktion auszuführen. Melden Sie sich bitte mit einem Benutzernamen an, der über ausreichende Rechte verfügt.'); -INSERT INTO international VALUES (38,'WebGUI','Dutch','U heeft niet voldoende privileges om deze operatie te doen. Log in als een gebruiker met voldoende privileges.'); -INSERT INTO international VALUES (38,'WebGUI','English','You do not have sufficient privileges to perform this operation. Please log in with an account that has sufficient privileges before attempting this operation.'); -INSERT INTO international VALUES (38,'WebGUI','Español','\"No tiene privilegios suficientes para realizar ésta operación. Por favor ingrese con una cuenta que posea los privilegios suficientes antes de intentar ésta operación.\"'); -INSERT INTO international VALUES (38,'WebGUI','Português','\"Não tem privilégios para essa operação. Identifique-se na entrada com uma conta que permita essa operação.\"'); +INSERT INTO international VALUES (38,'WebGUI','Deutsch','Sie sind nicht berechtigt, diese Aktion auszuführen. ^a(Melden Sie sich bitte mit einem Benutzernamen an);, der über ausreichende Rechte verfügt.'); +INSERT INTO international VALUES (38,'WebGUI','Dutch','U heeft niet voldoende privileges om deze operatie te doen. ^a(Log in); als een gebruiker met voldoende privileges.'); +INSERT INTO international VALUES (38,'WebGUI','English','You do not have sufficient privileges to perform this operation. Please ^a(log in with an account); that has sufficient privileges before attempting this operation.'); +INSERT INTO international VALUES (38,'WebGUI','Español','\"No tiene privilegios suficientes para realizar ésta operación. Por favor ^a(ingrese con una cuenta); que posea los privilegios suficientes antes de intentar ésta operación.\"'); +INSERT INTO international VALUES (38,'WebGUI','Português','\"Não tem privilégios para essa operação. ^a(Identifique-se na entrada); com uma conta que permita essa operação.\"'); INSERT INTO international VALUES (39,'WebGUI','Deutsch','Sie sind nicht berechtigt, diese Seite anzuschauen.'); INSERT INTO international VALUES (39,'WebGUI','Dutch','U heeft niet voldoende privileges om deze pagina op te vragen.'); INSERT INTO international VALUES (39,'WebGUI','English','You do not have sufficient privileges to access this page.'); diff --git a/docs/upgrades/upgrade_3.2.2-3.2.3.sql b/docs/upgrades/upgrade_3.2.2-3.2.3.sql new file mode 100644 index 000000000..36f1e63ff --- /dev/null +++ b/docs/upgrades/upgrade_3.2.2-3.2.3.sql @@ -0,0 +1,7 @@ +delete from international where internationalId=38 and namespace='WebGUI'; +INSERT INTO international VALUES (38,'WebGUI','Deutsch','Sie sind nicht berechtigt, diese Aktion auszuführen. ^a(Melden Sie sich bitte mit einem Benutzernamen an);, der über ausreichende Rechte verfügt.'); +INSERT INTO international VALUES (38,'WebGUI','Dutch','U heeft niet voldoende privileges om deze operatie te doen. ^a(Log in); als een gebruiker met voldoende privileges.'); +INSERT INTO international VALUES (38,'WebGUI','English','You do not have sufficient privileges to perform this operation. Please ^a(log in with an account); that has sufficient privileges before attempting this operation.'); +INSERT INTO international VALUES (38,'WebGUI','Español','\"No tiene privilegios suficientes para realizar ésta operación. Por favor ^a(ingrese con una cuenta); que posea los privilegios suficientes antes de intentar ésta operación.\"'); +INSERT INTO international VALUES (38,'WebGUI','Português','\"Não tem privilégios para essa operação. ^a(Identifique-se na entrada); com uma conta que permita essa operação.\"'); + diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index d8dc6c300..fc333fcea 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -1,5 +1,5 @@ package WebGUI; -our $VERSION = "3.2.2"; +our $VERSION = "3.2.3"; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2002 Plain Black Software. diff --git a/lib/WebGUI/Operation/Image.pm b/lib/WebGUI/Operation/Image.pm index e4485f322..039ab03b7 100644 --- a/lib/WebGUI/Operation/Image.pm +++ b/lib/WebGUI/Operation/Image.pm @@ -153,9 +153,9 @@ sub www_editImageSave { if ($file ne "") { $file = ", filename=".quote($file); } - WebGUI::SQL->write("update images set imageId=$session{form}{iid}, name=".quote($session{form}{name}). + WebGUI::SQL->write("update images set name=".quote($session{form}{name}). $file.", parameters=".quote($session{form}{parameters}).", userId=$session{user}{userId}, ". - " username=".quote($session{user}{username}).", dateUploaded=".time()); + " username=".quote($session{user}{username}).", dateUploaded=".time()." where imageId=$session{form}{iid}"); return www_listImages(); } else { return WebGUI::Privilege::insufficient(); @@ -164,7 +164,7 @@ sub www_editImageSave { #------------------------------------------------------------------- sub www_listImages { - my ($output, $sth, %data, @row, $dataRows, $prevNextBar, $i, $search); + my ($output, $sth, %data, @row, $dataRows, $prevNextBar, $i, $search, $isAdmin); tie %data, 'Tie::CPHash'; if (WebGUI::Privilege::isInGroup(4)) { $output = helpLink(26); @@ -180,10 +180,11 @@ sub www_listImages { $search = " where (name like '%".$session{form}{keyword}. "%' or filename like '%".$session{form}{keyword}."%') "; } + $isAdmin = WebGUI::Privilege::isInGroup(3); $sth = WebGUI::SQL->read("select * from images $search order by name"); while (%data = $sth->hash) { $row[$i] = '
';
$row[$i] .= '
';
$row[$i] .= ''; - $output = WebGUI::Macro::process($output); - } + $output = '
'; + $output = WebGUI::Macro::process($output); return $output; } @@ -103,10 +99,14 @@ sub isInGroup { #------------------------------------------------------------------- sub noAccess { my ($output); - $output = '
'; - return $output; + if ($session{user}{userId} <= 1) { + $output = WebGUI::Operation::Account::www_displayAccount(); + } else { + $output = '
'; + } + return $output; } #-------------------------------------------------------------------