finishing changes in models, removing last md5 test cases, tightening up allowed POST data
This commit is contained in:
@@ -167,6 +167,19 @@ class Helper
|
||||
return json_encode($example);
|
||||
}
|
||||
|
||||
/**
|
||||
* get example paste, as received via POST by user
|
||||
*
|
||||
* @param int $version
|
||||
* @return array
|
||||
*/
|
||||
public static function getPastePost()
|
||||
{
|
||||
$example = self::getPaste();
|
||||
$example['meta'] = array('expire' => $example['meta']['expire']);
|
||||
return $example;
|
||||
}
|
||||
|
||||
/**
|
||||
* get example paste ID
|
||||
*
|
||||
@@ -203,15 +216,10 @@ class Helper
|
||||
* @param int $version
|
||||
* @return array
|
||||
*/
|
||||
public static function getCommentPost(int $version = 2)
|
||||
public static function getCommentPost()
|
||||
{
|
||||
$example = self::getComment($version);
|
||||
if ($version === 1) {
|
||||
$example['nickname'] = $example['meta']['nickname'];
|
||||
unset($example['meta']['nickname']);
|
||||
} else {
|
||||
unset($example['meta']);
|
||||
}
|
||||
$example = self::getComment();
|
||||
unset($example['meta']);
|
||||
return $example;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user