|
From: Verdon V. <ve...@us...> - 2008-07-24 12:40:41
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15010/class Modified Files: RDX_Forms.php RDX_Member.php Rolodex.php Log Message: steps toward 1.1.0 Index: RDX_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RDX_Forms.php 17 Jul 2008 13:50:21 -0000 1.19 --- RDX_Forms.php 24 Jul 2008 12:40:18 -0000 1.20 *************** *** 870,874 **** $form->addText('business_name', $member->business_name); $form->setSize('business_name', 40); ! $form->setLabel('business_name', dgettext('rolodex', 'Business/Organization name')); $form->addText('department', $member->department); --- 870,874 ---- $form->addText('business_name', $member->business_name); $form->setSize('business_name', 40); ! $form->setLabel('business_name', dgettext('rolodex', 'Business/Organization')); $form->addText('department', $member->department); *************** *** 1033,1037 **** } ! if (PHPWS_Settings::get('rolodex', 'custom5_name')) { $form->addText('custom5', $member->custom5); $form->setSize('custom5', 40); --- 1033,1037 ---- } ! if (PHPWS_Settings::get('rolodex', 'custom5_name') && Current_User::allow('rolodex', 'edit_member')) { $form->addText('custom5', $member->custom5); $form->setSize('custom5', 40); *************** *** 1039,1043 **** } ! if (PHPWS_Settings::get('rolodex', 'custom6_name')) { $form->addText('custom6', $member->custom6); $form->setSize('custom6', 40); --- 1039,1043 ---- } ! if (PHPWS_Settings::get('rolodex', 'custom6_name') && Current_User::allow('rolodex', 'edit_member')) { $form->addText('custom6', $member->custom6); $form->setSize('custom6', 40); *************** *** 1045,1049 **** } ! if (PHPWS_Settings::get('rolodex', 'custom7_name')) { $form->addText('custom7', $member->custom7); $form->setSize('custom7', 40); --- 1045,1049 ---- } ! if (PHPWS_Settings::get('rolodex', 'custom7_name') && Current_User::allow('rolodex', 'edit_member')) { $form->addText('custom7', $member->custom7); $form->setSize('custom7', 40); *************** *** 1051,1055 **** } ! if (PHPWS_Settings::get('rolodex', 'custom8_name')) { $form->addText('custom8', $member->custom8); $form->setSize('custom8', 40); --- 1051,1055 ---- } ! if (PHPWS_Settings::get('rolodex', 'custom8_name') && Current_User::allow('rolodex', 'edit_member')) { $form->addText('custom8', $member->custom8); $form->setSize('custom8', 40); *************** *** 1081,1085 **** $tpl['SETTINGS_GROUP_LABEL'] = dgettext('rolodex', 'Settings'); $tpl['SELECT_LIST_TIP'] = dgettext('rolodex', 'To use the category, location, or feature lists, select an item from the list and click on the "+" symbool to add the selection to this profile. To remove a selection, click on the name of the item in the box below the select menu.'); ! if (PHPWS_Settings::get('rolodex', 'custom1_name') || PHPWS_Settings::get('rolodex', 'custom2_name') || PHPWS_Settings::get('rolodex', 'custom3_name') || PHPWS_Settings::get('rolodex', 'custom4_name') || PHPWS_Settings::get('rolodex', 'custom5_name') || PHPWS_Settings::get('rolodex', 'custom6_name') || PHPWS_Settings::get('rolodex', 'custom7_name') || PHPWS_Settings::get('rolodex', 'custom8_name')) { $tpl['META_GROUP_LABEL'] = dgettext('rolodex', 'Extra'); } --- 1081,1093 ---- $tpl['SETTINGS_GROUP_LABEL'] = dgettext('rolodex', 'Settings'); $tpl['SELECT_LIST_TIP'] = dgettext('rolodex', 'To use the category, location, or feature lists, select an item from the list and click on the "+" symbool to add the selection to this profile. To remove a selection, click on the name of the item in the box below the select menu.'); ! if (PHPWS_Settings::get('rolodex', 'custom1_name') || ! PHPWS_Settings::get('rolodex', 'custom2_name') || ! PHPWS_Settings::get('rolodex', 'custom3_name') || ! PHPWS_Settings::get('rolodex', 'custom4_name') || ! (PHPWS_Settings::get('rolodex', 'custom5_name') && Current_User::allow('rolodex', 'edit_member')) || ! (PHPWS_Settings::get('rolodex', 'custom6_name') && Current_User::allow('rolodex', 'edit_member')) || ! (PHPWS_Settings::get('rolodex', 'custom7_name') && Current_User::allow('rolodex', 'edit_member')) || ! (PHPWS_Settings::get('rolodex', 'custom8_name') && Current_User::allow('rolodex', 'edit_member')) ! ) { $tpl['META_GROUP_LABEL'] = dgettext('rolodex', 'Extra'); } Index: Rolodex.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Rolodex.php 17 Jul 2008 13:50:21 -0000 1.16 --- Rolodex.php 24 Jul 2008 12:40:18 -0000 1.17 *************** *** 835,866 **** --- 835,882 ---- if (!empty($_POST['custom1_name'])) { PHPWS_Settings::set('rolodex', 'custom1_name', PHPWS_Text::parseInput(strip_tags($_POST['custom1_name']))); + } else { + PHPWS_Settings::set('rolodex', 'custom1_name', null); } if (!empty($_POST['custom2_name'])) { PHPWS_Settings::set('rolodex', 'custom2_name', PHPWS_Text::parseInput(strip_tags($_POST['custom2_name']))); + } else { + PHPWS_Settings::set('rolodex', 'custom2_name', null); } if (!empty($_POST['custom3_name'])) { PHPWS_Settings::set('rolodex', 'custom3_name', PHPWS_Text::parseInput(strip_tags($_POST['custom3_name']))); + } else { + PHPWS_Settings::set('rolodex', 'custom3_name', null); } if (!empty($_POST['custom4_name'])) { PHPWS_Settings::set('rolodex', 'custom4_name', PHPWS_Text::parseInput(strip_tags($_POST['custom4_name']))); + } else { + PHPWS_Settings::set('rolodex', 'custom4_name', null); } if (!empty($_POST['custom5_name'])) { PHPWS_Settings::set('rolodex', 'custom5_name', PHPWS_Text::parseInput(strip_tags($_POST['custom5_name']))); + } else { + PHPWS_Settings::reset('rolodex', 'custom5_name'); } if (!empty($_POST['custom6_name'])) { PHPWS_Settings::set('rolodex', 'custom6_name', PHPWS_Text::parseInput(strip_tags($_POST['custom6_name']))); + } else { + PHPWS_Settings::set('rolodex', 'custom6_name', null); } if (!empty($_POST['custom7_name'])) { PHPWS_Settings::set('rolodex', 'custom7_name', PHPWS_Text::parseInput(strip_tags($_POST['custom7_name']))); + } else { + PHPWS_Settings::set('rolodex', 'custom7_name', null); } if (!empty($_POST['custom8_name'])) { PHPWS_Settings::set('rolodex', 'custom8_name', PHPWS_Text::parseInput(strip_tags($_POST['custom8_name']))); + } else { + PHPWS_Settings::set('rolodex', 'custom8_name', null); } *************** *** 1048,1052 **** $this->member->setPrivacy($_POST['privacy']); ! $this->member->setEmail_privacy($_POST['email_privacy']); if (isset($_POST['custom1'])) { --- 1064,1072 ---- $this->member->setPrivacy($_POST['privacy']); ! if (isset($_POST['email_privacy'])) { ! $this->member->setEmail_privacy(1); ! } else { ! $this->member->setEmail_privacy(0); ! } if (isset($_POST['custom1'])) { Index: RDX_Member.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Member.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RDX_Member.php 17 Jul 2008 13:50:21 -0000 1.15 --- RDX_Member.php 24 Jul 2008 12:40:18 -0000 1.16 *************** *** 1371,1375 **** $tpl['TITLE'] = $this->viewLink(true); $tpl['DATE_UPDATED'] = $this->getDate_updated(true, '%a %b %e %Y'); ! $tpl['DESCRIPTION'] = $this->getListDescription(180); $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { --- 1371,1377 ---- $tpl['TITLE'] = $this->viewLink(true); $tpl['DATE_UPDATED'] = $this->getDate_updated(true, '%a %b %e %Y'); ! if ($this->description) { ! $tpl['DESCRIPTION'] = $this->getListDescription(180); ! } $tpl['THUMBNAIL'] = $this->getThumbnail(true, true); if ($this->isDataVisible('privacy_contact')) { |