Overview

Packages

  • Gollem
  • None

Classes

  • Gollem
  • Gollem_Ajax_Application
  • Gollem_Api
  • Gollem_Auth
  • Gollem_Exception
  • Gollem_Factory_Vfs
  • Gollem_Factory_VfsDefault
  • Gollem_LoginTasks_SystemTask_Upgrade
  • Gollem_Test
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Login system task for automated upgrade tasks.
 4:  *
 5:  * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
 6:  *
 7:  * See the enclosed file COPYING for license information (GPL). If you
 8:  * did not receive this file, see http://www.horde.org/licenses/gpl.
 9:  *
10:  * @author   Michael Slusarz <slusarz@horde.org>
11:  * @category Horde
12:  * @license  http://www.horde.org/licenses/gpl GPL
13:  * @package  Gollem
14:  */
15: class Gollem_LoginTasks_SystemTask_Upgrade extends Horde_Core_LoginTasks_SystemTask_Upgrade
16: {
17:     /**
18:      */
19:     protected $_app = 'gollem';
20: 
21:     /**
22:      */
23:     protected $_versions = array(
24:         '2.0'
25:     );
26: 
27:     /**
28:      */
29:     protected function _upgrade($version)
30:     {
31:         global $prefs;
32: 
33:         switch ($version) {
34:         case '2.0':
35:             /* Upgrade to the new preferences format. */
36:             if (!$prefs->isDefault('columns')) {
37:                 $cols = $prefs->getValue('columns');
38:                 if (!is_array(json_decode($cols))) {
39:                     $prefs->setValue('columns', json_encode(explode("\t", $cols)));
40:                 }
41:             }
42:             break;
43:         }
44:     }
45: 
46: }
47: 
API documentation generated by ApiGen