Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
import_tools_manager_management.inc
1 <?php
18 require_once SQ_INCLUDE_PATH.'/asset_management.inc';
19 
31 {
32 
33 
38  {
39  $this->Asset_Management($pm);
40 
41  $this->vars = Array(
42  'import_dir' => Array(
43  'added' => '0.1',
44  'type' => 'text',
45  'default' => '',
46  ),
47  'valid_file_types' => Array(
48  'added' => '0.1',
49  'type' => 'serialise',
50  'default' => Array(
51  'htm',
52  'html',
53  ),
54  ),
55  'valid_word_file_types' => Array(
56  'added' => '0.1',
57  'type' => 'serialise',
58  'default' => Array(
59  'html',
60  'htm',
61  ),
62  ),
63  'heading_defaults' => Array(
64  'added' => '0.1',
65  'type' => 'serialise',
66  'default' => Array(
67  'h1',
68  'h2',
69  ),
70  ),
71  'max_file_size' => Array(
72  'added' => '0.1',
73  'type' => 'int',
74  'default' => 0,
75  ),
76  'create_css_file' => Array(
77  'added' => '0.1',
78  'type' => 'boolean',
79  'default' => TRUE,
80  'parameters' => Array(
81  'allow_empty' => FALSE,
82  ),
83  ),
84  'allowed_import_type' => Array(
85  'added' => '0.1',
86  'type' => 'selection',
87  'default' => 'Server and Local',
88  'is_admin' => 0,
89  'parameters' => Array(
90  'options' => Array(
91  'Server and Local' => 'Server and Local',
92  'Server Only' => 'Server Only',
93  'Local Only' => 'Local Only',
94  ),
95  'multiple' => FALSE,
96  'allow_empty' => FALSE,
97  'allow_other' => FALSE,
98  ),
99  ),
100  'bulk_file_import_dir' => Array(
101  'added' => '0.1',
102  'type' => 'text',
103  'default' => '',
104  ),
105  'cms_file_export_dir' => Array(
106  'added' => '0.2',
107  'type' => 'text',
108  'default' => '',
109  ),
110  'cms_file_export_name' => Array(
111  'added' => '0.2',
112  'type' => 'text',
113  'default' => '',
114  ),
115  );
116 
117  }//end constructor
118 
119 
128  function _upgrade($current_version)
129  {
130  // Bump this version when a new converter is installed.
131  // No need to have a new version compare statement, as any call to installConverters() below
132  // will install all converters currently in the system
133  if (version_compare($current_version,'0.2','<')) {
134 
135  echo('INSTALLING NEW CONVERTERS - FROM VERSION '.$current_version."\n");
136 
137  $itm = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('import_tools_manager');
138  $itm->installConverters();
139 
140  echo('FINISHED INSTALLING NEW CONVERTERS - FROM VERSION '.$current_version."\n");
141 
142  }
143 
144  return parent::_upgrade($current_version);
145 
146  }//end _upgrade()
147 
148 
149 }//end class
150 ?>