Commit Graph

104 Commits

Author SHA1 Message Date
Antoine Beaupré a2f598a593 correct usage of array_unshift 2008-04-24 18:23:55 +00:00
Antoine Beaupré a843e1200d partially revert last change: stick to printf, but still allow
variable number of arguments in error handlers

we don't want to switch to strtr as ->raise() is used everywhere
without arrays...
2008-04-24 18:17:43 +00:00
Antoine Beaupré fc9c612c21 use strtr instead of printf to expand variables in translated strings
this means that the error arguments are now passed as an associative
array.

exemple:

$err->raise("foo", "error message: %error", array('%error' => "blah"));
2008-04-24 18:07:11 +00:00
Antoine Beaupré 15f9312e72 doc update of error handler 2008-04-24 17:56:04 +00:00
Antoine Beaupré d5a4c72e4a Major redesign of the MySQL backend interface to fix a security issue.
See: #318.

As of now, the MySQL configuration used everywhere by AlternC is not
stored in the main configuration file (/etc/alternc/local.sh) but in a
MySQL configuration file in /etc/alternc/my.cnf, which enables us to
call mysql without exposing the password on the commandline.

The changes here are quite invasive but will allow us to factor out
the MySQL configuration better. See #364.

This includes a partial rewrite of the mysql.sh logic, which is now ran
from the postinst script (and not alternc.install) which will allow us
to actually change the MySQL root user properly. See #601.

This commit was tested like this:

 * clean install on etch (working)
 * upgrade from a clean 0.9.7 (working)
2008-04-13 04:35:19 +00:00
Antoine Beaupré 131b6a7f5e cosmetic change: better alignment in variable decl. 2008-04-12 21:07:16 +00:00
Antoine Beaupré ee87f3bbb8 fix indentation 2008-04-12 20:01:07 +00:00
Antoine Beaupré c8f477c3ec crude implementation of permission change in the file browser
Contributed by: Mathieu Lutfy
Sponsored by: Koumbit
2008-04-10 18:40:08 +00:00
Antoine Beaupré c192607d51 fix archive extraction:
* call with the proper path
* remove the quotes from the calls, they're already there
* make ExtractFile non-recursive
* force unzip extraction to overwrite existing files
2008-03-14 03:08:14 +00:00
Antoine Beaupré eaefa56fb9 improve error handling in extraction code, add is_extractable functionality 2008-01-22 04:12:24 +00:00
Antoine Beaupré de54a15ca0 more factorization in error messages: make errstr() work with our new messaging system 2008-01-22 04:11:00 +00:00
Antoine Beaupré d63da16fcc don't translate mimetypes in m_bro::mime(). revert hooking tarball extraction from the last commit 2008-01-22 03:39:01 +00:00
Antoine Beaupré 97d65aadb3 make UploadFile() return the uploaded path
make ExtractFile extract in the same directory as the archive by default
2008-01-22 03:23:26 +00:00
Antoine Beaupré 7ecbf6d263 use move_uploaded_file to get uploaded files instead of copy (svn diff), as recommended in the php manual, see http://php.net/move_uploaded_file 2008-01-22 03:13:54 +00:00
Antoine Beaupré ca5137fc7b reorder CopyFile API so that it works like MoveFile (ie. support multiple files 2008-01-22 03:08:10 +00:00
Antoine Beaupré 57cf564a80 remove recursive mkdir code
place the escapeshellarg() calls properly
print the cp error on failure
assume the target parent directory
2008-01-22 02:30:23 +00:00
Antoine Beaupré ed74b4debc remove write tests: cp will fail all by itself, no need to test 2008-01-22 02:27:22 +00:00
Antoine Beaupré 48871eb7d4 use escapeshellarg() properly and in both functions. 2008-01-22 02:24:59 +00:00
Antoine Beaupré 3de628ccb2 adaptation du code de copie de fichier:
* desactiver le code de copie par http:// pour l'instant
 * utilise escapeshellarg() au lieu de addslashes() pour echapper les arguments
 * utiliser le bon systeme de message d'erreurs
 * ajouter -p a l'appel de cp
2008-01-22 02:19:54 +00:00
Antoine Beaupré 6160112864 allow arbitrary errors in m_err instead of just error codes. errors are translated before display 2008-01-22 02:17:01 +00:00
Antoine Beaupré 6787f26a12 various fixes to the imported functions:
* respect our function naming convention
 * remove unrar code as I do not trust it for now
 * use convertabsolute() instead of addslashes() to sanitize the paths

See #1043.
2008-01-22 01:36:39 +00:00
Antoine Beaupré 593fdc17db add the code provided from an anonymous user for recursive copy and decompress functions in the browser. Will be audited and corrected to hook properly in the browser
See #1043.
2008-01-22 01:21:36 +00:00
Antoine Beaupré 44182f2f19 add a alternc_del_session() hook that removes the phpMyAdmin cookie on logout
Closes: #1082
2008-01-21 18:50:55 +00:00
Antoine Beaupré dcd3687701 stricter pattern matching in local.sh so that comments are not considered 2007-12-12 22:28:29 +00:00
Antoine Beaupré ec8692ca09 try to fix bug #1075: don't use ****** as a special password 2007-10-26 04:44:53 +00:00
Antoine Beaupré ed96566057 fix a longstanding issue in AlternC: don't show translation links for
which AlternC is not translated

this is done by checking if the locales/LANG directory exists, so it's
not foolproof, but it's better than simply checking if the locale is
configured (which is still done).

a bit of code refactoring was done while i'm here
2007-10-05 18:07:02 +00:00
Benjamin Sonntag 329ac8627c Correcting m_dom error : cannot add '' empty subdomain 2007-09-25 15:13:57 +00:00
Nahuel Angelinetti 1d2d3da1d3 petit erreur de synthaxe 2007-09-11 22:11:22 +00:00
Camille Lafitte 3b749e368d revert des commit [1944], [1939], [1933], [1925] : nouveau bureau.
On recommencera mais en patchant la branche /franck-desktop
2007-09-09 21:55:18 +00:00
Camille Lafitte e2272fb4e3 cf commit [1808] 2007-09-09 21:09:10 +00:00
Camille Lafitte 8d7c15e924 edition de checkid
cf commit [1806],[1804]
2007-09-09 20:49:56 +00:00
Benjamin Sonntag c6fcdcb271 Checking MX when hosting a mail. Fixes #1074 2007-09-09 20:33:30 +00:00
Camille Lafitte e421523021 complement à [1931], cf commit [1807] 2007-09-09 20:30:30 +00:00
Benjamin Sonntag 3751a50569 fixing lang_env messup 2007-09-09 20:17:48 +00:00
Camille Lafitte 402b11c5bc Lister les lettres des membres d'un utilisateur donné
cf commit [1807]
2007-09-09 20:15:17 +00:00
Camille Lafitte c4a305bd69 De la cosmétique
cf commit [1804]
2007-09-09 19:35:45 +00:00
Camille Lafitte 48fc717d1d ajouts de nouvelles fonctions necessaire au nouveau bureau.
cf commit 1804
ref 1061
2007-09-09 19:03:06 +00:00
Benjamin Sonntag 1d1c8f9a01 Choose english if the language is not available. Fixes #1047 2007-08-27 07:25:19 +00:00
Benjamin Sonntag d2c5c63811 parameter checking in subdomain creation, + translations added in dom_subdodel.php 2007-08-27 07:19:10 +00:00
Benjamin Sonntag b851385d72 checking the subdomain syntax using checkfqdn instead of this crappy regexp (who miss ^ and $...). Normally Fixes #1037 2007-08-27 06:55:03 +00:00
Benjamin Sonntag a2ae073b0c clean code format and remove obsolete comments 2007-08-27 06:51:09 +00:00
Benjamin Sonntag 73c98b50ec updating English translations + fixing a big bug in mysql users management 2007-08-27 06:46:51 +00:00
Benjamin Sonntag 8467cf5473 we copy the default squirrelmail prefs in new accounts. Fixes #1015 2007-08-23 08:18:41 +00:00
Benjamin Sonntag 6bad3e9495 Correction du probleme du lien voir. Fixes #690 2007-08-23 06:46:50 +00:00
Benjamin Sonntag 4fa397c6c3 fixing issues with .eu.be and .name whois servers (new syntax) Fixes #571 2007-08-22 22:57:03 +00:00
Antoine Beaupré 8f7c385161 add a function to find the home of a user that doesn't hardcode /var/alternc 2007-05-30 19:59:15 +00:00
Benjamin Sonntag 2e74652984 Réinstallation des commits de Franck (en utilisant diff -w)
m_admin : Affiche la _traduction_ des types de TLD et non plus la VO.
m_mail : dans l'affichage des mails par première lettre, on affichait en fait ceux par leur dernière lettre ... corrigé.
2007-05-11 07:21:23 +00:00
Antoine Beaupré dcee899097 renverser les commits 1799 et 1800, qui sont mal documentes et bourres de changements sans liens avec le commitlog (e.g. whitespace) 2007-05-11 01:29:28 +00:00
franck c337b8f096 Remise en place de la traduction du controle des TLD lors de l'ajout, modification 2007-04-19 08:13:54 +00:00
franck 9f5ba7ea82 Correction d'un bug empechant le tri par lettre des boites mails 2007-04-19 07:35:36 +00:00