File tree Expand file tree Collapse file tree 1 file changed +19
-16
lines changed
Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -41,24 +41,27 @@ public function init()
4141 $ entry = $ event ->params ['draft ' ];
4242 }
4343
44- $ parcelType ->parse (array (
45- 'entry ' => $ entry ,
46- 'isNewEntry ' => $ isNewEntry
47- ));
48-
49- if ($ parcelType ->validateEntry ($ entry , $ event ->params ['isNewEntry ' ]))
50- {
51- $ obj = new Postmaster_TransportModel (array (
52- 'service ' => $ parcelType ->getParcelModel ()->service ,
53- 'settings ' => $ parcelType ->settings ,
54- 'data ' => array (
55- 'entry ' => $ entry ,
56- 'isNewEntry ' => $ isNewEntry
57- )
44+ if ($ parcelType ->areSectionsValid ($ entry ))
45+ {
46+ $ parcelType ->parse (array (
47+ 'entry ' => $ entry ,
48+ 'isNewEntry ' => $ isNewEntry
5849 ));
5950
60- $ parcelType ->parcel ->send ($ obj );
61- }
51+ if ($ parcelType ->validateEntry ($ entry , $ event ->params ['isNewEntry ' ]))
52+ {
53+ $ obj = new Postmaster_TransportModel (array (
54+ 'service ' => $ parcelType ->getParcelModel ()->service ,
55+ 'settings ' => $ parcelType ->settings ,
56+ 'data ' => array (
57+ 'entry ' => $ entry ,
58+ 'isNewEntry ' => $ isNewEntry
59+ )
60+ ));
61+
62+ $ parcelType ->parcel ->send ($ obj );
63+ }
64+ }
6265 });
6366 }
6467 }
You can’t perform that action at this time.
0 commit comments