OSDN Git Service

Model::SlashDB: createStory() returns (sid, stoid) when array context
authorhylom <hylom@users.sourceforge.jp>
Tue, 28 Mar 2017 15:54:21 +0000 (00:54 +0900)
committerhylom <hylom@users.sourceforge.jp>
Tue, 28 Mar 2017 15:54:21 +0000 (00:54 +0900)
src/newslash_web/lib/Newslash/Model/SlashDB.pm

index f434790..c098546 100644 (file)
@@ -8331,7 +8331,8 @@ sub createStory {
                $firehose->createItemFromStory($stoid);
        }
 
-       return $story->{sid};
+       #return $story->{sid};
+        return wantarray ? ($story->{sid}, $stoid) : $story->{sid};
 }
 
 sub getUrlFromSid {