00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00033 require_once(t3lib_extMgm::extPath("kickstarter")."class.tx_kickstarter_sectionbase.php");
00034
00035 class tx_kickstarter_compilefiles extends tx_kickstarter_sectionbase {
00036
00037
00038 var $fileArray=array();
00039 var $ext_tables=array();
00040 var $ext_tca=array();
00041 var $ext_tables_sql=array();
00042 var $ext_localconf=array();
00043 var $ext_locallang=array();
00044 var $ext_locallang_db=array();
00045
00046 var $extKey="";
00047
00048 var $charMaxLng = 2;
00049
00050
00051 function makeFilesArray($extKey) {
00052
00053 $this->ext_localconf=array();
00054 $this->ext_tables=array();
00055 $this->fileArray=array();
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 foreach($this->wizArray as $catID=>$catData) {
00069 if($this->sections[$catID]) {
00070 $path = t3lib_div::getFileAbsFileName($this->sections[$catID]['filepath']);
00071 if(is_file($path)) {
00072 require_once($path);
00073 $section = t3lib_div::makeInstance($this->sections[$catID]['classname']);
00074 $section->wizard = &$this;
00075
00076 foreach($catData as $k=>$config) {
00077 $section->render_extPart($k,$config,$extKey);
00078 }
00079 }
00080 }
00081 }
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096 if (is_array($this->wizArray["sv"])) {
00097 reset($this->wizArray["sv"]);
00098 while(list($k,$config)=each($this->wizArray["sv"])) {
00099 $this->EM_CONF_presets["clearCacheOnLoad"]=1;
00100 }
00101 }
00102
00103
00104 if (count($this->ext_localconf)) {
00105 $this->addFileToFileArray("ext_localconf.php",trim($this->wrapBody("
00106 <?php
00107 if (!defined ('TYPO3_MODE')) die ('Access denied.');
00108 ",
00109 implode(chr(10),$this->ext_localconf),
00110 "?>
00111 ",0)));
00112 }
00113
00114 if (count($this->ext_tables)) {
00115 $this->addFileToFileArray("ext_tables.php",trim($this->wrapBody("
00116 <?php
00117 if (!defined ('TYPO3_MODE')) die ('Access denied.');
00118
00119 ",implode(chr(10),$this->ext_tables),"
00120 ?>
00121 ",0)));
00122 }
00123
00124 if (count($this->ext_tca)) {
00125 $this->addFileToFileArray("tca.php",trim($this->wrapBody("
00126 <?php
00127 if (!defined ('TYPO3_MODE')) die ('Access denied.');
00128
00129 ",implode(chr(10),$this->ext_tca),"
00130 ?>
00131 ",0)));
00132 }
00133
00134 if (count($this->ext_tables_sql)) {
00135 $this->addFileToFileArray("ext_tables.sql",trim($this->sPS(implode(chr(10),$this->ext_tables_sql))));
00136 }
00137
00138 if (count($this->ext_locallang)) {
00139 $this->addLocalLangFile($this->ext_locallang,"locallang.php",'Language labels for extension "'.$extKey.'"');
00140 }
00141
00142 if (count($this->ext_locallang_db)) {
00143 $this->addLocalLangFile($this->ext_locallang_db,"locallang_db.php",'Language labels for database tables/fields belonging to extension "'.$extKey.'"');
00144 }
00145
00146
00147 $this->dontPrintImages = 1;
00148 $this->addFileToFileArray("doc/wizard_form.html",trim($this->sPS('
00149 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
00150
00151 <html>
00152 <head>
00153 <title>Untitled</title>
00154 </head>
00155
00156 <body>
00157
00158 '.$this->totalForm().'
00159 </body>
00160 </html>
00161 ')));
00162 $this->addFileToFileArray("doc/wizard_form.dat",serialize($this->wizArray));
00163
00164 $this->addFileToFileArray("ChangeLog",
00165 '(add new changes on top of this file)
00166
00167 '.date("y-m-d").' '.$this->userField('name').' <'.$this->userField('email').'>
00168
00169 * Initial release
00170 ' );
00171
00172 $this->addFileToFileArray("README.txt",'
00173 Feel free to add some documentation or simply add a link to the online manual.
00174 ' );
00175
00176
00177 $this->addFileToFileArray("ext_icon.gif",t3lib_div::getUrl(t3lib_extMgm::extPath("kickstarter")."res/notfound.gif"));
00178
00179
00180 # debug($this->wizArray);
00181 # debug ($this->fileArray);
00182 # return $dataArr;
00183 }
00184
00185
00186
00187 }
00188
00189
00190 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/kickstarter/class.tx_kickstarter_compilefiles.php"]) {
00191 include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/kickstarter/class.tx_kickstarter_compilefiles.php"]);
00192 }
00193
00194 ?>