X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FDomainStatusNetwork%2Flib%2Fdomainstatusnetworkinstaller.php;h=0547a2596f610aacf1ad8029d3af2e367ec6b0cf;hb=0dfe39ac8757c81eb9bf2c6dae7ca409038aa843;hp=b2e988b5e1eca1c9521ea3de318ebee7014ecf71;hpb=8b47400183052873b012dacf4eb5ba841914a886;p=quix0rs-gnu-social.git diff --git a/plugins/DomainStatusNetwork/lib/domainstatusnetworkinstaller.php b/plugins/DomainStatusNetwork/lib/domainstatusnetworkinstaller.php index b2e988b5e1..0547a2596f 100644 --- a/plugins/DomainStatusNetwork/lib/domainstatusnetworkinstaller.php +++ b/plugins/DomainStatusNetwork/lib/domainstatusnetworkinstaller.php @@ -117,7 +117,7 @@ class DomainStatusNetworkInstaller extends Installer $this->rootname = $config['ADMIN']; $this->rootpass = $config['ADMINPASS']; - $this->sitehost = $config['DBHOST']; + $this->sitehost = $config['SITEDBHOSTNAME']; $this->sitedb = $config['SITEDB']; $tagstr = $config['TAGS']; @@ -133,7 +133,6 @@ class DomainStatusNetworkInstaller extends Installer $this->adminNick = null; $this->adminPass = null; $this->adminEmail = null; - $this->adminUpdates = null; /** Should we skip writing the configuration file? */ $this->skipConfig = true; @@ -178,6 +177,7 @@ class DomainStatusNetworkInstaller extends Installer $sn->dbpass = $this->password; $sn->dbname = $this->database; $sn->sitename = $this->sitename; + $sn->created = common_sql_now(); $result = $sn->insert(); @@ -187,7 +187,7 @@ class DomainStatusNetworkInstaller extends Installer // Re-fetch; stupid auto-increment integer isn't working - $sn = Status_network::staticGet('nickname', $sn->nickname); + $sn = Status_network::getKV('nickname', $sn->nickname); if (empty($sn)) { throw new ServerException("Created {$this->nickname} status_network and could not find it again."); @@ -266,6 +266,9 @@ class DomainStatusNetworkInstaller extends Installer function createDatabase() { // Create the New DB + /* FIXME + * Extension 'mysql_' is deprecated since PHP 5.5 - use mysqli instead. + */ $res = mysql_connect($this->host, $this->rootname, $this->rootpass); if (!$res) { throw new ServerException("Cannot connect to {$this->host} as {$this->rootname}."); @@ -338,7 +341,7 @@ class DomainStatusNetworkInstaller extends Installer $breakout = preg_replace('/+]\bhref="(.*)"[^>]*>(.*)<\/a>/', '\2 <\1>', $html); - return html_entity_decode(strip_tags($breakout), ENT_QUOTES, 'UTF-8'); + return common_strip_html($breakout); } function databaseize($nickname)