Forgot to commit AutoLoader changes.
[lhc/web/wiklou.git] / includes / Metadata.php
index 4f3c7b1..f5b0b24 100644 (file)
@@ -18,7 +18,6 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  *
  * @author Evan Prodromou <evan@wikitravel.org>
- * @package MediaWiki
  */
 
 /**
@@ -74,14 +73,16 @@ function wfCreativeCommonsRdf($article) {
 function rdfSetup() {
        global $wgOut, $_SERVER;
 
-       $rdftype = wfNegotiateType(wfAcceptToPrefs($_SERVER['HTTP_ACCEPT']), wfAcceptToPrefs(RDF_TYPE_PREFS));
+       $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null;
+
+       $rdftype = wfNegotiateType(wfAcceptToPrefs($httpaccept), wfAcceptToPrefs(RDF_TYPE_PREFS));
 
        if (!$rdftype) {
                wfHttpError(406, "Not Acceptable", wfMsg("notacceptable"));
                return false;
        } else {
                $wgOut->disable();
-               header( "Content-type: {$rdftype}" );
+               header( "Content-type: {$rdftype}; charset=utf-8" );
                $wgOut->sendCacheControl();
                return true;
        }
@@ -317,7 +318,11 @@ function ccGetTerms($url) {
                return $wgLicenseTerms;
        } else {
                $known = getKnownLicenses();
-               return $known[$url];
+               if( isset( $known[$url] ) ) {
+                       return $known[$url];
+               } else {
+                       return array();
+               }
        }
 }
 
@@ -360,4 +365,4 @@ function getKnownLicenses() {
        return $knownLicenses;
 }
 
-?>
+