| [ Index ] |
PHP Cross Reference of MyBB 1.8.40 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * MyBB 1.8 4 * Copyright 2014 MyBB Group, All Rights Reserved 5 * 6 * Website: http://www.mybb.com 7 * License: http://www.mybb.com/about/license 8 * 9 */ 10 11 ignore_user_abort(true); 12 13 define("IN_MYBB", 1); 14 define("NO_ONLINE", 1); 15 define("IN_TASK", 1); 16 define('THIS_SCRIPT', 'task.php'); 17 18 require_once dirname(__FILE__)."/inc/init.php"; 19 20 my_set_time_limit(); 21 22 // Load language 23 $lang->set_language($mybb->settings['bblanguage']); 24 $lang->load("global"); 25 $lang->load("messages"); 26 27 if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset'])) 28 { 29 @mb_internal_encoding($lang->settings['charset']); 30 } 31 32 require_once MYBB_ROOT."inc/functions_task.php"; 33 34 // Are tasks set to run via cron instead & are we accessing this file via the CLI? 35 // php task.php [tid] 36 if(PHP_SAPI == "cli") 37 { 38 // Passing a specific task ID 39 if($_SERVER['argc'] == 2) 40 { 41 $query = $db->simple_select("tasks", "tid", "tid='".(int)$_SERVER['argv'][1]."'"); 42 $tid = $db->fetch_field($query, "tid"); 43 } 44 45 if($tid) 46 { 47 run_task($tid); 48 } 49 else 50 { 51 run_task(); 52 } 53 } 54 // Otherwise false GIF image, only supports running next available task 55 else 56 { 57 // Send our fake gif image (clear 1x1 transparent image) 58 header("Content-type: image/gif"); 59 header("Expires: Sat, 1 Jan 2000 01:00:00 GMT"); 60 header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); 61 header("Cache-Control: no-cache, must-revalidate"); 62 header("Pragma: no-cache"); 63 echo base64_decode("R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="); 64 65 // If the use shutdown functionality is turned off, run any shutdown related items now. 66 if($mybb->use_shutdown == true) 67 { 68 add_shutdown("run_task"); 69 } 70 else 71 { 72 run_task(); 73 } 74 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| 2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |