Edit Content button now saves pub settings first

master
Skylar Ittner 7 years ago
parent f29b8c3db2
commit db75e7dc7c

@ -91,6 +91,10 @@ switch ($VARS['action']) {
$database->update('publications', $data, ['pubid' => $VARS['pubid']]);
}
if (isset($VARS["gotocontent"])) {
header("Location: app.php?page=content&pubid=" . $VARS['pubid']);
die();
}
returnToSender("pub_saved");
case "deletepub":
if ($database->has('publications', ['pubid' => $VARS['pubid']])) {

@ -160,7 +160,7 @@ if (!is_empty($VARS['id'])) {
<?php
if ($editing && !$cloning) {
?>
&nbsp; <a href="app.php?page=content&pubid=<?php echo htmlspecialchars($VARS['id']); ?>" class="btn btn-primary"><i class="fa fa-pencil"></i> <?php lang('edit content'); ?></a>
&nbsp; <button type="submit" name="gotocontent" value="1" class="btn btn-primary"><i class="fa fa-pencil"></i> <?php lang('edit content'); ?></button>
<a href="action.php?action=deletepub&source=home&pubid=<?php echo htmlspecialchars($VARS['id']); ?>" class="btn btn-danger btn-xs pull-right mgn-top-8px"><i class="fa fa-times"></i> <?php lang('delete'); ?></a>
<?php
}

Loading…
Cancel
Save