Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
login_design_management.inc
1 <?php
18 require_once SQ_INCLUDE_PATH.'/asset_management.inc';
19 
31 {
32 
33 
41  {
42  Asset_Management::__construct($pm);
43 
44  $this->vars = Array(
45  'id_name' => Array(
46  'default' => 'System Login Design',
47  ),
48  );
49 
50  }//end constructor
51 
52 
53 
62  function _upgrade($current_version)
63  {
64  if (!parent::_upgrade($current_version)) return FALSE;
65  if (version_compare($current_version, '0.2', '<')) {
66  // version 0.1 -> 0.2
67  // Regenerate login designs to clear the cached design, because there is a potential XSS hole which was fixed years ago might still got cached
68  pre_echo('UPGRADE LOGIN DESIGN AND EES LOGIN DESIGN');
69 
70  $design = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('login_design');
71  $design_edit_fns = $design->getEditFns();
72  $ees_design = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('ees_login_design');
73  $ees_design_edit_fns = $ees_design->getEditFns();
74 
75 
76  $design_edit_fns->parseAndProcessFile($design);
77  $design->generateDesignFile();
78 
79  $ees_design_edit_fns->parseAndProcessFile($ees_design);
80  $ees_design->generateDesignFile();
81 
82  pre_echo('LOGIN DESIGN AND EES LOGIN DESIGN UPGRADE COMPLETE - FROM VERSION 0.1');
83 
84  }//end if - upgrade to version 0.2
85 
86  return TRUE;
87 
88  }//end _upgrade()
89 
90 
91 }//end class
92 ?>