Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
design_customisation_management.inc
1 <?php
18 require_once SQ_INCLUDE_PATH.'/asset_management.inc';
19 
31 {
32 
33 
39  {
40  Asset_Management::__construct($pm);
41 
42  }//end constructor
43 
44 
53  function _upgrade($current_version)
54  {
55  // first do things as normal
56  $res = parent::_upgrade($current_version);
57 
58  if (version_compare($current_version, '0.2', '<')) {
59  pre_echo('UPGRADING DESIGN CUSTOMISATION FROM v < 0.2');
60 
61  // get all design assets
62  $design_ids = $GLOBALS['SQ_SYSTEM']->am->getTypeAssetids('design_customisation', TRUE, TRUE);
63  foreach ($design_ids as $design_id => $type) {
64  $design = $GLOBALS['SQ_SYSTEM']->am->getAsset($design_id, $type['type_code']);
65  $design->setAttrValue('static_url_versioning', FALSE);
66  $design->saveAttributes();
67  $GLOBALS['SQ_SYSTEM']->am->forgetAsset($design);
68  unset($design);
69  }
70 
71  }//end if
72  return TRUE;
73 
74  }//end _upgrade()
75 
76 }//end class
77 
78 
79 ?>