OSDN Git Service

Now this trunk equal 3.62 without documentation. We need to test for install and...
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / xmlrpc / api_metaweblog.inc.php
index c8afcf2..6b9a167 100755 (executable)
                $ok = 0;
                $allowedtypes = explode (',', $CONF['AllowedTypes']);
                foreach ( $allowedtypes as $type )
-                       if (eregi("\." .$type. "$",$filename)) $ok = 1;
+               {
+                       //if (eregi("\." .$type. "$",$filename)) $ok = 1;
+                       if (preg_match("#\." .$type. "$#i",$filename)) $ok = 1;
+               }
                if (!$ok)
                        _error(8, 'Filetype is not allowed');
 
                // - add file to media library
-               include_once($DIR_LIBS . 'MEDIA.php');  // media classes
+               //include_once($DIR_LIBS . 'MEDIA.php');        // media classes
+               include_libs('MEDIA.php',true,false);
 
                // always use private media library of member
                $collection = $mem->getID();