go live function

This commit is contained in:
lutranf
2014-12-19 18:01:59 +01:00
parent cb9ba5e6d9
commit c4b6109071
2 changed files with 10 additions and 1 deletions

View File

@@ -397,7 +397,13 @@ class Databap extends PhpObject
$this->addUser('test', 'test', 'test', 'test@test.com');
//Write the SAP blog parser bash script to main folder
@file_put_contents('sap_website_parser.sh', "#!/bin/bash\n\n/usr/bin/php -f index.php a=external_access p=blogs auth_token=".$iSystemId.'_'.str_replace('$', '\$', $this->generateExternalAccessToken($iSystemId)));
@file_put_contents('sap_website_parser.sh', "#!/bin/bash\n\ncd /var/www\n\n/usr/bin/php -f index.php a=external_access p=blogs auth_token=".$iSystemId.'_'.str_replace('$', '\$', $this->generateExternalAccessToken($iSystemId)));
}
public function goLive()
{
$iSystemId = self::SYSTEM_USER_ID;
return "/usr/bin/php -f index.php a=external_access p=blogs auth_token=".$iSystemId.'_'.str_replace('$', '\$', $this->generateExternalAccessToken($iSystemId));
}
private function setUserId($iUserId)

View File

@@ -206,6 +206,9 @@ if($bUserOk && $sAction!=Databap::EXT_ACCESS)
case 'reset_chan_safe_names':
$sResult = $oDatabap->resetChanSafeNames();
break;
case 'golive':
$sResult = $oDatabap->goLive();
break;
}
}
break;