Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Upload Area
Hi all!

Having sort of an issue with the date of an uploaded file. For some reason they all show a particular date when in fact they should have different dates. They mostly show May 17, 2014. There are few that I have added after that show the correct date. I honestly don't recall doing anything to the system. Has anyone encountered this? Its not anything I'm really worried about - just figured I pass it along. Maybe there is something I can do in the future.

Did you actually check the filesystem ?
Maybe your host restored them.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Here is a screenshot of the directory in Transmit. At first I was thinking that was the case and it probably is but I looked at the directory in FTP and the dates seems to be different. I have no idea...very weird

I looked at the code
we are using ctime not mtime

9 mtime time of last modification (Unix timestamp)
10 ctime time of last inode change (Unix timestamp)

Anyone know wtf that means ? last inode change ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
hahaha yeh what does that mean? Smile
"Any change in metadatas (permissions and other information shown by stat) changes only ctime."

so maybe we should not be using ctime since a chmod will modify its stamp

in upload.php

PHP Code:
$filesArray[$count]['date'] = @date('M j, Y',$ss['ctime']); 

change ctime to mtime and see what happens.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Yeh that seemed to do it.
Just have to say....I friggin love getsimple! Thanks shawn you the man!
Thanks, I will create an issue on this.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Hi, and please excuse me for reactivating this very old thread!

I'm using the current GetSimple Version (3.3.16) and I'm encountering similar problems as lnickel did in his initial posting, although the issue should allegedly have been fixed already since Version 3.3.3 (Fix #821).

Seemingly the fix didn't really fix the problem, it's still present. Amazingly, nobody seems to have noticed that in more than 6 years, including me - until yesterday... ;-)

After digging somewhat deeper and comparing 3.3.2 and 3.3.3, I found that the fix in admin/upload.php (changing ctime to mtime) had obviously only been done for directories, but not for files (some code lines deeper). I assume that it was not intended to leave the file-list timestamps ctime-dependent.

This is no complaint, just a hint. You may want to change it in a future release.

By the way, I'm using GetSimple since many years, and it's great, I enjoy it. Thanks for all your effort!

Thanks for coming back on this , so we can improve it.
Pls post a screenshot showing the location with the lines of code
where this is about.
It's in admin/upload.php - if you seach there for 'mtime' (there is only one occurence), you'll find the location which has been changed by fix #821 in 3.3.3. If you search for 'ctime', you'll find another location which should have been changed (also or instead), I think. The first is for directories, the second for files. Before 3.3.3, both positions were set to 'ctime'.

Here is the relevant code snippet:

<?php include('template/include-nav.php'); ?>

<div class="bodycontent clearfix">
                                               $dirsArray[$dircount]['date'] = @date('M j, Y',$ss['mtime']);
                                       } else {
                                               $filesArray[$count]['name'] = $file;
                                                       $ext = substr($file, strrpos($file, '.') + 1);
                                               $extention = get_FileType($ext);
                                               $filesArray[$count]['type'] = $extention;
                                               $ss = @stat($path . $file);
                                               $filesArray[$count]['date'] = @date('M j, Y',$ss['ctime']);
                                               $filesArray[$count]['size'] = fSize($ss['size']);
                                               $totalsize = $totalsize + $ss['size'];

Users browsing this thread: 1 Guest(s)