phpBMS

Show
Ignore:
Timestamp:
01/14/10 16:59:01 (2 years ago)
Author:
nate
Message:
  • Removed unneded comments in apiclass.php and api_json.php
  • Added ping functionality (for connection / access / tabledef testing) in the api class and the apiwrapper class.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/api/apiwrapper.php

    r758 r759  
    6666         
    6767    }//end function 
     68     
     69    /* 
     70     * function ping 
     71     * @param string $tabledefuuid A tabledef uuid. 
     72     * 
     73     * @return array|bool An associative array containing the response, or false if a connection error has occured (in which case see $this->errorMessage). 
     74     * @returnf string type The type of response.  This will either be 'error' or 'message'. 
     75     * @returnf string message The related message.  This will be 'Everything is phpBMSy!' if no errors have occurred and the tabledefuuid is api accessible. 
     76     */ 
     77     
     78    function ping($tabledefuuid) { 
     79         
     80        $params["request"][0]["tabledefid"] = $tabledefuuid; 
     81        $params["request"][0]["command"] = "ping"; 
     82        $params["request"][0]["data"] = array(); 
     83         
     84        $response = $this->_callServer($params); 
     85         
     86        if($response !== false) 
     87            return $response[0]; 
     88        else 
     89            return false; 
     90         
     91    }//end funciton 
    6892     
    6993     
     
    284308    /* 
    285309     * function runStoredProcedure 
    286      *  
     310     * 
     311     * @param string $tabledefuuid The uuid of an api accessible tabledefinition. 
    287312     * @param string $procedureName The stored procedure to be called. 
    288313     * 
     
    292317     */ 
    293318     
    294     public function runStoredProcedure($procedureName) { 
     319    public function runStoredProcedure($tabledefuuid, $procedureName) { 
    295320         
    296321        $params["request"][0]["command"] = "procedure"; 
    297322        $params["request"][0]["data"]["name"] = $procedurename; 
     323        $params["request"][0]["tabledefid"] = $tabledefuuid; 
    298324         
    299325        $response = $this->_callServer($params); 
     
    719745        fclose($sock); 
    720746        ob_end_clean(); 
    721          
    722747        list($throw, $response) = explode("\r\n\r\n", $response, 2); 
    723748         
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.