Update of /cvsroot/phpwebsite-comm/modules/article/inc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1462/inc
Modified Files:
AM_list_articles.php A_edit.php
Log Message:
Bug Fixes
Index: A_edit.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_edit.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** A_edit.php 19 Feb 2004 21:46:46 -0000 1.1
--- A_edit.php 21 Apr 2004 19:55:40 -0000 1.2
***************
*** 63,70 ****
if($SECT_id == $value)
{
! if (isset($_SESSION['SES_ART_section']) && $value==$_SESSION['SES_ART_section']->id)
! $is_new_section = false;
! else
$_SESSION['SES_ART_section'] = $this->sections[$value];
$article_body .= $_SESSION['SES_ART_section']->edit_section();
}
--- 63,69 ----
if($SECT_id == $value)
{
! if (isset($_SESSION['SES_ART_section']) && $value!=$_SESSION['SES_ART_section']->id)
$_SESSION['SES_ART_section'] = $this->sections[$value];
+ $is_new_section = false;
$article_body .= $_SESSION['SES_ART_section']->edit_section();
}
Index: AM_list_articles.php
===================================================================
RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_list_articles.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AM_list_articles.php 19 Feb 2004 21:46:46 -0000 1.1
--- AM_list_articles.php 21 Apr 2004 19:55:23 -0000 1.2
***************
*** 76,84 ****
/* Now create the Row HTML */
foreach($result as $value)
{
$row = array();
! PHPWS_WizardBag::toggle($bg, " class=\"bg_medium\"");
! $row['BG'] = $bg;
/* If this page is viewable, allow the user to toggle the mainpage switch. */
--- 76,87 ----
/* Now create the Row HTML */
+ $count=1;
foreach($result as $value)
{
$row = array();
! if ($count++%2)
! $row['ODDROW'] = ' ';
! // PHPWS_WizardBag::toggle($bg, " class=\"bg_medium\"");
! // $row['BG'] = $bg;
/* If this page is viewable, allow the user to toggle the mainpage switch. */
***************
*** 105,109 ****
/* Set up date */
! $row['DATE'] = substr($value[$temp_date],0,10);
/* Set var to expire/publish the article if it's not the home page */
--- 108,113 ----
/* Set up date */
! if(!$row['DATE'] = substr($value[$temp_date],0,10))
! $row['DATE'] = ' ';
/* Set var to expire/publish the article if it's not the home page */
***************
*** 112,118 ****
?'<input type="submit" name="ARTICLE_vars[edit:expire]" value="'.$Fexpire.'" />'
:'<input type="submit" name="ARTICLE_vars[edit:publish]" value="'.$Fpublish.'" />';
/* Set up Edit button */
! if ($this->can("edit",$value['created_username']))
/* If someone else is not editing this page... */
if (!PHPWS_Article::isLocked($value['editlock'], $value['edituser']))
--- 116,126 ----
?'<input type="submit" name="ARTICLE_vars[edit:expire]" value="'.$Fexpire.'" />'
:'<input type="submit" name="ARTICLE_vars[edit:publish]" value="'.$Fpublish.'" />';
+ else
+ $row['PUB_EXP'] = ' ';
+
/* Set up Edit button */
! if ($this->can('edit',$value['created_username']))
! {
/* If someone else is not editing this page... */
if (!PHPWS_Article::isLocked($value['editlock'], $value['edituser']))
***************
*** 121,128 ****
--- 129,141 ----
else
$row['EDIT'] = '['.$_SESSION['translate']->it('Locked').']';
+ }
+ else
+ $row['EDIT'] = ' ';
/* Set up Delete button */
if (isset($Fdelete))
$row['DELETE'] = '<input type="submit" name="ARTICLE_vars[edit:delete]" value="'.$Fdelete.'" />';
+ else
+ $row['DELETE'] = ' ';
$content[0] = '<input type="hidden" name="module" value="article" id='.$value['id'].' />'
***************
*** 150,152 ****
$this->popbox($_SESSION['translate']->it('Current Articles'), $content);
! ?>
--- 163,165 ----
$this->popbox($_SESSION['translate']->it('Current Articles'), $content);
! ?>
\ No newline at end of file
|