Misc Patches (MT)
May 23rd, 2003
Some miscelaneous patches to MovableType, fixing minor issues, bugs and even introducing new features.
Update timestamp to current date
If for some reason you want a quick way to change the “authored on” date of a post to the current time, this patch lets you enter a blank value on the editing form to do so. A valid date will be used as is, an invalid date will be ignored, and a blank date will use the current time.
File: lib/MT/App/CMS.pm (MT 2.62)
Line 448, original:
my $df = $q->param('created_on_manual') ||
format_ts("%Y-%m-%d %H:%M:%S", $obj->created_on);
Line 448, patched:
my $blog = MT::Blog->load($blog_id);
my @newts = offset_time_list(time, $blog);
my $newts = sprintf "%04d-%02d-%02d %02d:%02d:%02d",
$newts[5]+1900, $newts[4]+1, @newts[3,2,1,0];
my $df = $q->param('created_on_manual') || $newts;
Trackback Auto-discovery and text formatting (fixed in 2.64)
Some text formatting plugins, like Textile, allow you to type links in a non-html format. That’s great… but the auto-discovery code in MT looks for links in the entry text before formatting. This patch changes that, and lets you enjoy both textile and autodiscovery at the same time.
File: lib/MT/Entry.pm (MT 2.62)
Line 286, original:
my $body = $entry->text;
Line 286, patched:
my $body = MT->apply_text_filters($entry->text, $entry->text_filters);
Deja tu respuesta