[Logicampus-cvs] logicampus/src/logicreate/services/lobrepo edit.lcp, 1.21, 1.22
Brought to you by:
trilexcom
From: Mark K <har...@us...> - 2008-02-17 04:10:34
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv15762 Modified Files: edit.lcp Log Message: adding proper meta data editing for all types of content. Index: edit.lcp =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/services/lobrepo/edit.lcp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** edit.lcp 8 Oct 2007 22:18:54 -0000 1.21 --- edit.lcp 17 Feb 2008 04:10:26 -0000 1.22 *************** *** 96,99 **** --- 96,100 ---- $lob->updateAsFile($lc->postvars['txTitle'], 'image'); } + $lob->set('lobDescription', $lc->postvars['description']); if ($lc->postvars['lob_sub_type'] == 'text') { *************** *** 129,133 **** - $lob->updateMeta($lc->postvars); $lob->save(); //get the new ID if a new save --- 130,133 ---- *************** *** 151,155 **** $this->presentor = 'redirectPresentation'; ! $t['url'] = appurl('lobrepo/edit/c='.$id); } --- 151,192 ---- $this->presentor = 'redirectPresentation'; ! $t['url'] = appurl('lobrepo/edit/event=meta/id='.$id); ! } ! ! ! /** ! * Show form for editing meta-data ! */ ! function metaRun(&$db,&$u,&$lc,&$t) { ! $lobId = intval($lc->getvars['id']); ! $lc->templateName = 'edit_meta'; ! $lob = new Lc_Lob_Content($lobId); ! $t['lob'] = $lob; ! $t['licenses'] = $this->getLicenseArray(); ! // $lob->updateMeta($lc->postvars); ! } ! ! /** ! * Save meta-data changes ! */ ! function saveMetaRun(&$db,&$u,&$lc,&$t) { ! $lobId = intval($lc->getvars['id']); ! if ($lobId < 1) { ! trigger_error('no valid ID found'); ! return false; ! } ! $lc->templateName = 'edit_meta'; ! $lob = new Lc_Lob_Content($lobId); ! if ($lob->repoObj->isNew()) { ! trigger_error('unable to load content object.'); ! return false; ! } ! $lob->updateMeta($lc->postvars); ! $lob->save(); ! ! $u->addSessionMessage('Successfully saved <i>"'.htmlentities($lob->get('lobTitle'),ENT_QUOTES, 'UTF-8').'"</i>.'); ! ! $this->presentor = 'redirectPresentation'; ! $t['url'] = appurl('lobrepo/edit/c='.$lob->repoObj->getPrimaryKey()); } *************** *** 212,215 **** --- 249,258 ---- } + + function getLicenseArray() { + return array('ccl30' => 'Creative Commons License 3.0', + 'ccancsa30' => 'Creative Commons Attribution-Noncommercial-Share Alike 3.0', + 'private' => 'Private Copyright'); + } } |