Commit graph

56 commits

Author SHA1 Message Date
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Antoine Musso
9194805bbd exif::version is static 2007-05-13 19:20:36 +00:00
Nick Jenkins
bd23ec29c6 Doc tweaks:
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.
2007-04-24 06:53:31 +00:00
Tim Starling
b15d8cffc4 * Introduced media handler modules for file-type specific operations: thumbnailing, img_metadata, capabilities, etc.
* Deprecated $wgUseImageResize, thumbnailing will be enabled unconditionally.
* Fixed interaction of page parameter to ImagePage with the HTML file cache
* Improved error reporting for image thumbnailing
* Fixed MIME type for SVG files, will be silently changed from image/svg to image/svg+xml after loading from the database.
* Workaround for djvutoxml bug #1704049 (poor performance). Use djvudump instead.
* Fixed odd behaviour in ImagePage on DjVu thumbnailing errors
* Improved error reporting for image thumbnailing
* Added sharpening option for ImageMagick thumbnailing
* Removed Image::selectPage(), added page parameters to getWidth() and getHeight(), deprecated Image::renderThumb() and Image::getThumbnail()
* Changed default contents of img_metadata to empty string instead of a:0:{}
* Moved responsibility for respecting $wgGenerateThumbnailOnParse from the UI to Image.php
2007-04-20 12:31:36 +00:00
Nick Jenkins
9648f3b4d0 Some small doc tweaks to reduce Doxygen warnings, namely:
* @link. You might think @link would surely mean "here comes a web URL" ... but @link is a valid command 
  in Doxygen, which means an entirely different kind of link (an internal link to somewhere, so that you can separate 
  documentation and implementation). The result is a mess, and the best solution I can see is to use "@see" instead of "@link".
* Warning: argument `nourl' of command @param is not found in the argument list of Linker::makeMediaLinkObj($title,$text='')
* Moving few class descriptions to right above classes, and/or formatting into Javadoc style.
* "@addtogroup Special Pages" --> "@addtogroup SpecialPage" so that all special pages have the same @addtogroup tag.
* @fixme --> @todo (must have missed these before)
* "@param $specialPage @see" remove the "@" in the "@see" to stop warning.
* @throws wants type, then a brief description, to stop warning.

This last one is for PHPdocumentor only, but it fixes something for PHPDocumentor, and should be neutral for Doxygen:
* WARNING in includes/api/ApiFormatYaml_spyc.php on line 860: docblock template never terminated with /**#@-*/
2007-04-18 09:50:10 +00:00
Antoine Musso
096c1d0e7d In regex, do not capture stuff when you dont need it, use (?:) 2007-04-13 00:23:49 +00:00
Nick Jenkins
113bb1c772 Documentation tweaks to help documentation systems (Doxygen + PHPDocumentor)
pick up the appropriate tags, and documentation blobs for classes. This is 
the same as per r20769, but with the grouping changes (e.g. removing "@{{") omitted.
Please be advised that more related documentation tweaks may follow later - e.g. 
Doxygen generates a log file of warnings that is 574 Kb in size, when run over 
the just the trunk/phase3 code ... eek! Thankfully, much of that is just 
whining about functions without documentation   ;-)
2007-04-04 05:22:37 +00:00
Brion Vibber
3a6ac5a3c3 Revert r20769: we don't use PHPDocumentor anymore, we use doxygen.
If making mass changes to tweak to its preferences, probably better to do it for the tool we actually generate docs with. :)
2007-03-28 14:16:43 +00:00
Nick Jenkins
5fef2333d4 PHPDocumentor [http://en.wikipedia.org/wiki/PhpDocumentor] documentation tweaking stuff.
Minor doc tweaks to prevent some PHPDocumentor warnings or errors when run on the includes/ directory. PHPDocumentor uses a syntax very similar to javadoc - mostly we already use this, but there were a few scattered places that were adjusted to make them consistent with the rest of the code. In practical terms, these changes were made:
* @url becomes @link
* @fixme becomes @todo
* HTML tags in descriptions must be closed / balanced.
* @bug was removed (where the bug was long fixed), or changed into a @todo (in the few situations where the bug was still pending)
* @obsolete becomes @deprecated
* Things like "/**@{{" and "/**@}}*/" which cause "unknown tag" warnings were removed
* @access must be a valid access level.
* @desc tag not needed, removed.
* Doesn't seem to like @licence, will accept @license however.
* Use full comment block notation in a few places (i.e. open block with "/**", start each line with " *", and end block with " */")

Then additional to this, to get some class docs associated with their respective classes:
* Moved some docs to right above those classes (deleting blank lines, or moving descriptions from the file headers)
* Marked some classes without docs as "@todo document"
* (done up to "class MIMEsearchPage" on the "classtrees_MediaWiki.html" page for the includes/ directory)
2007-03-28 08:53:02 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Antoine Musso
3a459112d7 Fix #8417 : Handle EXIF unknown date 2007-01-06 15:31:39 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Brion Vibber
cbb9596427 * (bug 7279) Use wfBaseName in place of basename() in more places 2006-09-10 12:11:36 +00:00
Tim Starling
fe658d5a1d * Let yes be yes and no be no
* Shortened Exif class constants
* Hopefully fixed preg_match warnings by checking is_array
2006-06-23 12:24:05 +00:00
Domas Mituzas
7fd347b45a Autoload Exif and move global defines to Exif:: namespace 2006-06-06 12:08:11 +00:00
Antoine Musso
7ebdb6de89 Revert to r14165 . Did too many changes, didnt even run parserTests (i am bad) 2006-05-11 22:40:38 +00:00
Antoine Musso
bc14eb8045 Replacing var keyword with private / public as we now require PHP5. 2006-05-11 19:10:41 +00:00
Antoine Musso
473cd5cbcc unused variables as per #3692 2006-05-01 10:53:59 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Brion Vibber
f2c29baf9f Update the FSF's address in all these GPL stub headers 2006-04-05 07:43:17 +00:00
Ævar Arnfjörð Bjarmason
6c5d3c8c6a * Adding a trailing ?> 2006-03-07 13:32:27 +00:00
Brion Vibber
71fc4d3f85 * (bug 4867) Leave invalid EXIF date fields unformatted instead of
showing a bogus current timestamp
2006-02-05 01:07:28 +00:00
Domas Mituzas
8aabcc03d1 Be less anal about entry points, class definitions do no harm to anyone, defined() is expensive 2006-01-14 11:04:04 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Brion Vibber
7039d9bdd7 * Reduce fractions in display of exif exposure time 2005-11-29 07:47:26 +00:00
Brion Vibber
baed3966b0 * (bug 2111) Collapsable exif metadata table, clean up display
List of non-collapsing fields is in [[MediaWiki:Metadata-fields]].
Intro paragraph is in [[MediaWiki:Metadata-help]].
2005-11-28 23:56:35 +00:00
Ævar Arnfjörð Bjarmason
9115dabec8 * Internal reworking of code
* Use $wgContLang->lc() rather than strtolower()
2005-11-26 22:47:37 +00:00
Ævar Arnfjörð Bjarmason
805e8fca6b * Duck warnings when fed an invalid file 2005-10-06 16:39:00 +00:00
Ævar Arnfjörð Bjarmason
38d603f275 * Using wfDebugLog() to log to our own log (exif) 2005-09-13 17:00:55 +00:00
Ævar Arnfjörð Bjarmason
d74425daea * Removed the 1024 byte limit on ASCII tags, not in accordance with the spec 2005-07-22 20:57:15 +00:00
Ævar Arnfjörð Bjarmason
b928d7f505 * No longer displaying ResolutionUnit at all
* Support for [XY]Resolution
2005-07-22 00:55:54 +00:00
Ævar Arnfjörð Bjarmason
6f8b5da585 * Documentation 2005-07-21 23:07:58 +00:00
Ævar Arnfjörð Bjarmason
316a6e4375 * Fixed bug: Bah, fucking automatic typecasting 2005-07-21 18:26:40 +00:00
Ævar Arnfjörð Bjarmason
35782b6618 * Support SubjectDistance
* Reworked FormatExif::msg() to take an argument
* Broke off number formatting into FormatExif::formatNum()
2005-07-21 16:37:39 +00:00
Ævar Arnfjörð Bjarmason
9b7263ecc0 * Fixed a bug where tags would be wrongly rejected ( === => == )
* Added break; to the switch statement in FormatExif::getFormattedData() which fixed numerous bugs
* Using @ to hide errors in Exif::isRational()
* Support formatting of FocalPlaneResolutionUnit
* Added debug info to Exif::validate()
* Fixed a debug error in Exif::isShort()
2005-07-21 00:59:08 +00:00
Ævar Arnfjörð Bjarmason
e642c5b21b * Exif::validate(): Using $this->debug() rather than wfDebug() 2005-07-20 21:20:45 +00:00
Ævar Arnfjörð Bjarmason
819ce776f9 * Completely reworked how the Exif class works, it now works as a standalone
class rather than being dependand on the code in Image.php
* Made a new class FormatExif that takes care of formatting an exif array
 (previously built into the Exif class)
2005-07-17 19:21:08 +00:00
Ævar Arnfjörð Bjarmason
2c4ec5c770 * Using the same message for GPSLatitudeRef and GPSDestLatitudeRef;
GPSLongitudeRef and GPSDestLongitudeRef; GPSSpeedRef and
  GPSDestDistanceRef; GPSTrackRef,GPSImgDirectionRef and GPSDestBearingRef
2005-05-30 19:54:54 +00:00
Ævar Arnfjörð Bjarmason
027537d624 * Added a TODO note to isASCII() 2005-05-21 07:23:04 +00:00
Ævar Arnfjörð Bjarmason
138a7ed36e * isASCII() now only accepts \x0a\x20-\x7e and strings <= 1024 bytes
* isRational() and isSrational() improved to most definitely not accept a
  non-faction value.
* Put all the debugging stufff into a debugging function
2005-05-13 10:38:14 +00:00
Ævar Arnfjörð Bjarmason
d57db920c3 * Not returning true for whitespace ASCII tags (I found quite a few in my tests)
* isRational and isSrational now include a check to make sure they're being fed
  a fraction, spewed errors otherwise.
* (S)rational numbers are now converted to intergers/floats
2005-05-10 02:15:16 +00:00
Ævar Arnfjörð Bjarmason
063b4fe03a * Switching is_numeric() in isByte(), isShort() and isLong() out for sprintf()
per wegges suggestion because:
   1. $in can't be a floating point number
   2. When typecast php ignores any non-integers after the first row of integers
   3. A regular expression would be slower and insanely complex
   * Insert kind comments about php and remarks about how much I appriciate its existance here*
2005-05-09 16:14:00 +00:00
Ævar Arnfjörð Bjarmason
f837a55e83 * Improved Exif::validate() debug output
* format() now returns the input value unformatted if it doesn't know what to
  do with it
2005-05-09 14:09:58 +00:00
Ævar Arnfjörð Bjarmason
cb6013b45e * Deprecated $mValidExif and its constructor makeValidExifTags(), its function
of stripping UNDEFINED tags has been moved to the isUndefined() function
* Deprecated getExif(), makeFlatExifTags() accesses $mExif directly now
2005-05-09 11:54:56 +00:00
Ævar Arnfjörð Bjarmason
0016b5f390 * Improved the debug output of the type checking functions 2005-05-09 11:28:30 +00:00
Ævar Arnfjörð Bjarmason
c95cd90c3e * Documented the change to extractTags(), might be a php bug
* Added debug statements
* Added breakpoints to the switch statement
* Added support for wikifying the software tag
2005-05-09 09:25:01 +00:00
Brion Vibber
cca0833da4 Fix up spacing, indentation to match the codebase standards. 2005-05-09 00:12:54 +00:00