Dylanblitz |
01-20-2012 04:35 AM |
Quote:
Originally Posted by fiatforever
(Post 2284669)
Any progress on the browse page reseting to 1?
|
Give this a try. Open includes/garage_func_var.php
Find
Code:
if ($data[make_id] != $old_make_data[make_id])
{
rebuild_make_count($data[make_id]);
rebuild_make_count($old_make_data[make_id]);
}
if ($data[model_id] != $old_make_data[model_id])
{
rebuild_model_count($data[model_id]);
rebuild_model_count($old_make_data[model_id]);
}
$adding = $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "garage_user_vehicle SET nickname = '$data[nickname]', made_year = '$data[made_year]', engine_type = '$data[engine_type]', veh_class = '$data[veh_class]', color = '$data[color]', mileage = '$data[mileage]', mileage_unit_new = '$data[mileage_unit]', fuel_preference = '$data[fuel_preference]', price = '$data[price]', currency = '$data[currency]', comments = '$data[comments]', date_updated = '$data[date_updated]', make_id = '$data[make_id]', model_id = '$data[model_id]', trim_id = '$data[trim_id]', spirit_id = '$data[spirit_id]', spirit_type_id = '$data[spirit_type_id]', vehicle_url = '$data[vehicle_url]', vehicle_country = '$data[vehicle_country]', vehicle_zip = '$data[vehicle_zip]', vehicle_zip_hide = '$data[vehicle_zip_hide]', purchase_month = '$data[purchase_month]', purchase_day = '$data[purchase_day]', purchase_year = '$data[purchase_year]', notify_enabled = '$data[comm_notify]' WHERE vehicle_id = '$data[id]'");
if ($adding)
{
$return_var = $data[id];
} else {
$return_var = "error";
}
replace with
Code:
$adding = $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "garage_user_vehicle SET nickname = '$data[nickname]', made_year = '$data[made_year]', engine_type = '$data[engine_type]', veh_class = '$data[veh_class]', color = '$data[color]', mileage = '$data[mileage]', mileage_unit_new = '$data[mileage_unit]', fuel_preference = '$data[fuel_preference]', price = '$data[price]', currency = '$data[currency]', comments = '$data[comments]', date_updated = '$data[date_updated]', make_id = '$data[make_id]', model_id = '$data[model_id]', trim_id = '$data[trim_id]', spirit_id = '$data[spirit_id]', spirit_type_id = '$data[spirit_type_id]', vehicle_url = '$data[vehicle_url]', vehicle_country = '$data[vehicle_country]', vehicle_zip = '$data[vehicle_zip]', vehicle_zip_hide = '$data[vehicle_zip_hide]', purchase_month = '$data[purchase_month]', purchase_day = '$data[purchase_day]', purchase_year = '$data[purchase_year]', notify_enabled = '$data[comm_notify]' WHERE vehicle_id = '$data[id]'");
if ($adding)
{
$return_var = $data[id];
} else {
$return_var = "error";
}
if (($data[make_id] != $old_make_data[make_id]) && ($data[make_id] > 0))
{
rebuild_make_count($data[make_id]);
rebuild_make_count($old_make_data[make_id]);
}
if (($data[model_id] != $old_make_data[model_id]) && ($data[model_id] > 0))
{
rebuild_model_count($data[model_id]);
rebuild_model_count($old_make_data[model_id]);
}
I switched it to that on my dev and I'm doing everything I can to try and break it and the numbers are coming out right.
|