ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on December 22, 2012, 06:19:05 pm

Title: Unused file?
Post by: emanuele on December 22, 2012, 06:19:05 pm
Class-Graphics.php...I can't find any of the classes in there used anywhere in the code.
I can't find any require_once.
It is used in SMF 2.0 in Subs-Graphics.php:
Code: [Select]
function gif_loadFile($lpszFileName, $iIndex = 0)
{
// The classes needed are in this file.
loadClassFile('Class-Graphics.php');
$gif = new gif_file();

if (!$gif->loadFile($lpszFileName, $iIndex))
return false;

return $gif;
}
but already the copy in SVN/trunk doesn't have any reference to that class.

Can it be gently moved to a better place?
Title: Re: Unused file?
Post by: Spuds on December 22, 2012, 06:54:56 pm
I seem to remember removing the call to that file ...

There was a period when gif support was not available in the external GD lib so you had to use that class to do the work instead.  php.net says gif support was removed in the gd library in Version 1.6, and added back in Version 2.0.28 .... so this appears to have been needed for php <= 4.3 (gd 2.0.35 was released in 2006)

I'd say remove the file myself
Title: Re: Unused file?
Post by: TestMonkey on December 22, 2012, 10:40:30 pm
Ah, I was wondering about this. I believe I removed it back on the old branch. (or wanted to)

Yes, it shouldn't be needed at all, for a long time.
Title: Re: Unused file?
Post by: emanuele on December 25, 2012, 10:34:32 am
Dropped:
https://github.com/emanuele45/Dialogo/commit/869a1c8a3fae8bb29c4eaece1a11224ca3d0fe90