[geeklog-cvs] geeklog: Fixed cloning of a story (bug #0001127, patch provided ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Apr 24 11:19:56 EDT 2010


changeset 7892:d8d05e77d0fe
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/d8d05e77d0fe
user: Dirk Haun <dirk at haun-online.de>
date: Sat Apr 24 17:10:25 2010 +0200
description:
Fixed cloning of a story (bug #0001127, patch provided by Eric Brisco)

diffstat:

 public_html/admin/story.php |  12 ++++++++----
 public_html/docs/history    |   8 +++++++-
 2 files changed, 15 insertions(+), 5 deletions(-)

diffs (54 lines):

diff -r 19b31331125c -r d8d05e77d0fe public_html/admin/story.php
--- a/public_html/admin/story.php	Sat Apr 24 16:09:15 2010 +0200
+++ b/public_html/admin/story.php	Sat Apr 24 17:10:25 2010 +0200
@@ -236,7 +236,7 @@
 * Displays the story entry form
 *
 * @param    string      $sid            ID of story to edit
-* @param    string      $mode           'preview', 'edit', 'editsubmission'
+* @param    string      $mode           'preview', 'edit', 'editsubmission', 'clone'
 * @param    string      $errormsg       a message to display on top of the page
 * @param    string      $currenttopic   topic selection for drop-down menu
 * @return   string      HTML for story editor
@@ -395,7 +395,7 @@
     }
 
     $oldsid = $story->EditElements('originalSid');
-    if (!empty ($oldsid)) {
+    if (!empty ($oldsid) && $mode != 'clone') {
         $delbutton = '<input type="submit" value="' . $LANG_ADMIN['delete']
                    . '" name="mode"%s' . XHTML . '>';
         $jsconfirm = ' onclick="return confirm(\'' . $MESSAGE[76] . '\');"';
@@ -736,8 +736,12 @@
     $story_templates->set_var('story_trackbacks', $story->EditElements('trackbacks'));
     $story_templates->set_var('lang_emails', $LANG24[39]);
     $story_templates->set_var('story_emails', $story->EditElements('numemails'));
-    $story_templates->set_var('story_id', $story->getSid());
-    $story_templates->set_var('old_story_id', $story->EditElements('originalSid'));
+    if ($mode == 'clone') {
+        $story_templates->set_var('story_id', COM_makesid());
+    } else {
+        $story_templates->set_var('story_id', $story->getSid());
+        $story_templates->set_var('old_story_id', $story->EditElements('originalSid'));
+    }
     $story_templates->set_var('lang_sid', $LANG24[12]);
     $story_templates->set_var('lang_save', $LANG_ADMIN['save']);
     $story_templates->set_var('lang_preview', $LANG_ADMIN['preview']);
diff -r 19b31331125c -r d8d05e77d0fe public_html/docs/history
--- a/public_html/docs/history	Sat Apr 24 16:09:15 2010 +0200
+++ b/public_html/docs/history	Sat Apr 24 17:10:25 2010 +0200
@@ -6,7 +6,13 @@
 Geeklog 1.7.0 now supports PostgreSQL, implemented by Stan Palatnik during the
 2009 Google Summer of Code.
 
-Changes since 1.6.1rc1:
+Changes since 1.7.0b1:
+- Fixed cloning of a story (bug #0001127, patch provided by Eric Brisco)
+- The installation script now recommends setting permissions to 666 for files
+  and 777 for directories that need to be writable (bug #0001126, patch
+  provided by Eric Brisco)
+- Fixed dynamic renumbering of config items when an item is deleted (bug
+  #0001074, patch provided by Eric Brisco)
 - Fixed COM_featuredCheck to ensure there's only one featured story on the front
   page [Tom]
 - Fixed Last 10 Comments display in user profiles [Tom]



More information about the geeklog-cvs mailing list