application/models/Checklistitem_model.php
/**
     * Creates or modifies a checklist item object.
     */
Creates or modifies a checklist item object.
Creates or modifies a checklist item object .
public function store($post) {        
        $now = date('Y-m-d h:i:s');
        $checklistitem = ($post['checklistitem_id']==0 ? R::dispense('checklistitem') : R::load('checklistitem', $post['checklistitem_id']));
        $checklistitem->item = $post['item'];
        if($post['checklistitem_id']==0) {
            $checklistitem->created = $now;
            $checklistitem->created_by = $_SESSION['user_id'];
        } else {
            $checklistitem->modified = $now;
            $checklistitem->modified_by = $_SESSION['user_id'];
        }
        R::store($checklistitem);
    }
public function store ( $ post ) { $ now = date ( 'Y-m-d h:i:s' ) ; $ checklistitem = ( $ post [ 'checklistitem_id' ] == 0 ? R :: dispense ( 'checklistitem' ) : R :: load ( 'checklistitem' , $ post [ 'checklistitem_id' ] ) ) ; $ checklistitem -> item = $ post [ 'item' ] ; if ( $ post [ 'checklistitem_id' ] == 0 ) { $ checklistitem -> created = $ now ; $ checklistitem -> created_by = $ _SESSION [ 'user_id' ] ; } else { $ checklistitem -> modified = $ now ; $ checklistitem -> modified_by = $ _SESSION [ 'user_id' ] ; } R :: store ( $ checklistitem ) ; }
Creates or modifies a checklist item object.
Creates or modifies a checklist item object .