diff --git a/adminstuds.php b/adminstuds.php index 0ccc534..baf25c7 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -331,7 +331,7 @@ if (!empty($_GET['delete_column'])) { if ($result) { $message = new Message('success', __('adminstuds', 'Column removed')); } else { - $message = new Message('danger', __('Error', 'Failed to delete the column')); + $message = new Message('danger', __('Error', 'Failed to delete column')); } } diff --git a/app/classes/Framadate/Services/AdminPollService.php b/app/classes/Framadate/Services/AdminPollService.php index b4b47d5..4760f8a 100644 --- a/app/classes/Framadate/Services/AdminPollService.php +++ b/app/classes/Framadate/Services/AdminPollService.php @@ -117,6 +117,10 @@ class AdminPollService { $slots = $this->pollService->allSlotsByPollId($poll_id); + if (count($slots) === 1) { + return false; + } + $index = 0; $indexToDelete = -1; $newMoments = []; @@ -155,6 +159,10 @@ class AdminPollService { $slots = $this->pollService->allSlotsByPollId($poll_id); + if (count($slots) === 1) { + return false; + } + $index = 0; $indexToDelete = -1; diff --git a/locale/de.json b/locale/de.json index c033119..6c83142 100644 --- a/locale/de.json +++ b/locale/de.json @@ -326,6 +326,7 @@ "Update vote failed": "Update vote failed", "Adding vote failed": "Adding vote failed", "Comment failed": "Kommentar gescheitert", - "You can't create a poll with hidden results with the following edition option:": "Sie können nicht eine Umfrage erstellen mit versteckten Ergebnisse mit der folgenden Ausgabe-Option:" + "You can't create a poll with hidden results with the following edition option:": "Sie können nicht eine Umfrage erstellen mit versteckten Ergebnisse mit der folgenden Ausgabe-Option:", + "Failed to delete column": "Fehler beim Spalte löschen" } } diff --git a/locale/en.json b/locale/en.json index d63249c..d731d3f 100644 --- a/locale/en.json +++ b/locale/en.json @@ -326,6 +326,7 @@ "Update vote failed": "Update vote failed", "Adding vote failed": "Adding vote failed", "Comment failed": "Comment failed", - "You can't create a poll with hidden results with the following edition option:": "You can't create a poll with hidden results with the following edition option: " + "You can't create a poll with hidden results with the following edition option:": "You can't create a poll with hidden results with the following edition option: ", + "Failed to delete column": "Failed to delete column" } } diff --git a/locale/es.json b/locale/es.json index 032e51f..2150ff3 100644 --- a/locale/es.json +++ b/locale/es.json @@ -326,6 +326,7 @@ "Update vote failed": "ES_Mise à jour du vote échoué", "Adding vote failed": "ES_Ajout d'un vote échoué", "Comment failed": "ES_Commentaire échoué", - "You can't create a poll with hidden results with the following edition option:": "ES_Vous ne pouvez pas créer de sondage avec résulats cachés avec les options d'éditions suivantes : " + "You can't create a poll with hidden results with the following edition option:": "ES_Vous ne pouvez pas créer de sondage avec résulats cachés avec les options d'éditions suivantes : ", + "Failed to delete column": "Error al eliminar la columna" } } diff --git a/locale/fr.json b/locale/fr.json index 368772c..1f97f7e 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -326,6 +326,7 @@ "Update vote failed": "Mise à jour du vote échoué", "Adding vote failed": "Ajout d'un vote échoué", "Comment failed": "Commentaire échoué", - "You can't create a poll with hidden results with the following edition option:": "Vous ne pouvez pas créer de sondage avec résulats cachés avec les options d'éditions suivantes : " + "You can't create a poll with hidden results with the following edition option:": "Vous ne pouvez pas créer de sondage avec résulats cachés avec les options d'éditions suivantes : ", + "Failed to delete column": "Échec de la suppression de colonne" } } diff --git a/locale/it.json b/locale/it.json index fb12303..6ae7e6d 100644 --- a/locale/it.json +++ b/locale/it.json @@ -326,6 +326,7 @@ "Update vote failed": "IT_Mise à jour du vote échoué", "Adding vote failed": "IT_Ajout d'un vote échoué", "Comment failed": "IT_Commentaire échoué", - "You can't create a poll with hidden results with the following edition option:": "IT_Vous ne pouvez pas créer de sondage avec résulats cachés avec les options d'éditions suivantes : " + "You can't create a poll with hidden results with the following edition option:": "IT_Vous ne pouvez pas créer de sondage avec résulats cachés avec les options d'éditions suivantes : ", + "Failed to delete column": "Impossibile eliminare colonna" } } \ No newline at end of file