From: Eloi G. <ada...@us...> - 2004-09-15 20:53:45
|
Update of /cvsroot/phpwsbb/phpwsbb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4007 Modified Files: index.php Log Message: Standardized code spacing Index: index.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/index.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** index.php 15 Sep 2004 19:29:40 -0000 1.12 --- index.php 15 Sep 2004 20:53:35 -0000 1.13 *************** *** 51,93 **** if (isset($_REQUEST['IMGLib_op']) && $_SESSION['OBJ_user']->user_id) { ! /* If this just got called from the profile editing screen, save all data entered so far */ ! if (isset($_REQUEST['PHPWSBB_MAN_OP'])) ! $_SESSION['PHPWSBB_Manager']->_saveUserSettings(); ! /* If an image was selected from the library... */ ! if ($_REQUEST['IMGLib_op']=='select_image') { ! $_POST['IMGLib_selected_image'] = pos($_POST['IMGLib_selected_image']); ! $_SESSION['PHPWSBB_Manager']->_getUserSettings(); ! return; ! } ! /* Handle gallery exit requests */ ! if ($_REQUEST['IMGLib_op']=='exit') { ! if ($_REQUEST['IMGLib_return_data']=='edit') ! $_SESSION['PHPWSBB_Manager']->_getUserSettings(); ! return; ! } ! /* Show the image galleries. linkBack, current_image, & current_gallery ! * are already set as POSTs from the calling form. ! */ ! require_once PHPWS_SOURCE_DIR . 'core/ImgLibrary.php'; ! $library = new PHPWS_IMGLib($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatars') ! , $_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatar_galleries') ! , true, null, null, null, 'phpwsbb', 'library', 'CNT_phpwsbb', 'avatar' ! , $_SESSION['PHPWSBB_Manager']->_max_avatar_size*1024 ! , $_SESSION['PHPWSBB_Manager']->_max_avatar_height ! , $_SESSION['PHPWSBB_Manager']->_max_avatar_width); ! $library->action($_REQUEST['IMGLib_op']); ! /* If an image was moved between galleries... */ ! if ($_REQUEST['IMGLib_op']=='move_image' && $library->_done) { ! $sql = 'UPDATE mod_phpwsbb_user_info SET avatar_dir="' ! . $library->_base_dir.'/'.$_POST['IMGLib_selected_gallery'] ! . '/" WHERE avatar_dir="' ! . $library->_base_dir.'/'.$library->_current_view ! . '/" AND avatar_file IN ("' ! . implode('","', $_POST['IMGLib_selected_image']) ! . '")'; ! /* Change directory names in all relevant sections */ ! $GLOBALS['core']->query($sql, true); ! } } } ! ?> --- 51,93 ---- if (isset($_REQUEST['IMGLib_op']) && $_SESSION['OBJ_user']->user_id) { ! /* If this just got called from the profile editing screen, save all data entered so far */ ! if (isset($_REQUEST['PHPWSBB_MAN_OP'])) ! $_SESSION['PHPWSBB_Manager']->_saveUserSettings(); ! /* If an image was selected from the library... */ ! if ($_REQUEST['IMGLib_op']=='select_image') { ! $_POST['IMGLib_selected_image'] = pos($_POST['IMGLib_selected_image']); ! $_SESSION['PHPWSBB_Manager']->_getUserSettings(); ! return; ! } ! /* Handle gallery exit requests */ ! if ($_REQUEST['IMGLib_op']=='exit') { ! if ($_REQUEST['IMGLib_return_data']=='edit') ! $_SESSION['PHPWSBB_Manager']->_getUserSettings(); ! return; ! } ! /* Show the image galleries. linkBack, current_image, & current_gallery ! * are already set as POSTs from the calling form. ! */ ! require_once PHPWS_SOURCE_DIR . 'core/ImgLibrary.php'; ! $library = new PHPWS_IMGLib($_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatars') ! , $_SESSION['OBJ_user']->allow_access('phpwsbb', 'edit_avatar_galleries') ! , true, null, null, null, 'phpwsbb', 'library', 'CNT_phpwsbb', 'avatar' ! , $_SESSION['PHPWSBB_Manager']->_max_avatar_size*1024 ! , $_SESSION['PHPWSBB_Manager']->_max_avatar_height ! , $_SESSION['PHPWSBB_Manager']->_max_avatar_width); ! $library->action($_REQUEST['IMGLib_op']); ! /* If an image was moved between galleries... */ ! if ($_REQUEST['IMGLib_op']=='move_image' && $library->_done) { ! $sql = 'UPDATE mod_phpwsbb_user_info SET avatar_dir="' ! . $library->_base_dir.'/'.$_POST['IMGLib_selected_gallery'] ! . '/" WHERE avatar_dir="' ! . $library->_base_dir.'/'.$library->_current_view ! . '/" AND avatar_file IN ("' ! . implode('","', $_POST['IMGLib_selected_image']) ! . '")'; ! /* Change directory names in all relevant sections */ ! $GLOBALS['core']->query($sql, true); ! } } } ! ?> \ No newline at end of file |