* changed the string comparison callback for usort

* changed the date and time display in log pages
This commit is contained in:
hyung-hwan 2010-05-24 13:16:01 +00:00
parent cd032f6b60
commit b368b1e520
4 changed files with 12 additions and 9 deletions

View File

@ -51,13 +51,12 @@ else
{
function comp_files ($a, $b)
{
if ($a->tag == $b->tag)
$cmp = strcmp ($b->tag, $a->tag);
if ($cmp == 0)
{
return ($a->name > $b->name)? -1:
($a->name < $b->name)? 1: 0;
return strcmp ($a->name, $b->name);
}
return ($a->tag < $b->tag)? 1: -1;
return $cmp;
}
usort ($files, 'comp_files');

View File

@ -162,8 +162,10 @@ $this->load->view (
{
$code = $log['message'];
$date = substr($code['time'], 0, 10);
$time = substr($code['time'], 11, 5);
//$date = substr($code['time'], 0, 10);
//$time = substr($code['time'], 11, 5);
$date = date ('Y-m-d', strtotime($log['createdon']));
$time = date ('h:i', strtotime($log['createdon']));
}
else
{

View File

@ -105,7 +105,8 @@ $this->load->view (
print '<tr class="odd">';
print '<td class="date">';
print substr($x['time'], 5, 5);
//print substr($x['time'], 5, 5);
print date ('m-d', strtotime($log['createdon']));
print '</td>';
print '<td class="object">';
print anchor (

View File

@ -101,7 +101,8 @@ foreach ($latest_projects as $project)
print '<tr class="odd">';
print '<td class="date">';
print substr($x['time'], 5, 5);
//print substr($x['time'], 5, 5);
print date ('m-d', strtotime($log['createdon']));
print '</td>';
print '<td class="projectid">';
/*