Whitespace updates.
Translator documentation.
This commit is contained in:
@@ -50,7 +50,6 @@ require_once $_dir . '/extlib/regDomain.inc.php';
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DomainStatusNetworkPlugin extends Plugin
|
class DomainStatusNetworkPlugin extends Plugin
|
||||||
{
|
{
|
||||||
static $_thetree = null;
|
static $_thetree = null;
|
||||||
@@ -191,6 +190,7 @@ class DomainStatusNetworkPlugin extends Plugin
|
|||||||
'author' => 'Evan Prodromou',
|
'author' => 'Evan Prodromou',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:DomainStatusNetwork',
|
'homepage' => 'http://status.net/wiki/Plugin:DomainStatusNetwork',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('A plugin that maps a single status_network to an email domain.'));
|
_m('A plugin that maps a single status_network to an email domain.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class DomainStatusNetworkInstaller extends Installer
|
class DomainStatusNetworkInstaller extends Installer
|
||||||
{
|
{
|
||||||
protected $domain = null;
|
protected $domain = null;
|
||||||
@@ -175,7 +174,7 @@ class DomainStatusNetworkInstaller extends Installer
|
|||||||
$result = $sn->insert();
|
$result = $sn->insert();
|
||||||
|
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
throw new ServerException("Couldn't create status_network: " . print_r($sn, true));
|
throw new ServerException("Could not create status_network: " . print_r($sn, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
$sn->setTags(array('domain='.$this->domain));
|
$sn->setTags(array('domain='.$this->domain));
|
||||||
@@ -215,7 +214,7 @@ class DomainStatusNetworkInstaller extends Installer
|
|||||||
// Create the New DB
|
// Create the New DB
|
||||||
$res = mysql_connect($this->host, $this->rootname, $this->rootpass);
|
$res = mysql_connect($this->host, $this->rootname, $this->rootpass);
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
throw new ServerException("Can't connect to {$this->host} as {$this->rootname}");
|
throw new ServerException("Cannot connect to {$this->host} as {$this->rootname}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_query("CREATE DATABASE ". mysql_real_escape_string($this->database), $res);
|
mysql_query("CREATE DATABASE ". mysql_real_escape_string($this->database), $res);
|
||||||
@@ -223,7 +222,7 @@ class DomainStatusNetworkInstaller extends Installer
|
|||||||
$return = mysql_select_db($this->database, $res);
|
$return = mysql_select_db($this->database, $res);
|
||||||
|
|
||||||
if (!$return) {
|
if (!$return) {
|
||||||
throw new ServerException("Unable to connect to {$this->database} on {$this->host}");
|
throw new ServerException("Unable to connect to {$this->database} on {$this->host}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (array('localhost', '%') as $src) {
|
foreach (array('localhost', '%') as $src) {
|
||||||
|
@@ -35,7 +35,7 @@ $domain = DomainStatusNetworkPlugin::toDomain($args[0]);
|
|||||||
$nickname = DomainStatusNetworkPlugin::nicknameForDomain($domain);
|
$nickname = DomainStatusNetworkPlugin::nicknameForDomain($domain);
|
||||||
|
|
||||||
if (empty($nickname)) {
|
if (empty($nickname)) {
|
||||||
throw new ClientException("No candidate found.");
|
throw new ClientException('No candidate found.');
|
||||||
} else {
|
} else {
|
||||||
print $nickname;
|
print $nickname;
|
||||||
print "\n";
|
print "\n";
|
||||||
|
@@ -40,4 +40,3 @@ if (empty($sn)) {
|
|||||||
|
|
||||||
print $sn->nickname."\n";
|
print $sn->nickname."\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user