Empty posts bug
This commit is contained in:
parent
40c5e2ee3e
commit
4b3f10e0f5
3 changed files with 7 additions and 1 deletions
|
@ -50,6 +50,7 @@ You are not even logged in. = "Du bist nicht mal eingeloggt."
|
|||
|
||||
; post.class.php
|
||||
You need to be logged in to perform this action. = "Du musst angemeldet sein, um diese Aktion durchzuführen."
|
||||
No data. = "Keine Daten."
|
||||
|
||||
; log.class.php
|
||||
Can't write to %s.log file. = "Kann nicht in %s.log Datei schreiben."
|
|
@ -50,6 +50,7 @@ You are not even logged in. = "You are not even logged in."
|
|||
|
||||
; post.class.php
|
||||
You need to be logged in to perform this action. = "You need to be logged in to perform this action."
|
||||
No data. = "No data."
|
||||
|
||||
; log.class.php
|
||||
Can't write to %s.log file. = "Can't write to %s.log file."
|
|
@ -69,9 +69,13 @@ class Post
|
|||
|
||||
public static function insert($r){
|
||||
self::login_protected();
|
||||
|
||||
|
||||
$data = self::raw_data($r);
|
||||
|
||||
if(empty($data['text'])){
|
||||
throw new Exception(__("No data."));
|
||||
}
|
||||
|
||||
$data['plain_text'] = $data['text'];
|
||||
$data['text'] = self::parse_content($data['text']);
|
||||
$data['datetime'] = 'NOW()';
|
||||
|
|
Loading…
Add table
Reference in a new issue