Lithron
[ class tree: Lithron ] [ index: Lithron ] [ all elements ]

Source for file Administration.php

Documentation is available at Administration.php

  1. <?php
  2.  
  3.  
  4. /**
  5. * Class file.
  6. *
  7. * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
  8. * @copyright 2005, diemeisterei GmbH. All rights reserved.
  9. * @author $Author: spheenik $
  10. * @version $Revision: 214 $ $Date: 2006-05-18 15:35:49 +0200 (Do, 18 Mai 2006) $
  11. * @package Lithron
  12. * @subpackage Pages
  13. */
  14.  
  15. /**
  16. * Displays lithrons main configuration options
  17. *
  18. * @package Lithron
  19. * @subpackage Pages
  20. */
  21.  
  22. class Administration extends TPage
  23. {
  24.  
  25. /**
  26. * Updates 'Globalization' settings
  27. */
  28. function updateCulture($sender, $param)
  29. {
  30. $c= $this->CultureSelector->getSelectedValue();
  31. $this->Application->Session->add("Culture", $c);
  32. $this->getApplication()->getGlobalization()->Culture= $c;
  33. Prado :: trace("Culture set to " . $c, "Lithron.Main");
  34. }
  35.  
  36. /**
  37. * deletes cache files from the runtime folder
  38. */
  39. function deleteRuntimeCache($sender, $param)
  40. {
  41. $sel = $this->RuntimeCacheSelector->getSelectedIndices();
  42. if (count($sel) == 0)
  43. {
  44. Prado :: trace("No runtime files selected. Nothing deleted.", "Lithron.Main");
  45. return;
  46. }
  47. $ds = $this->RuntimeCacheSelector->getItems();
  48. $rp = $this->Application->getRuntimePath();
  49. foreach($sel as $index)
  50. {
  51. // TODO: Windows filepath separator?
  52. $filename = $rp."/".$ds[$index]->getValue();
  53. $result = unlink($filename);
  54. Prado :: trace("Deleting $filename: " . ($result ? "ok" : "failed"), "Lithron.Main");
  55. }
  56. }
  57. }
  58. ?>

Documentation generated on Tue, 20 Jun 2006 05:14:54 +0200 by phpDocumentor 1.3.0RC4