Mine
public text v1 · immutableinclude './gallery2/embed.php';
GalleryEmbed::init(array('fullInit' => true));
$itemId = GalleryUtilities::getRequestVariables('itemId');
list ($ret, $comment) =
GalleryCoreApi::newFactoryInstance('GalleryEntity', 'GalleryComment');
$ret = $comment->create($itemId);
$comment->setCommenterId($oldCom->userId);
$comment->setHost('');
$comment->setSubject('');
$comment->setComment($oldCom->text);
$comment->setDate(time());
$ret = $comment->save();
GalleryEmbed::done();