From: Wendall C. <wen...@us...> - 2005-03-23 20:37:10
|
Update of /cvsroot/phpwsbb/phpwsbb/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28487/class Modified Files: ImgLibrary.php Manager.php Log Message: fixed save settings Index: Manager.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/Manager.php,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Manager.php 4 Mar 2005 18:19:42 -0000 1.63 --- Manager.php 23 Mar 2005 20:36:05 -0000 1.64 *************** *** 1226,1234 **** case 'saveusersettings': ! if (!isset($_REQUEST['IMGLib_op'])) { ! $result = $this->_saveUserSettings(); ! $GLOBALS['CNT_phpwsbb']['title'] = $result['title']; ! $GLOBALS['CNT_phpwsbb']['content'] .= $result['content']; ! } break; --- 1226,1232 ---- case 'saveusersettings': ! $result = $this->_saveUserSettings(); ! $GLOBALS['CNT_phpwsbb']['title'] = $result['title']; ! $GLOBALS['CNT_phpwsbb']['content'] .= $result['content']; break; Index: ImgLibrary.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/class/ImgLibrary.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImgLibrary.php 23 Mar 2005 19:33:02 -0000 1.1 --- ImgLibrary.php 23 Mar 2005 20:36:04 -0000 1.2 *************** *** 246,283 **** ! /** ! * Determines & performs the requested PHPWS_IMGLib operation. ! * ! * @author Eloi George <el...@NO...> ! * @param string $op Action to be performed ! * @return none ! * @access public ! */ ! function action ($op='view_gallery') { ! if ($op=='upload_image' && $this->_can_manage_images) ! $this->upload_image(); ! elseif ($op=='delete_image' && $this->_can_manage_images) ! $this->delete_image(); ! elseif ($op=='move_image' && $this->_can_manage_images) ! $this->move_image(); ! elseif ($op=='image_mgmt' && isset($_POST['IMGLib_delete']) && $this->_can_manage_images) ! $this->delete_image(); ! elseif ($op=='create_gallery' && $this->_can_manage_galleries) { ! if (!$this->update_settings(stripslashes($_POST['IMGLib_new_gallery'])) ! || !$this->_current_view = ! array_search(stripslashes($_POST['IMGLib_new_gallery']), $this->_galleries)) { ! reset($this->_galleries); ! $this->_current_view = key($this->_galleries); ! } ! $this->view_gallery(); ! } ! elseif ($op=='delete_gallery' && $this->_can_manage_galleries) ! $this->delete_gallery(); ! elseif ($op=='rename_gallery' && $this->_can_manage_galleries) ! $this->rename_gallery(); ! elseif ($op=='update_settings' && $this->_can_manage_galleries) ! $this->update_settings(); ! else ! $this->view_gallery(); }// END FUNC action() --- 246,298 ---- ! /** ! * Determines & performs the requested PHPWS_IMGLib operation. ! * ! * @author Eloi George <el...@NO...> ! * @param string $op Action to be performed ! * @return none ! * @access public ! */ ! function action ($op='view_gallery') { ! if($this->_can_manage_images) { ! switch($op) { ! case 'upload_image': ! $this->upload_image(); ! break; ! case 'delete_image': ! $this->delete_image(); ! break; ! case 'move_image': ! $this->move_image(); ! break; ! case 'image_mgmt': ! if(isset($_POST['IMGLib_delete'])) ! $this->delete_image(); ! break; ! case 'create_gallery': ! if (!$this->update_settings(stripslashes($_POST['IMGLib_new_gallery'])) ! || !$this->_current_view = ! array_search(stripslashes($_POST['IMGLib_new_gallery']), $this->_galleries)) { ! reset($this->_galleries); ! $this->_current_view = key($this->_galleries); ! } ! $this->view_gallery(); ! break; ! case 'delete_gallery': ! $this->delete_gallery(); ! break; ! case 'rename_gallery': ! $this->rename_gallery(); ! break; ! case 'update_settings': ! $this->update_settings(); ! break; ! case 'Show Gallery': ! $this->view_gallery(); ! break; ! } ! } else { ! $this->view_gallery(); ! } }// END FUNC action() *************** *** 410,413 **** --- 425,429 ---- $tags['IMAGE_SELECT_DLG'] = $vars . PHPWS_Form::formHidden('IMGLib_selected_gallery', $this->_base_dir.'/'.$this->_current_view.'/') + . PHPWS_Form::formHidden('user',$_POST['user']) . $_SESSION['translate']->it('With selected [var1]',$this->_image_type).': ' . PHPWS_Form::formSelect('IMGLib_op', $ops) *************** *** 423,427 **** $tags['GALL_CHOOSE_DLG'] = PHPWS_Form::makeForm('IMGLib_choose_dlg', 'index.php', $form, 'post', 0, TRUE); $tags['GALL_EXIT_LNK'] = '[<a href="index.php?module='.$this->_module ! . '&IMGLib_op=exit&IMGLib_return_data='.$this->_return_data.'">' . $_SESSION['translate']->it('Exit The Gallery').'</a>]'; if ($this->_can_manage_images) { $tags['IMAGE_MGMT_TITLE'] = ucfirst($this->_image_type).' '.$_SESSION['translate']->it('Upload'); --- 439,443 ---- $tags['GALL_CHOOSE_DLG'] = PHPWS_Form::makeForm('IMGLib_choose_dlg', 'index.php', $form, 'post', 0, TRUE); $tags['GALL_EXIT_LNK'] = '[<a href="index.php?module='.$this->_module ! . '&IMGLib_op=exit&user='.$_POST['user'].'&IMGLib_return_data='.$this->_return_data.'">' . $_SESSION['translate']->it('Exit The Gallery').'</a>]'; if ($this->_can_manage_images) { $tags['IMAGE_MGMT_TITLE'] = ucfirst($this->_image_type).' '.$_SESSION['translate']->it('Upload'); *************** *** 516,519 **** --- 532,536 ---- $this->view_gallery(); else { + $str1 = ''; $GLOBALS[$this->_block]['title'] = $_SESSION['translate']->it('Image Library').' - '. $str1 .'!'; $GLOBALS[$this->_block]['content'] = $_SESSION['translate']->it('The [var1] <b>"[var2]"</b> could not be [var3]' |