PDA

View Full Version : Contribution Tracker



michael_s
03-12-2007, 12:00 PM
1. Fixed a problem when updating a contrib status from the edit page. It was not updating the last integrated date.



STEPS:

1.in catalog/admin/contrib_tracker.php
**** CHANGE****
case 'update':
tep_db_query("update " . TABLE_CONTRIB_TRACKER . " set contr_last_modified = now(), status = '" . $status . "',contrib_name = '" . $contrib_name_new . "', contrib_link = '" . $contrib_link_new . "', config_comments = '" . $config_comments . "', last_update = '" . $last_update . "', contrib_vers= '" . $contrib_vers . "' where contr_id = '" . $HTTP_POST_VARS['contr_id'] . "'");
tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKE R, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $contr_id . '&sort=' . $HTTP_GET_VARS['sort']));
break;
****TO:****
case 'update':
if ($old_status!='1' && $status=='1'){
$current_status='1';
}else{
$current_status= $status;
}
tep_db_query("update " . TABLE_CONTRIB_TRACKER . " set contr_last_modified = now(), status = '" . $current_status . "',contrib_name = '" . $contrib_name_new . "', contrib_link = '" . $contrib_link_new . "', config_comments = '" . $config_comments . "', last_update = '" . $last_update . "', contrib_vers= '" . $contrib_vers . "' where contr_id = '" . $HTTP_POST_VARS['contr_id'] . "'");
tep_redirect(tep_href_link(FILENAME_CONTRIB_TRACKE R, 'page=' . $HTTP_GET_VARS['page'] . '&sID=' . $contr_id . '&sort=' . $HTTP_GET_VARS['sort']));
break;


****CHANGE: ****

0 = New Update Exists
1 = No New Update
2 = No status
****TO:****

0 = New Update Exists
1 = No New Update
2 = No status


COMPLETE PACKAGE

More... (http://www.oscommerce.com/community/contributions,4815)