16 $this->opLog =
"SITE_NEW";
17 $this->operation =
"Add new site";
33 $api = Yii::app()->params[
'api'];
35 $path = Yii::app()->getBasePath() .
'/shell/';
36 $cmd =
"sh " . $path .
"site_new.sh $api $reqFile";
38 $json = shell_exec($cmd);
41 Yii::app()->user->setFlash(
'error1', $this->operation .
' ERROR: ' . $error);
43 Yii::app()->user->setFlash(
'success1', $this->operation .
': SUCCESS');
55 "maxURLsFromPage" =>
"200",
56 "maxResources" =>
"200",
58 "maxResourceSize" =>
"1000000",
59 "processingDelay" =>
"500",
60 "requestDelay" =>
"500",
61 "httpTimeout" =>
"30000",
67 "maxURLsFromPage" =>
"50",
68 "maxResources" =>
"200",
70 "maxResourceSize" =>
"1000000",
71 "processingDelay" =>
"500",
72 "requestDelay" =>
"500",
73 "httpTimeout" =>
"30000",
79 "CONTENT_HASH" =>
'{ "algorithm": 1, "tags": "title,description,content_encoded,media,pubdate", "delete": 1 }',
80 "PROCESS_CTYPES" =>
"text/html",
81 "STORE_HTTP_HEADERS" =>
"1",
82 "STORE_HTTP_REQUEST" =>
"1",
83 "AUTO_REMOVE_RESOURCES" =>
"1",
84 "AUTO_REMOVE_WHERE" =>
"ParentMd5<>\"\" AND Status IN (4,7) AND DATE_ADD(UDate, INTERVAL %RecrawlPeriod% MINUTE)<NOW()",
85 "AUTO_REMOVE_ORDER" =>
"ContentType ASC, Crawled ASC, TagsCount ASC, UDate ASC",
86 "RECRAWL_DELETE_WHERE" =>
"(`Status`=1 OR (`Status`=4 AND Crawled=0 AND Processed=0) OR `PDate`<CURDATE() OR `PDate` IS NULL OR CDate<CURDATE()) AND `ParentMd5`<>''",
90 $data = Yii::app()->request->getParam(
"data");
91 return $data[
"items"][0][
"properties"];