From: <ada...@us...> - 2003-08-31 22:47:38
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory sc8-pr-cvs1:/tmp/cvs-serv10285/class Modified Files: Section.php Log Message: -Fixed an error where error messages were not showing up while editing sections . -Sections will now not let you save them until all data entry errors are fixed. -Any problems in uploading images will now cause an error message to display. Index: Section.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Section.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Section.php 6 Aug 2003 02:26:32 -0000 1.5 --- Section.php 31 Aug 2003 22:47:32 -0000 1.6 *************** *** 241,251 **** /* If allowed, upload your image here */ ! if ($_SESSION['OBJ_user']->allow_access('article', 'upload_images') ! || ($_SESSION['SES_ART_master']->val['user_upload_images'] && $_SESSION['OBJ_user']->isUser())) { - $myelements[0] .= $GLOBALS['core']->formHidden('MAX_FILE_SIZE', '26000'); $myelements[0] .= $_SESSION['SES_ART_master']->get_error('SECT_loaded_image') . $_SESSION['translate']->it('Upload a new image').': ' ! . $GLOBALS['core']->formFile('SECT_loaded_image', 33, 255) . $_SESSION['OBJ_help']->show_link('article', 'section_image') . '<br />'; } --- 241,250 ---- /* If allowed, upload your image here */ ! if ($_SESSION['OBJ_user']->allow_access('article', 'upload_images') ! || ($_SESSION['SES_ART_master']->val['user_upload_images'] && $_SESSION['OBJ_user']->isUser())) { $myelements[0] .= $_SESSION['SES_ART_master']->get_error('SECT_loaded_image') . $_SESSION['translate']->it('Upload a new image').': ' ! . PHPWS_Core::formFile('SECT_loaded_image', 33, 255) . $_SESSION['OBJ_help']->show_link('article', 'section_image') . '<br />'; } *************** *** 309,313 **** asort($sect_tpl_array); $myelements[0] .= $_SESSION['translate']->it('Section Template').': ' ! . $GLOBALS['core']->formSelect('SECT_template', $sect_tpl_array, $this->template, true, NULL, NULL) . $_SESSION['OBJ_help']->show_link('article', 'section_template') . '<br /><br />'; --- 308,313 ---- asort($sect_tpl_array); $myelements[0] .= $_SESSION['translate']->it('Section Template').': ' ! . $GLOBALS['core']->formSelect('SECT_template', $sect_tpl_array ! , str_replace('_',' ',$this->template), true, NULL, NULL) . $_SESSION['OBJ_help']->show_link('article', 'section_template') . '<br /><br />'; *************** *** 389,393 **** , $_SESSION['SES_ART_master']->val['max_image_height'] , $_SESSION['SES_ART_master']->val['max_image_size'] * 1024); ! if (is_array($image)) { /* If this is replacing the original image, place the original into "old_image" */ --- 389,395 ---- , $_SESSION['SES_ART_master']->val['max_image_height'] , $_SESSION['SES_ART_master']->val['max_image_size'] * 1024); ! if (PHPWS_Error::isError($image)) ! $_SESSION['SES_ART_master']->error['SECT_loaded_image'][] = $image->_message; ! else { /* If this is replacing the original image, place the original into "old_image" */ *************** *** 404,409 **** $this->image['directory'] = $this->AssignDir(); } - else - $GLOBALS['CNT_article']['content'] .= $image; } /* otherwise, if a file was selected from the library... */ --- 406,409 ---- |