|
250 | 250 |
|
251 | 251 | if($type == 'getcronplaceholders') { |
252 | 252 |
|
253 | | - $web_docroot_client = ''; |
| 253 | + if(is_array($web_id) && !empty($web_id)) { |
254 | 254 |
|
255 | | - if($web_id > 0) { |
| 255 | + $web_docroot_client = ''; |
256 | 256 |
|
257 | 257 | $web = $app->db->queryOneRecord("SELECT wd.sys_groupid, wd.domain, wd.document_root, sp.php_cli_binary |
258 | 258 | FROM web_domain wd |
259 | 259 | LEFT JOIN server_php sp ON wd.server_php_id = sp.server_php_id |
260 | 260 | WHERE wd.domain_id = ?", $web_id); |
261 | 261 |
|
262 | | - $php_cli_binary = $web['php_cli_binary']; |
263 | | - $domain = $web['domain']; |
| 262 | + if(empty($web['php_cli_binary'])) { |
| 263 | + $php_cli_binary = "/usr/bin/php"; |
| 264 | + } else { |
| 265 | + $php_cli_binary = $web['php_cli_binary']; |
| 266 | + } |
| 267 | + |
| 268 | + if(empty($web['domain'])) { |
| 269 | + $domain = $app->tform->wordbook["domain_not_selected_placeholder_txt"]; |
| 270 | + } else { |
| 271 | + $domain = $web['domain']; |
| 272 | + } |
| 273 | + |
264 | 274 |
|
265 | 275 | $domain_owner = $app->db->queryOneRecord("SELECT limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $web["sys_groupid"]); |
266 | 276 |
|
|
279 | 289 | if($cron_type != 'chrooted') { |
280 | 290 | $web_docroot_client = $web['document_root']; |
281 | 291 | } |
282 | | - } |
283 | 292 |
|
284 | | - $web_docroot_client .= '/web'; |
| 293 | + $web_docroot_client .= '/web'; |
285 | 294 |
|
286 | | - if(empty($web['php_cli_binary'])) { |
287 | | - $php_cli_binary = "/usr/bin/php"; |
| 295 | + $json = json_encode(array( |
| 296 | + 'php_cli_binary' => $php_cli_binary, |
| 297 | + 'docroot_client' => $web_docroot_client, |
| 298 | + //'cron_type' => $cron_type, |
| 299 | + 'domain' => $domain |
| 300 | + )); |
288 | 301 | } |
289 | 302 |
|
290 | | - $json = json_encode(array( |
291 | | - 'php_cli_binary' => $php_cli_binary, |
292 | | - 'docroot_client' => $web_docroot_client, |
293 | | - //'cron_type' => $cron_type, |
294 | | - 'domain' => $domain |
295 | | - )); |
| 303 | + |
296 | 304 | } |
297 | 305 |
|
298 | 306 | header('Content-type: application/json'); |
|
0 commit comments