Skip to content

Commit

Permalink
Merge branch 'manager'
Browse files Browse the repository at this point in the history
  • Loading branch information
vikman90 committed Sep 16, 2015
2 parents 21b9910 + 0ffcf5f commit 982434e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions manager/control.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ function new_playlist() {
if (!isset($_POST['name']))
html_error('args');

if (strlen($_POST['name']) == 0)
html_error('name_blank');

$id = db_insert_playlist($_POST['name']);
html_redirect("playlist.php?idplaylist=$id");
}
Expand All @@ -168,6 +171,9 @@ function rename_playlist() {
if (!(isset($_POST['name']) and isset($_POST['idplaylist'])))
html_error('args');

if (strlen($_POST['name']) == 0)
html_error('name_blank');

if (!db_get_playlist($_POST['idplaylist']))
html_error('args');

Expand Down Expand Up @@ -233,6 +239,9 @@ function rename_score() {
if (!(isset($_POST['name']) and isset($_POST['idscore'])))
html_error('args');

if (strlen($_POST['name']) == 0)
html_error('name_blank');

if (!db_get_score($_POST['idscore']))
html_error('args');

Expand Down
2 changes: 1 addition & 1 deletion manager/playlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$playlist = db_get_playlist($_GET['idplaylist']);

if ($playlist === null)
html_error('args');
html_error('list_not_found');

set_page("playlist.php?idplaylist={$_GET['idplaylist']}");

Expand Down
3 changes: 3 additions & 0 deletions manager/translations/english.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
<string name="engineer">Engineering Mode</string>
<string name="wait">Please wait</string>
<string name="uploading">Uploading files...</string>
<string name="error_list_not_found">Playlist not found.</string>
<string name="error_score_not_found">Score not found.</string>
<string name="error_name_blank">Name field empty.</string>
</translation>
3 changes: 3 additions & 0 deletions manager/translations/italian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
<string name="engineer">Modo Ingegneria</string>
<string name="wait">Attendere prego</string>
<string name="uploading">Caricamento dei file...</string>
<string name="error_list_not_found">Playlist non trovato.</string>
<string name="error_score_not_found">Brano non trovato.</string>
<string name="error_name_blank">Nome vuoto.</string>
</translation>
3 changes: 3 additions & 0 deletions manager/translations/spanish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
<string name="engineer">Modo Ingeniería</string>
<string name="wait">Espere</string>
<string name="uploading">Subiendo archivos...</string>
<string name="error_list_not_found">Lista de reproducción no encontrada.</string>
<string name="error_score_not_found">Pieza no encontrada.</string>
<string name="error_name_blank">No se ha especificado el nombre.</string>
</translation>

0 comments on commit 982434e

Please sign in to comment.