mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 15:16:07 +01:00
2017-06-19 Fred Gleason <fredg@paravelsystems.com>
* Added a 'TITLE' field to the 'Import' web call.
This commit is contained in:
@@ -74,6 +74,8 @@ void Xport::Import()
|
||||
}
|
||||
QString group_name;
|
||||
xport_post->getValue("GROUP_NAME",&group_name);
|
||||
QString title;
|
||||
xport_post->getValue("TITLE",&title);
|
||||
QString filename;
|
||||
if(!xport_post->getValue("FILENAME",&filename)) {
|
||||
XmlExit("Missing FILENAME",400,"import.cpp",LINE_NUMBER);
|
||||
@@ -107,6 +109,17 @@ void Xport::Import()
|
||||
XmlExit("Forbidden",404,"import.cpp",LINE_NUMBER);
|
||||
}
|
||||
|
||||
//
|
||||
// Verify Title Uniqueness
|
||||
//
|
||||
if(!title.isEmpty()) {
|
||||
if((!xport_system->allowDuplicateCartTitles())&&
|
||||
(!xport_system->fixDuplicateCartTitles())&&
|
||||
(!RDCart::titleIsUnique(title))) {
|
||||
XmlExit("Duplicate Cart Title Not Allowed",404,"import.cpp",LINE_NUMBER);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Load Configuration
|
||||
//
|
||||
@@ -225,6 +238,9 @@ void Xport::Import()
|
||||
}
|
||||
if(resp_code==200) {
|
||||
cut->setSha1Hash(RDSha1Hash(RDCut::pathName(cut->cutName())));
|
||||
if(!title.isEmpty()) {
|
||||
cart->setTitle(title);
|
||||
}
|
||||
printf("Content-type: application/xml\n");
|
||||
printf("Status: %d\n",resp_code);
|
||||
printf("\n");
|
||||
|
||||
@@ -50,6 +50,11 @@
|
||||
<td><input type="text" name="GROUP_NAME" size="20" maxlength="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="right">TITLE:</td>
|
||||
<td><input type="text" name="TITLE" size="40" maxlength="255"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">FILE:</td>
|
||||
<td><input type="file" name="FILENAME" size="20" maxlength="64"></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user