Skip to main content
Topic: Unused file? (Read 3989 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Unused file?

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?
Bugs creator.
Features destroyer.
Template killer.

Re: Unused file?

Reply #1

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

Re: Unused file?

Reply #2

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.
The best moment for testing your PR is right after you merge it. Can't miss with that one.