You f**ed it so bad !!!
-
A lots of errors , on new advert post the post schedule is not setting up the date , also when edited it deletes the schedule and not adding it back (issue in the update event) :
Fix for add / update new advert :
if($type != 'empty') { $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->prefix}adrotate_schedule WHERE id IN (SELECT schedule FROM {$wpdb->prefix}adrotate_linkmeta WHERE schedule != %d AND schedule > 0 AND ad = %d AND group = 0 AND user = 0);", $schedule_id, $id)); $wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->prefix}adrotate_linkmeta WHERE ad = %d ", $id)); } $wpdb->insert($wpdb->prefix.'adrotate_schedule', array('name' => 'Schedule for ad '.$id, 'starttime' => $start_date, 'stoptime' => $end_date, 'maxclicks' => $maxclicks, 'maximpressions' => $maxshown)); $wpdb->insert($wpdb->prefix.'adrotate_linkmeta', array('ad' => $id, 'group' => 0, 'user' => 0, 'schedule' => $wpdb->insert_id)); #remove your $wpdb->update has no use here
Also on the adrotate-output.php adrotate_group() you can add fix for one single group id to be processed :
Fix bellow :
if(!is_array($group_ids)&&preg_match('/,/is',$group_ids)){ $group_array = explode(",", $group_ids); } else { if(is_array($group_ids)){ $group_array = $group_ids; } else { $group_array = array($group_ids); } }
It took me 4 fucking hours to fix , i had to learn all your damn coding , plese dont do updates with such big bugs next time .
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘You f**ed it so bad !!!’ is closed to new replies.