Changeset 1408


Ignore:
Timestamp:
Jan 4, 2014, 2:01:42 AM (4 years ago)
Author:
dkg
Message:

passing parameters directly instead of just the proposal ID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jpdd/class.jpdd.proposal.php

    r1407 r1408  
    187187     
    188188      return '<form action="'.$jpdd->Path('accept', 'proposal', $this->getID()).'" method="post">
    189 '.$jpdd->getFormTokenHiddenInput().'
    190 <input type="hidden" name="add_presenter[]" value="'.(int)$this->_proposer_id.'/>'.
     189'.$jpdd->getFormTokenHiddenInput().
     190        '<input type="hidden" name="title" value="'.htmlentities($this->_title).'"/>'.
     191        '<input type="hidden" name="short_title" value="'.htmlentities($this->_short_title).'"/>'.
     192        '<input type="hidden" name="description" value="'.htmlentities($this->_description).'"/>'.
     193        '<input type="hidden" name="private_notes" value="'.htmlentities($this->_private_notes).'"/>'.
     194        '<input type="hidden" name="min_attendees" value="'.htmlentities($this->_min_attendees).'"/>'.
     195        '<input type="hidden" name="max_attendees" value="'.htmlentities($this->_max_attendees).'"/>'.
     196        '<input type="hidden" name="add_presenter[]" value="'.(int)$this->_proposer_id.'/>'.
    191197        $categories.
    192198'<input class="submit" type="submit" name="xx" value="Create a workshop from this proposal"/>
     
    198204      // create the workshop based on this proposal
    199205      $map = $jpdd->prepClass('workshop');
    200       $args = array('title' => $this->_title,
    201                     'short_title' => $this->_short_title,
    202                     'description' => $this->_description,
    203                     'private_notes' => $this->_private_notes,
    204                     'min_attendees' => $this->_min_attendees,
    205                     'max_attendees' => $this->_max_attendees,
    206                     'event_id' => $this->_event_id,
    207                     'proposal_id' => $this->_proposal_id);
    208       $workshop = new $map['classname']($args);
     206      $workshop = new $map['classname'](array('proposal_id' => $this->getID()));
    209207      $workshop->handleCreation();
    210208
Note: See TracChangeset for help on using the changeset viewer.