Changeset 1935

Show
Ignore:
Timestamp:
2006-02-02 13:37:24 (3 years ago)
Author:
ctford
Message:

Check permissions before allowing users to do clip editing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Anode/trunk/acidfree/class_annodex.inc

    r1932 r1935  
    158158function theme_annodex_control(&$node) { 
    159159 
     160        global $user; 
     161 
     162        if (user_access('edit own acidfree elements') && $user->uid == $node->uid) { 
     163                $editing = TRUE; 
     164        }  
     165 
    160166        $arg_name = "media"; 
    161167         
     
    187193        } else { 
    188194 
    189                 if( $_POST['id'] ) { 
     195                if( $editing && $_POST['id'] ) { 
    190196                        insert_clip( $_POST );   
    191197                } 
     
    205211 
    206212                /* Add new clip form */ 
    207                 $output .= '<form name="clipform" action="?q=node/'.$node->nid.'" method="POST"> 
     213                if( $editing ) { 
     214                        $output .= '<form name="clipform" action="?q=node/'.$node->nid.'" method="POST"> 
    208215<div> 
    209216<br /><br /> 
    210 <input name="desc" type="text" size="25" value=""> 
     217<input name="desc" type="text" size="25" value=""><--Description 
    211218<br /> 
    212 <input name="id" type="text" size="25" value=""> 
     219<input name="id" type="text" size="25" value=""><--ID 
    213220<br /> 
    214221<input name="start_hours" type="text" size="1" value="00"> 
    215222<input name="start_minutes" type="text" size="1" value="00"> 
    216 <input name="start_seconds" type="text" size="1" value="00"> 
     223<input name="start_seconds" type="text" size="1" value="00"><--Start time 
    217224<br /><input type="submit" value="Add new clip"><br /> 
    218225</div> 
    219226</form>'; 
    220                  
     227                } 
    221228                 
    222229