*** CMS_orig.pm Wed Jan 12 12:37:14 2005 --- CMS.pm Wed Jan 12 12:32:44 2005 *************** *** 15,20 **** --- 15,23 ---- use MT::App; use MT::Author qw(:constants); @MT::App::CMS::ISA = qw( MT::App ); + # ADDED CODE FOR EXTRAFIELDS PLUGIN + use ExtraFields; + # END ADDED CODE sub init { my $app = shift; *************** *** 694,699 **** --- 697,705 ---- if (my $prev = $obj->previous) { $param{previous_entry_id} = $prev->id; } + # ADDED CODE FOR EXTRAFIELDS PLUGIN + ef_load($blog_id, $id); + # END ADDED CODE $param{ping_errors} = $q->param('ping_errors'); $param{can_view_log} = $app->{author}->can_view_log; *************** *** 1008,1013 **** --- 1014,1022 ---- $param{'position_buttons_' . $pos} = 1; $param{disp_prefs_bar_colspan} = $param{new_object} ? 1 : 2; } + # ADDED CODE FOR EXTRAFIELDS PLUGIN + ef_prepare_html($blog_id, \%param); + # END ADDED CODE ## Load text filters. my %entry_filters; *************** *** 1745,1750 **** --- 1754,1762 ---- push @rebuild_cats, $cat_id if $cat_id; } $obj->remove; + # ADDED CODE FOR EXTRAFIELDS PLUGIN + ef_delete($q->param('blog_id'), $id) if ($type eq 'entry'); + # END ADDED CODE } # TBD: experiment with background rebuilds here. for my $entry_id (keys %rebuild_entries) { *************** *** 2684,2689 **** --- 2696,2704 ---- MT->run_callbacks('AppPostEntrySave', $app, $obj); + # ADDED CODE FOR EXTRAFIELDS PLUGIN + ef_save($obj->blog_id, $obj->id, $q); + # END ADDED CODE ## If the saved status is RELEASE, or if the *previous* status was ## RELEASE, then rebuild entry archives, indexes, and send the ## XML-RPC ping(s). Otherwise the status was and is HOLD, and we *************** *** 3246,3251 **** --- 3261,3269 ---- } $param{new_object} = $param{id} ? 0 : 1; my $cols = MT::Entry->column_names; + # ADDED CODE FOR EXTRAFIELDS PLUGIN + push(@$cols, ef_column_names($blog_id)); + # END ADDED CODE my @data = ({ data_name => 'author_id', data_value => $app->{author}->id }); for my $col (@$cols) { next if $col eq 'created_on' || $col eq 'created_by' ||