Source for file change.act.php

Documentation is available at change.act.php

  1. <?php
  2. /**
  3. * @since 7/21/05
  4. * @package polyphony.language
  5. *
  6. * @copyright Copyright &copy; 2005, Middlebury College
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  8. *
  9. * @version $Id: change.act.php,v 1.10 2007/09/19 14:04:56 adamfranco Exp $
  10. */
  11.  
  12. require_once(POLYPHONY."/main/library/AbstractActions/Action.class.php");
  13.  
  14. /**
  15. * Change the language to the one specified by the user
  16. *
  17. * @since 7/21/05
  18. * @package polyphony.language
  19. *
  20. * @copyright Copyright &copy; 2005, Middlebury College
  21. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  22. *
  23. * @version $Id: change.act.php,v 1.10 2007/09/19 14:04:56 adamfranco Exp $
  24. */
  25. class changeAction
  26. extends Action
  27. {
  28. /**
  29. * Check Authorizations
  30. *
  31. * @return boolean
  32. * @access public
  33. * @since 4/26/05
  34. */
  35. function isAuthorizedToExecute () {
  36. return TRUE;
  37. }
  38. /**
  39. * Execute this action.
  40. *
  41. * @param object Harmoni $harmoni
  42. * @return mixed
  43. * @access public
  44. * @since 4/25/05
  45. */
  46. function execute ( $harmoni ) {
  47. // Set the new language
  48. $langLoc = Services::getService('Lang');
  49. $harmoni->request->startNamespace("polyphony");
  50. $langLoc->setLanguage($harmoni->request->get("language"));
  51. $harmoni->request->endNamespace();
  52. debug::output("Setting the language to ".$harmoni->request->get("polyphony/language"));
  53. debug::output("SESSION: ".printpre($_SESSION, TRUE));
  54. $harmoni->history->goBack("polyphony/language/change");
  55. $null = null;
  56. return $null;
  57. }
  58. }
  59.  
  60. ?>

Documentation generated on Wed, 19 Sep 2007 10:22:00 -0400 by phpDocumentor 1.3.0RC3