Post by hm2k » Tue Dec 23, 2008 9:16 pm

The numerical chmod() shouldn't be required as the chmod should be correct when the system creates a new file, otherwise the system is at fault, not the script, and you're over compensating for something that is outside the realm of the script.

I don't think it's needed, at least that's my take...

I'd be interested in Qman's thoughts.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by Qphoria » Tue Dec 23, 2008 9:38 pm

say wha? who me? oh my...this is so unexpected. I don't even have a speech prepared!  :-\

:D I've actually never seen anyone use the alpha code before, so I am quick to blame that when something doesn't work right. but after a little research it seems that its just semantics and should work.

what's odd is that people have gotten it working using bruces original fix with 'move' and numeric chmod.

my only other gripe with using a+r is that it is so uncommon that most are confused what the numeric translation is. both cpanel and most ftp clients use the numeric. also for languages without a's and r's ... do they understand? numeric is more universal.

just my 1 cent. all I care about is that it works.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fido-x » Tue Dec 23, 2008 10:45 pm

hm2k wrote: Does anyone have any issues with this?

Code: Select all

	function save($key, $file) {
		if (file_exists($file)) @unlink($file);
		$status=@copy($_FILES[$key]['tmp_name'], $file);
		if ($status) @unlink($_FILES[$key]['tmp_name']);
		return $status;
	}
No. I think that should do it.
hm2k wrote: The numerical chmod() shouldn't be required as the chmod should be correct when the system creates a new file, otherwise the system is at fault, not the script, and you're over compensating for something that is outside the realm of the script.

I don't think it's needed, at least that's my take...
I agree. I read it the same way.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by hm2k » Fri Dec 26, 2008 9:11 pm

This was applied according to the related issue tracker.

Thread will be locked, any further issues can raise a new one.

Thanks.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK
Who is online

Users browsing this forum: No registered users and 6 guests