diff --git a/main/inc/lib/blog.lib.php b/main/inc/lib/blog.lib.php index b0155bdb1a..dab878210e 100644 --- a/main/inc/lib/blog.lib.php +++ b/main/inc/lib/blog.lib.php @@ -1314,7 +1314,7 @@ class Blog echo '
' . get_lang('NewPost') . '
'; // article title - echo '
+ echo '
*'.get_lang('Title') . '
@@ -1334,49 +1334,51 @@ class Blog } $oFCKeditor->Value = isset($_POST['post_full_text'])?stripslashes($_POST['post_full_text']):''; - echo '
-
+ echo '
+
' . get_lang('PostFullText') . '
-
'; - $oFCKeditor->Create(); - echo '
+
'; + $oFCKeditor->Create(); + echo '
'; - echo '

'; + // attachment - echo '
-
+ echo '
+
' . get_lang('AddAnAttachment') . '
-
+
'; - echo '

'; + // comment - echo '
-
+ echo '
+
' . get_lang('FileComment') . '
-
+
'; - echo '

'; + // submit - echo '
+ echo '
- - - + + +
'; echo ''; - } else { + } + else + { api_not_allowed(); } } @@ -2872,41 +2874,42 @@ class Blog } $list_content_blog=array(); $list_body_blog=array(); - - foreach($list_info as $key => $info_log) { - - $list_body_blog[]=$info_log[0]; - $list_body_blog[]=$info_log[1]; - - $visibility_icon=($info_log[2]==0) ? 'invisible' : 'visible'; - $visibility_info=($info_log[2]==0) ? 'Visible' : 'Invisible'; - $my_image.=''; - $my_image.=''; - $my_image.="\n"; - $my_image.=''; - $my_image.=''; - $my_image.="\n"; - $my_image.=''; - $my_image.=''; - $my_image.="\n"; - - $list_body_blog[]=$my_image; - $my_image=''; - $list_content_blog[]=$list_body_blog; - $list_body_blog=array(); + if (is_array($list_info)) { + foreach($list_info as $key => $info_log) { + + $list_body_blog[]=$info_log[0]; + $list_body_blog[]=$info_log[1]; + + $visibility_icon=($info_log[2]==0) ? 'invisible' : 'visible'; + $visibility_info=($info_log[2]==0) ? 'Visible' : 'Invisible'; + $my_image.=''; + $my_image.=''; + $my_image.="\n"; + $my_image.=''; + $my_image.=''; + $my_image.="\n"; + $my_image.=''; + $my_image.=''; + $my_image.="\n"; + + $list_body_blog[]=$my_image; + $my_image=''; + + $list_content_blog[]=$list_body_blog; + $list_body_blog=array(); + } + $parameters=''; + //$parameters=array('action'=>Security::remove_XSS($_GET['action'])); + $table = new SortableTableFromArrayConfig($list_content_blog, 1,20,'project'); + //$table->set_additional_parameters($parameters); + $table->set_header(0, get_lang('Title')); + $table->set_header(1, get_lang('Subtitle')); + $table->set_header(2, get_lang('Modify')); + $table->display(); } - $parameters=''; - //$parameters=array('action'=>Security::remove_XSS($_GET['action'])); - - $table = new SortableTableFromArrayConfig($list_content_blog, 1,20,'project'); - $table->set_additional_parameters($parameters); - $table->set_header(0, get_lang('Title')); - $table->set_header(1, get_lang('Subtitle')); - $table->set_header(2, get_lang('Modify')); - $table->display(); - $list_content_blog=array(); + /*$sql = "SELECT `blog_id`, `blog_name`, `blog_subtitle`, `visibility` FROM $tbl_blogs ORDER BY `blog_name`"; $result = api_sql_query($sql, __FILE__, __LINE__);