9 protected $opLog =
'SITE_DELETE';
23 $this->operation =
"Delete";
26 'taskType' => (
int)$type
31 $resFile = tempnam(Yii::app()->getBasePath() .
'/json_temp',
'');
32 $response = fopen($resFile,
"w");
33 fwrite($response,
$json);
35 $api = Yii::app()->params[
'api'];
36 $path = Yii::app()->getBasePath() .
'/shell/';
37 $cmd =
"sh " . $path .
"site_delete.sh $api $resFile";
38 $json = shell_exec($cmd);
41 Yii::app()->user->setFlash(
'error1', $this->operation .
' ERROR: ' . $error);
43 Yii::app()->user->setFlash(
'success1', $this->operation .
': SUCCESS');
49 $UsersSitesRights->setRightsSingleRecord(
51 'userId' => Yii::app()->user->id,