Change default license to CC-BY-SA

Fixes #258
This commit is contained in:
Bat
2018-10-06 18:19:45 +01:00
parent 046c9a011e
commit 387efbf3e9
8 changed files with 91 additions and 5 deletions
+2 -2
View File
@@ -182,7 +182,7 @@ fn update(blog: String, slug: String, user: User, conn: DbConn, data: LenientFor
let license = if form.license.len() > 0 {
form.license.to_string()
} else {
Instance::get_local(&*conn).map(|i| i.default_license).unwrap_or(String::from("CC-0"))
Instance::get_local(&*conn).map(|i| i.default_license).unwrap_or(String::from("CC-BY-SA"))
};
// update publication date if when this article is no longer a draft
@@ -292,7 +292,7 @@ fn create(blog_name: String, data: LenientForm<NewPostForm>, user: User, conn: D
license: if form.license.len() > 0 {
form.license.to_string()
} else {
Instance::get_local(&*conn).map(|i| i.default_license).unwrap_or(String::from("CC-0"))
Instance::get_local(&*conn).map(|i| i.default_license).unwrap_or(String::from("CC-BY-SA"))
},
ap_url: "".to_string(),
creation_date: None,