/**
  * Save a post
  *
  */
 static function SavePost($post_index, $post)
 {
     global $gpAdmin;
     gpFiles::cleanText($post['content']);
     $post['username'] = $gpAdmin['username'];
     $post_file = SimpleBlogCommon::PostFilePath($post_index);
     if (!gpFiles::SaveArray($post_file, 'post', $post)) {
         message($langmessage['OOPS'] . ' (Post not saved)');
         return false;
     }
     //remove from old data file
     $posts = SimpleBlogCommon::GetPostFile($post_index, $post_file);
     if (isset($posts[$post_index])) {
         unset($posts[$post_index]);
         gpFiles::SaveArray($post_file, 'posts', $posts);
     }
     return true;
 }