diff --git a/admin/fill_exercices.sh b/admin/fill_exercices.sh index c4461d81..797c1352 100755 --- a/admin/fill_exercices.sh +++ b/admin/fill_exercices.sh @@ -70,7 +70,7 @@ get_dir "" | while read f; do basename "$f"; done | while read THEME_URI do THM_BASEURI="/${THEME_URI}/" THEME_NAME=$(echo "${THEME_URI#*-}" | unhtmlentities) - THEME_AUTHORS=$(get_file "${THM_BASEURI}/AUTHORS.txt" | sed 's/$/,/' | xargs) + THEME_AUTHORS=$(get_file "${THM_BASEURI}/AUTHORS.txt" | sed 's/$/, /' | tr -d '\n' | sed 's/, $//') THEME_ID=`new_theme "$THEME_NAME" "$THEME_AUTHORS"` if [ -z "$THEME_ID" ]; then echo -e "\e[31;01m!!! An error occured during theme add\e[00m" diff --git a/libfic/theme.go b/libfic/theme.go index fb6be3ac..7b2edeaa 100644 --- a/libfic/theme.go +++ b/libfic/theme.go @@ -104,7 +104,7 @@ func ExportThemes() (interface{}, error) { } ret[fmt.Sprintf("%d", theme.Id)] = exportedTheme{ theme.Name, - theme.Authors[:len(theme.Authors)-1], + theme.Authors, exos, } }