public function proceedServer($name, $host)
    {
        $this->outputHeadline('Proceed Server');
        $this->output('Server "' . $name . '" (' . $host . ')');

        $serverId = $this->existsGerritServer($name, $host);

        // If the don`t know this server, save it!
        if ($serverId === false) {

            $serverData = array(
                'name' => $name,
                'host' => $host
            );
            $serverId = $this->getDatabase()->insertRecord(Database::TABLE_SERVER, $serverData);
            $this->setServersFirstRun();

            $this->output('=> Inserted (ID: ' . $serverId . ')');

        } else {
            $this->output('=> Exists');
        }

        $this->output('');

        $this->setServerId($serverId);

        return $serverId;
    }
public function proceedServer($name, $host)
    {
        $this->outputHeadline('Proceed Server');
        $this->output('Server "' . $name . '" (' . $host . ')');

        $serverId = $this->existsGerritServer($name, $host);

        // If the don`t know this server, save it!
        if ($serverId === false) {

            $serverData = array(
                'name' => $name,
                'host' => $host
            );
            $serverId = $this->getDatabase()->insertRecord(Database::TABLE_SERVER, $serverData);
            $this->setServersFirstRun();

            $this->output('=> Inserted (ID: ' . $serverId . ')');

        } else {
            $this->output('=> Exists');
        }

        $this->output('');

        $this->setServerId($serverId);

        return $serverId;
    }
public function proceedServer ( $ name , $ host ) { $ this -> outputHeadline ( 'Proceed Server' ) ; $ this -> output ( 'Server "' . $ name . '" (' . $ host . ')' ) ; $ serverId = $ this -> existsGerritServer ( $ name , $ host ) ; // If the don`t know this server, save it! if ( $ serverId === false ) { $ serverData = array ( 'name' => $ name , 'host' => $ host ) ; $ serverId = $ this -> getDatabase ( ) -> insertRecord ( Database :: TABLE_SERVER , $ serverData ) ; $ this -> setServersFirstRun ( ) ; $ this -> output ( '=> Inserted (ID: ' . $ serverId . ')' ) ; } else { $ this -> output ( '=> Exists' ) ; } $ this -> output ( '' ) ; $ this -> setServerId ( $ serverId ) ; return $ serverId ; }
Checks if the given Gerrit server is known by the database.
If the don`t know this host, we save this to the database.

@param string $name Configured name of Gerrit server
@param string $host Host of Gerrit Server
@return integer
Checks if the given Gerrit server is known by the database . If the don t know this host we save this to the database .