webgui/lib/WebGUI/Macro/LastModified.pm
Matthew Wilson 7b20b2db03 - fix [ 1265771 ] assets that were formerly prototypes are... (mwilson)
- fix [ 1280018 ] add new sql report - all query fields visible (mwilson)
 - fix [ 1283740 ] overridden in WebGUI/Mail.pm (mwilson)
 - fix [ 1282511 ] WebGUI::Form::submit disabled (mwilson)
 - fix [ 1281854 ] migration.txt - 5.6, 5.7 need some updating. (mwilson)
 - fix [ 1281842 ] rand() needs srand() on win32 mod_perl (mwilson)
 - fix [ 1281435 ] Asset::paste() or Asset::setParent() needs... (mwilson)
 - fix [ 1280374 ] Events calendar with no end date set loops... (mwilson)
 - fix [ 1230352 ] Navigation Template (mwilson)
2005-09-11 17:36:39 +00:00

34 lines
1.2 KiB
Perl

package WebGUI::Macro::LastModified;
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
#-------------------------------------------------------------------
# Please read the legal notices (docs/legal.txt) and the license
# (docs/license.txt) that came with this distribution before using
# this software.
#-------------------------------------------------------------------
# http://www.plainblack.com info@plainblack.com
#-------------------------------------------------------------------
use strict;
use WebGUI::DateTime;
use WebGUI::Macro;
use WebGUI::Asset;
use WebGUI::Session;
use WebGUI::International;
use WebGUI::SQL;
#-------------------------------------------------------------------
sub process {
return '' unless $session{asset};
my ($label, $format, $time);
($label, $format) = WebGUI::Macro::getParams(shift);
$format = '%z' if ($format eq "");
($time) = WebGUI::SQL->quickArray("SELECT max(revisionDate) FROM assetData where assetId=".quote($session{asset}->getId),WebGUI::SQL->getSlave);
return WebGUI::International::get(43,'Asset_Survey') if $time eq 0;
return $label.epochToHuman($time,$format) if ($time);
}
1;