OSDN Git Service

Modified for security.
[nucleus-jp/nucleus-plugins.git] / NP_gallery / trunk / gallery / update / np_gallery_update075.php
index b834cd3..e8e897b 100644 (file)
@@ -1,8 +1,9 @@
 <?php\r
 \r
-include('./../../../../config.php');\r
-global $DIR_PLUGINS;\r
-include_once ($DIR_PLUGINS.'gallery/config.php');\r
+require_once('./../../../../config.php');\r
+global $member;\r
+if (!($member->isLoggedIn() && $member->isAdmin())) exit('You are not admin.');\r
+include_once (dirname(__FILE__).'/../config.php');\r
 \r
 //from 0.75 to 0.76\r
 global $NPG_CONF;\r
@@ -15,10 +16,10 @@ if(!mysql_num_rows($res)) {
        sql_query($query);\r
 }\r
 \r
-include($DIR_PLUGINS.'gallery/update/default_templates_076.inc');\r
+include(dirname(__FILE__).'/default_templates_076.inc');\r
 \r
 setNPGoption('currentversion',76);\r
 \r
-include('np_gallery_update077.php');\r
+include(dirname(__FILE__).'/np_gallery_update077.php');\r
 \r
 ?>\r