Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
paint_layout_bodycopy_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  $this->vars = Array(
43  'conditional_keywords' => Array(
44  'added' => '0.1',
45  'type' => 'serialise',
46  'default' => Array(),
47  ),
48  'associated_asset_type' => Array(
49  'added' => '0.1',
50  'type' => 'text',
51  'default' => '',
52  ),
53  'lineage_separator' => Array (
54  'added' => '0.1',
55  'type' => 'text',
56  'default' => ' > ',
57  'description' => 'Seperator to use when painting the lineage of an asset.',
58  ),
59  );
60 
61  }//end constructor
62 
63 
72  function _upgrade($current_version)
73  {
74  parent::_upgrade($current_version);
75 
76  if (version_compare($current_version, '0.6', '<')) {
77  echo('UPGRADING PAINT LAYOUT BODYCOPY FROM '.$current_version." TO VERSION 0.6\n");
78 
79  pre_echo('Updating Paint Layout Bodycopy...');
80  // Get all Search Page assets
81  $paint_layout_bodycopy = $GLOBALS['SQ_SYSTEM']->am->getTypeAssetids('paint_layout_bodycopy', FALSE, TRUE);
82  foreach ($paint_layout_bodycopy as $id => $type) {
83  $asset = $GLOBALS['SQ_SYSTEM']->am->getAsset($id, '', TRUE);
84 
85  if (!is_null($asset)) {
86  $asset->_updated();
87  }
88 
89  $asset = NULL;
90  }//
91 
92  pre_echo('PAINT LAYOUT BODYCOPY SUCCESSFULLY UPGRADED TO VERSION 0.6');
93  }//end if
94 
95  return TRUE;
96 
97  }//end _upgrade()
98 
99 
100 }//end class
101 
102 ?>