Skip to content

Commit

Permalink
OAI-PMH: update modified_date for template if RSS, export or syndicat…
Browse files Browse the repository at this point in the history
…ion is changed
  • Loading branch information
torinfo committed Jun 7, 2023
1 parent 0bc49ee commit dfccd71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions website_code/php/properties/rss_change_template.php
Expand Up @@ -56,6 +56,11 @@
$status = db_query($query_to_change_rss_status, array($_POST['rss'], $_POST['export'], $_POST['desc'], $_POST['template_id']));
}

// Update templatedetails modify date
$sql = "update {$xerte_toolkits_site->database_table_prefix}templatedetails set date_modified=? where template_id=?";
$params = array(date("Y-m-d H:i:s"), $_POST['template_id']);
db_query_one($sql, $params);

if($status === false) {
echo "<p class='error'>Error saving change to template.</p>";
}
Expand Down
5 changes: 5 additions & 0 deletions website_code/php/properties/syndication_change_template.php
Expand Up @@ -60,6 +60,11 @@

$query_to_change_syndication_status_response = db_query($query_to_change_syndication_status, $params);

// Update templatedetails modify date
$sql = "update {$xerte_toolkits_site->database_table_prefix}templatedetails set date_modified=? where template_id=?";
$params = array(date("Y-m-d H:i:s"), $_POST['tutorial_id']);
db_query_one($sql, $params);

/**
* Check template is public
*/
Expand Down

0 comments on commit dfccd71

Please sign in to comment.