From fe40060359deaab3b89d044545d6ed3bc14c3d03 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Fri, 9 May 2014 16:54:51 -0500
Subject: [PATCH] content: Update content_id after creating new content

---
 include/class.page.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/class.page.php b/include/class.page.php
index 553e342a7..8980bc273 100644
--- a/include/class.page.php
+++ b/include/class.page.php
@@ -273,7 +273,11 @@ class Page {
                 return false;
             }
 
-            // TODO: Update `content_id`
+            $sql = 'UPDATE '.PAGE_TABLE.' SET `content_id`=`id`'
+                .' WHERE id='.db_input($id);
+            if (!db_query($sql))
+                return false;
+
             return $id;
         }
 
-- 
GitLab