Changeset 1746
- Timestamp:
- 04/03/08 08:26:12 (5 months ago)
- Files:
-
- branches/release-33/lib/MT/CMS/Entry.pm (modified) (3 diffs)
- branches/release-33/tmpl/cms/edit_entry.tmpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-33/lib/MT/CMS/Entry.pm
r1741 r1746 150 150 . MT::Entry::status_text($def_status) } = 1; 151 151 } 152 $param->{153 'allow_comments_'154 . (155 defined $q->param('allow_comments')156 ? $q->param('allow_comments')157 : $blog->allow_comments_default158 )159 }160 = 1;161 $param->{allow_comments} = $blog->allow_comments_default162 unless defined $q->param('allow_comments');163 $param->{allow_pings} = $blog->allow_pings_default164 unless defined $q->param('allow_pings');152 if ( $param->{status} ) { 153 $param->{ 'allow_comments_' 154 . $q->param('allow_comments') } = 1; 155 $param->{allow_comments} = $q->param('allow_comments'); 156 $param->{allow_pings} = $q->param('allow_pings'); 157 } 158 else { 159 # new edit 160 $param->{ 'allow_comments_' 161 . $blog->allow_comments_default } = 1; 162 $param->{allow_comments} = $blog->allow_comments_default; 163 $param->{allow_pings} = $blog->allow_pings_default; 164 } 165 165 } 166 166 } … … 1216 1216 && ($ao_d) ) 1217 1217 { 1218 my %param = (); 1218 1219 my $ao = $ao_d . ' ' . $ao_t; 1219 1220 unless ( 1220 $ao =~ m!^(\d{4})-(\d{ 2})-(\d{2})\s+(\d{2}):(\d{2})(?::(\d{2}))?$! )1221 $ao =~ m!^(\d{4})-(\d{1,2})-(\d{1,2})\s+(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$! ) 1221 1222 { 1222 return $app->error( 1223 $app->translate( 1223 $param{error} = $app->translate( 1224 1224 "Invalid date '[_1]'; authored on dates must be in the format YYYY-MM-DD HH:MM:SS.", 1225 1225 $ao 1226 )1227 1226 ); 1228 1227 } 1229 1228 my $s = $6 || 0; 1230 return $app->error( 1231 $app->translate( 1229 $param{error} = $app->translate( 1232 1230 "Invalid date '[_1]'; authored on dates should be real dates.", 1233 1231 $ao 1234 )1235 1232 ) 1236 1233 if ( … … 1247 1244 && !MT::Util::leap_day( $0, $1, $2 ) ) 1248 1245 ); 1246 $param{return_args} = $app->param('return_args'); 1247 return $app->forward( "view", \%param ) if $param{error}; 1249 1248 if ($obj->authored_on) { 1250 1249 $previous_old = $obj->previous(1); branches/release-33/tmpl/cms/edit_entry.tmpl
r1615 r1746 83 83 <mt:unless name="recovered_object"> 84 84 <mt:if name="autosaved_object_exists"> 85 <mt:unless name="error"> 85 86 <mtapp:statusmsg 86 87 id="recovered-object" … … 92 93 </mt:if> 93 94 </mtapp:statusmsg> 95 </mt:unless> 94 96 </mt:if> 95 97 </mt:unless>
