Browse Source

http://git.idleman.fr/idleman/hackpoint/issues/2

idleman 3 years ago
parent
commit
9a2dce35ab
2 changed files with 9 additions and 3 deletions
  1. 9 0
      function.php
  2. 0 3
      plugin/part/action.php

+ 9 - 0
function.php

@@ -1651,6 +1651,15 @@ if( !function_exists('apache_request_headers') ) {
 	}
 }
 
+if(!function_exists('apache_get_version')){
+    function apache_get_version(){
+        if(!isset($_SERVER['SERVER_SOFTWARE']) || strlen($_SERVER['SERVER_SOFTWARE']) == 0){
+            return false;
+        }
+        return $_SERVER["SERVER_SOFTWARE"];
+    }
+}
+
 
 //Effectue un basename en tenant compte des caractères
 //utf8( non pris en compte par basename PHP sous linux)

+ 0 - 3
plugin/part/action.php

@@ -152,12 +152,9 @@ switch($_['action']){
 	    case 'get_part_by_id':
 	    Action::write(function(&$response){
 	        global $myUser,$_;
-        	
         	require_once(__DIR__.SLASH.'..'.SLASH.'hackpoint'.SLASH.'Sketch.class.php');
         	require_once(__DIR__.SLASH.'..'.SLASH.'hackpoint'.SLASH.'Resource.class.php');
         	require_once(__DIR__.SLASH.'Part.class.php');
-
-
 	        $part = Part::getById($_['id'],1);
 
 	        $part = !$part ? new Part() : Part::getById($_['id']);