Changeset 768 for trunk


Ignore:
Timestamp:
Jan 27, 2014, 10:55:37 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Disable unimplemented edit actions on Page class.
Location:
trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/Page.php

    r765 r768  
    1212    $this->System = &$System;
    1313    $this->Database = &$System->Database;
    14     $this->RawPage = false;   
     14    $this->RawPage = false;
    1515  }
    1616       
     
    4040    $this->ItemActions = array(
    4141      array('Name' => T('View'), 'URL' => '?action=view&id=#Id'),
    42       array('Name' => T('Delete'), 'URL' => '?action=remove&id=#Id'),
    4342    );
     43    $this->AllowEdit = false;   
     44    if($this->AllowEdit) $this->ItemActions[] = array('Name' => T('Delete'), 'URL' => '?action=remove&id=#Id');
    4445        }
    4546       
     
    7576        '</table>';
    7677                } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL);
    77                 $Output .= '<a href="?action=add">'.T('Add').'</a> ';
    78                 $Output .= '<a href="?action=edit&amp;id='.$_GET['id'].'">'.T('Edit').'</a> ';
    79                 $Output .= '<a href="?action=delete&amp;id='.$_GET['id'].'">'.T('Add').'</a> ';
     78                if($this->AllowEdit)
     79                {
     80                  $Output .= '<a href="?action=add">'.T('Add').'</a> ';
     81                  $Output .= '<a href="?action=edit&amp;id='.$_GET['id'].'">'.T('Edit').'</a> ';
     82                  $Output .= '<a href="?action=delete&amp;id='.$_GET['id'].'">'.T('Add').'</a> ';
     83                }
    8084                $Output .= '<a href="?">'.T('List').'</a><br/>';
    8185    return($Output);
     
    120124        }       
    121125        $Output .= '</td>';
    122       }       
     126      }
    123127                  $Output .= '</tr>';   
    124128                }
    125129                $Output .= '</table>';
    126                 $Output .= '<a href="?action=add">'.T('Add').'</a><br/>';
     130                if($this->AllowEdit) $Output .= '<a href="?action=add">'.T('Add').'</a><br/>';
    127131                return($Output);
    128132  }
  • trunk/includes/Version.php

    r767 r768  
    66// and system will need database update.
    77
    8 $Revision = 768; // Subversion revision
     8$Revision = 769; // Subversion revision
    99$DatabaseRevision = 748; // Database structure revision
    1010$ReleaseTime = '2014-01-27';
Note: See TracChangeset for help on using the changeset viewer.