PageRenderTime 36ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/www/admin/run-mpe.php

https://github.com/orchestra-io/sample-openx
PHP | 59 lines | 14 code | 11 blank | 34 comment | 1 complexity | 4945740b9480bf247a0da095ed1c60f8 MD5 | raw file
  1. <?php
  2. /*
  3. +---------------------------------------------------------------------------+
  4. | OpenX v${RELEASE_MAJOR_MINOR} |
  5. | =======${RELEASE_MAJOR_MINOR_DOUBLE_UNDERLINE} |
  6. | |
  7. | Copyright (c) 2003-2009 OpenX Limited |
  8. | For contact details, see: http://www.openx.org/ |
  9. | |
  10. | This program is free software; you can redistribute it and/or modify |
  11. | it under the terms of the GNU General Public License as published by |
  12. | the Free Software Foundation; either version 2 of the License, or |
  13. | (at your option) any later version. |
  14. | |
  15. | This program is distributed in the hope that it will be useful, |
  16. | but WITHOUT ANY WARRANTY; without even the implied warranty of |
  17. | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
  18. | GNU General Public License for more details. |
  19. | |
  20. | You should have received a copy of the GNU General Public License |
  21. | along with this program; if not, write to the Free Software |
  22. | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
  23. +---------------------------------------------------------------------------+
  24. $Id: run-mpe.php 30820 2009-01-13 19:02:17Z andrew.hill $
  25. */
  26. /**
  27. * A script file to run the Maintenance Priority Engine.
  28. */
  29. // Send headers to the client before proceeding
  30. flush();
  31. // Prevent output
  32. ob_start();
  33. // Run maintenance
  34. // Done this way so that it works in CLI PHP
  35. $path = dirname(__FILE__);
  36. require_once $path . '/../../init.php';
  37. // Set longer time out, and ignore user abort
  38. if (!ini_get('safe_mode')) {
  39. @set_time_limit($conf['maintenance']['timeLimitScripts']);
  40. @ignore_user_abort(true);
  41. }
  42. require_once MAX_PATH . '/lib/OA/Maintenance/Priority.php';
  43. OA_Maintenance_Priority::run();
  44. // Get and clean output buffer
  45. $buffer = ob_get_clean();
  46. // Flush output buffer, stripping the
  47. echo preg_replace('/^#!.*\n/', '', $buffer);
  48. ?>