Skip to content

Commit

Permalink
Merge branch 'hotfix-0.3.1.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
Netrilix committed Jul 9, 2016
2 parents 7862f35 + de6fcfd commit 05e0d97
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 19 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## v0.3.1.16

- Fixed comment reference to \Fortress\JqueryValidationAdaptor
- CONTRIBUTING.md - Added note about proper Pull Requests
- French language file fixes (#565) (lcharette)
- Added HTTP status codes to 404 errors and database errors (frostbitten)
- Changed database errors to use BaseController instead of DatabaseController (frostbitten)

## v0.3.1.15

- Fix unattached submitHandler bug in Group and Auth edit interfaces (#465)
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@ On Github, Gitter, and Stack Overflow, please keep in mind the following:
- Frontend (Javascript-related) errors: in your browser's Javascript console. This can be accessed from "Tools->Web Developer" menu in Firefox, or "More tools->Javascript Console" in Chrome. For help with other browsers, please Google "where is the javascript console in ____".

You should also try testing your code in a local development environment, to separate **code-related** issues from **server** issues. In general, we recommend that you install a local development server on your computer, rather than [testing your code directly on the production server](https://pbs.twimg.com/media/BxfENwpIYAAcHqQ.png). This means you can test your code directly on your own computer, making development faster and without the risk of exposing sensitive information to the public. We recommend installing [XAMPP](https://www.apachefriends.org) if you don't already have a local server set up.

# Guidelines for Contributing to UserFrosting

## Pull Requests

When making a pull request, set your "base branch" to the latest hotfix branch being worked on. This will allow us to keep track of which version every change belongs to, which is useful when tracking down other users' issues.

## ChangeLog

When submitting code, make sure to add feature/major changes to `README.md` and **all** changes to `CHANGELOG.md`.
6 changes: 4 additions & 2 deletions userfrosting/controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function __construct($app){
* Request type: GET
*/
public function page404(){
$this->_app->render('errors/404.twig');
$twig = $this->_app->view()->getEnvironment();
$this->_app->halt(404,$twig->render('errors/404.twig'));
}

/**
Expand All @@ -46,7 +47,8 @@ public function page404(){
* Request type: GET
*/
public function pageDatabaseError(){
$this->_app->render('errors/database.twig');
$twig = $this->_app->view()->getEnvironment();
$this->_app->halt(503,$twig->render('errors/database.twig'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion userfrosting/initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
'guest_theme' => 'default',
'minify_css' => '0',
'minify_js' => '0',
'version' => '0.3.1.15',
'version' => '0.3.1.16',
'author' => 'Alex Weissman',
'show_terms_on_register' => '1',
'site_location' => 'The State of Indiana'
Expand Down
46 changes: 31 additions & 15 deletions userfrosting/locale/fr_FR.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
* @link http://www.userfrosting.com/components/#i18n
* @author Ulysse Ramage
*/

/*
{{name}} - Dynamic markers which are replaced at run time by the relevant index.
*/

$lang = array();

// Site Content
$lang = array_merge($lang, [
"REGISTER_WELCOME" => "L'inscription est simple et rapide.",
Expand All @@ -24,13 +25,15 @@
"MENU_GROUPS" => "Groupes",
"HEADER_MESSAGE_ROOT" => "VOUS ÊTES CONNECTÉ EN TANT QU'ADMINISTRATEUR ROOT"
]);

// Installer
$lang = array_merge($lang,array(
"INSTALLER_INCOMPLETE" => "Vous ne pouvez pas créer de compte root tant que l'installation n'est pas terminée !",
"MASTER_ACCOUNT_EXISTS" => "Le compte principal existe déjà !",
"MASTER_ACCOUNT_NOT_EXISTS" => "Vous ne pouvez pas créer de compte tant que le compte principal n'a pas été enregistré !",
"CONFIG_TOKEN_MISMATCH" => "Désolé, ce jeton de configuration est incorrect."
));

// Account
$lang = array_merge($lang,array(
"ACCOUNT_SPECIFY_USERNAME" => "Veuillez entrer votre nom d'utilisateur.",
Expand All @@ -46,10 +49,14 @@
"ACCOUNT_USER_OR_PASS_INVALID" => "Le nom d'utilisateur ou le mot de passe est invalide.",
"ACCOUNT_ALREADY_ACTIVE" => "Votre compte est déjà activé.",
"ACCOUNT_REGISTRATION_DISABLED" => "Désolé, l'inscription est désactivée.",
"ACCOUNT_REGISTRATION_BROKEN" => "Désolé, il y a un problème avec le processus d'inscriptiion. Contactez-nous pour plus d'informations.",
"ACCOUNT_REGISTRATION_LOGOUT" => "Désolé, vous ne pouvez pas vous inscrire en étant connecté. Merci de bien vouloir vous déconnecter.",
"ACCOUNT_INACTIVE" => "Votre compte est inactif. Veuillez regarder dans le dossier spam de votre boîte mail pour trouver le mail d'activation.",
"ACCOUNT_DISABLED" => "Ce compte a été désactivé. Contactez-nous pour plus d'informations.",
"ACCOUNT_USER_CHAR_LIMIT" => "Le nom d'utilisateur doit faire entre {{min}} et {{max}} caractères.",
"ACCOUNT_USER_INVALID_CHARACTERS" => "Le nom d'utilisateur doit contenir seulement des caractères alphanumériques",
"ACCOUNT_USER_NO_LEAD_WS" => "Le nom d'utilisateur ne peut débuter par un espace",
"ACCOUNT_USER_NO_TRAIL_WS" => "Le nom d'utilisateur ne peut se terminer par un espace",
"ACCOUNT_DISPLAY_CHAR_LIMIT" => "Le nom public doit faire entre {{min}} et {{max}} caractères.",
"ACCOUNT_PASS_CHAR_LIMIT" => "Le mot de passe doit faire entre {{min}} et {{max}} caractères.",
"ACCOUNT_EMAIL_CHAR_LIMIT" => "L'adresse e-mail doit faire entre {{min}} et {{max}} caractères.",
Expand All @@ -76,9 +83,8 @@
"ACCOUNT_PASSWORD_UPDATED" => "Le mot de passe du compte a été mis à jour",
"ACCOUNT_EMAIL_UPDATED" => "L'adresse e-mail du compte a été mise à jour",
"ACCOUNT_TOKEN_NOT_FOUND" => "Ce jeton n'existe pas / Le compte est déjà activé",
"ACCOUNT_USER_INVALID_CHARACTERS" => "Le nom d'utilisateur doit contenir seulement des caractères alphanumériques",
"ACCOUNT_DELETE_MASTER" => "Vous ne pouvez pas supprimer le compte principal !",
"ACCOUNT_DISABLE_MASTER" => "Vous ne pouvez pas désativer le compte principal !",
"ACCOUNT_DISABLE_MASTER" => "Vous ne pouvez pas désactiver le compte principal !",
"ACCOUNT_DISABLE_SUCCESSFUL" => "Le compte de l'utilisateur '{{user_name}}' a été désactivé avec succès.",
"ACCOUNT_ENABLE_SUCCESSFUL" => "Le compte de l'utilisateur '{{user_name}}' a été activé avec succès.",
"ACCOUNT_DELETION_SUCCESSFUL" => "L'utilisateur '{{user_name}}' a été supprimé avec succès.",
Expand All @@ -92,13 +98,17 @@
"ACCOUNT_PRIMARY_GROUP_SET" => "Le groupe principal du compte '{{user_name}}' a été changé avec succès.",
"ACCOUNT_WELCOME" => "Bonjour, {{display_name}}"
));

// Generic validation
$lang = array_merge($lang, array(
"VALIDATE_REQUIRED" => "Le champ '{{self}}' doit être rempli.",
"VALIDATE_BOOLEAN" => "La valeur de '{{self}}' doit être '0' ou '1'.",
"VALIDATE_INTEGER" => "La valeur de '{{self}}' doit être un nombre entier.",
"VALIDATE_ARRAY" => "Les valeurs de '{{self}}' doivent être dans un tableau."
"VALIDATE_ARRAY" => "Les valeurs de '{{self}}' doivent être dans un tableau.",
"VALIDATE_NO_LEAD_WS" => "Les valeurs de '{{self}}' ne peuvent pas débuter par un espace ou une tabultation",
"VALIDATE_NO_TRAIL_WS" => "Les valeurs de '{{self}}' ne peuvent pas terminer par un espace ou une tabultation"
));

// Configuration
$lang = array_merge($lang,array(
"CONFIG_PLUGIN_INVALID" => "Vous essayez de changer la configuration du plugin '{{plugin}}', mais il n'existe pas.",
Expand All @@ -114,20 +124,23 @@
"CONFIG_UPDATE_SUCCESSFUL" => "La configuration du site a été mise à jour.",
"MINIFICATION_SUCCESS" => "Le code CSS et JS a été compressé avec succès."
));

// Forgot Password
$lang = array_merge($lang,array(
"FORGOTPASS_INVALID_TOKEN" => "Le jeton d'activation est invalide",
"FORGOTPASS_OLD_TOKEN" => "Le jeton spécifié a expiré",
"FORGOTPASS_COULD_NOT_UPDATE" => "Impossible de mettre à jour le mot de passe",
"FORGOTPASS_NEW_PASS_EMAIL" => "Un e-mail contenant votre nouveau mot de passe vous a été envoyé",
"FORGOTPASS_REQUEST_CANNED" => "Votre demande de mot de passe a été annulée",
"FORGOTPASS_REQUEST_EXISTS" => "Il existe déjà une demande de mot de passe pour ce compte",
"FORGOTPASS_REQUEST_SENT" => "Un e-mail contenant un lien pour réinitialiser le mot de passe a été envoyé à l'adresse associé à '{{user_name}}'",
"FORGOTPASS_REQUEST_SUCCESS" => "Un e-mail contenant les instructions de réinitialisation de votre mot de passe vous a été envoyé"
));

// Mail
$lang = array_merge($lang,array(
"MAIL_ERROR" => "Une erreur est survenue lors de l'envoi de l'e-mail, merci de nous contacter si le problème persiste",
));

// Miscellaneous
$lang = array_merge($lang,array(
"PASSWORD_HASH_FAILED" => "Le cryptage du mot de passe a échoué. Merci de nous contacter si le problème persiste.",
Expand All @@ -145,20 +158,23 @@
"LOGIN_REQUIRED" => "Désolé, vous devez être connecté pour accéder à ce contenu.",
"LOGIN_ALREADY_COMPLETE" => "Vous êtes déjà connecté !"
));

// Permissions
$lang = array_merge($lang,array(
"GROUP_INVALID_ID" => "Le groupe demandé n'existe pas",
"GROUP_NAME_CHAR_LIMIT" => "Le nom des groupes doit faire entre {{min}} et {{max}} caractères",
"GROUP_INVALID_ID" => "Le groupe demandé n'existe pas",
"GROUP_NAME_CHAR_LIMIT" => "Le nom des groupes doit faire entre {{min}} et {{max}} caractères",
"AUTH_HOOK_CHAR_LIMIT" => "Le nom des hooks d'autorisation doivent faire entre {{min}} et {{max}} caractères",
"GROUP_NAME_IN_USE" => "Le nom de groupe '{{name}}' est déjà pris",
"GROUP_DELETION_SUCCESSFUL" => "Le groupe '{{name}}' a été supprimé avec succès",
"GROUP_CREATION_SUCCESSFUL" => "Le groupe '{{name}}' a été créé avec succès",
"GROUP_UPDATE" => "Les détails du groupe '{{name}}' ont été mis à jour avec succès.",
"CANNOT_DELETE_GROUP" => "Le groupe '{{name}}' ne peut pas être supprimé",
"GROUP_CANNOT_DELETE_DEFAULT_PRIMARY" => "Le groupe '{{name}}' ne peut pas être supprimé car il correspond au groupe par défaut des nouveaux utilisateurs.",
"GROUP_NAME_IN_USE" => "Le nom de groupe '{{name}}' est déjà pris",
"GROUP_DELETION_SUCCESSFUL" => "Le groupe '{{name}}' a été supprimé avec succès",
"GROUP_CREATION_SUCCESSFUL" => "Le groupe '{{name}}' a été créé avec succès",
"GROUP_UPDATE" => "Les détails du groupe '{{name}}' ont été mis à jour avec succès.",
"CANNOT_DELETE_GROUP" => "Le groupe '{{name}}' ne peut pas être supprimé",
"GROUP_CANNOT_DELETE_DEFAULT_PRIMARY" => "Le groupe '{{name}}' ne peut pas être supprimé car il correspond au groupe par défaut des nouveaux utilisateurs.",
"GROUP_AUTH_EXISTS" => "Le groupe '{{name}}' a déjà une règle configurée pour le hook '{{hook}}'.",
"GROUP_AUTH_CREATION_SUCCESSFUL" => "La règle du hook '{{hook}}' a été créée pour le groupe '{{name}}'.",
"GROUP_AUTH_UPDATE_SUCCESSFUL" => "La règle autorisant l'accès au groupe '{{name}}' pour le hook '{{hook}}' a été mise à jour avec succès.",
"GROUP_AUTH_DELETION_SUCCESSFUL" => "La règle autorisant l'accès au groupe '{{name}}' pour le hook '{{hook}}' a été supprimée avec succès."
"GROUP_AUTH_DELETION_SUCCESSFUL" => "La règle autorisant l'accès au groupe '{{name}}' pour le hook '{{hook}}' a été supprimée avec succès.",
"GROUP_DEFAULT_PRIMARY_NOT_DEFINED" => "Vous ne pouvez pas créer de nouvel utilisateur parce qu'il y a aucun groupe par défaut de défini. Veuillez vérifier vos paramètres de groupes."
));
return $lang;

return $lang;
2 changes: 2 additions & 0 deletions userfrosting/middleware/usersession/UserSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public function setup(){
// If we can't connect to the DB, then we can't create an authenticated user. That's ok if we're in installation mode.
error_log("Unable to authenticate user because the database is not yet initialized, invalid, or inaccessible. Falling back to guest user.");
error_log($e->getTraceAsString());
$controller = new BaseController($this->app);
return $controller->pageDatabaseError();
}
}
}
2 changes: 1 addition & 1 deletion userfrosting/models/UserFrosting.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @property \UserFrosting\SiteSettings $site
* @property \UserFrosting\User $user
* @property \UserFrosting\PageSchema $schema
* @property \UserFrosting\JqueryValidationAdapter $jsValidator
* @property \Fortress\JqueryValidationAdapter $jsValidator
*/
class UserFrosting extends \Slim\Slim {

Expand Down

0 comments on commit 05e0d97

Please sign in to comment.