From: Jason Woofenden Date: Wed, 21 Jun 2017 03:10:56 +0000 (-0400) Subject: link to archived versions from page edit page X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl-cms.git;a=commitdiff_plain;h=948d843003f8f9f70e830e73ecd3e53bf231f247 link to archived versions from page edit page --- diff --git a/admin_pages.html b/admin_pages.html index 798cdcb..638b630 100644 --- a/admin_pages.html +++ b/admin_pages.html @@ -298,6 +298,10 @@

Add a new pageEdit page "~title html~"

+ +

View archived versions of this page

+ +
Title
diff --git a/admin_pages.php b/admin_pages.php index 910acef..ae0fa33 100644 --- a/admin_pages.php +++ b/admin_pages.php @@ -173,6 +173,10 @@ function admin_pages_main_form($id = false, $history_id = false) { return './admin_pages'; } $id = $history_data['id']; + } elseif ($id) { + if (db_count('history_cms_pages', 'where id=%i', $id) > 1) { + tem_set('archived_versions'); + } } if($id) { tem_set('id', $id);