| 194 | | |
| 195 | | if (!$data) { |
| 196 | | Session::error( _t("Could not find information for {$form->quick_url->value}", 'blogroll') ); |
| 197 | | Utils::redirect( URL::get( 'admin', 'page=publish&content_type=blogroll' ) ); |
| 198 | | exit; |
| | 194 | if ( $data ) { |
| | 195 | $data = array_map( create_function('$a', 'return InputFilter::filter($a);'), $data ); |
| | 196 | $post->title= $data['name']; |
| | 197 | $post->info->url= $data['url']; |
| | 198 | $post->content= $data['description']; |
| | 199 | $post->info->feedurl= $data['feed']; |
| | 200 | $post->slug= Utils::slugify($data['name']); |
| | 201 | $post->status= Post::status('published'); |
| 200 | | $data = array_map( create_function('$a', 'return InputFilter::filter($a);'), $data ); |
| 201 | | $post->title= $data['name']; |
| 202 | | $post->info->url= $data['url']; |
| 203 | | $post->content= $data['description']; |
| 204 | | $post->info->feedurl= $data['feed']; |
| 205 | | $post->slug= Utils::slugify($data['name']); |
| 206 | | $post->status= Post::status('published'); |
| 207 | | |
| 208 | | } else { |
| 209 | | foreach ($this->info_fields as $field_name) { |
| 210 | | $post->info->$field_name= $form->$field_name->value; |
| | 203 | else { |
| | 204 | Session::error( _t("Could not find information for {$form->quick_url->value}. Please enter the information manually.", 'blogroll') ); |
| | 205 | $post->info->url = $form->quick_url->value; |
| | 206 | return; |