- Timestamp:
- 2007/08/03 16:31:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/db/SC_DB_MasterData.php
r15163 r15169 205 205 $data = "<?php\n"; 206 206 if ($isDefine) { 207 $data .= $this->getMasterDataAsDefine($masterData); 207 $data .= $this->getMasterDataAsDefine($masterData, 208 $this->getDbMasterData("mtb_constants", array("id", "remarks", "rank"))); 208 209 } else { 209 210 $data .= $this->getMasterDataAsString($name, $masterData); … … 268 269 */ 269 270 function getDefaultColumnName($columns = array()) { 271 270 272 if (!empty($columns)) { 271 273 return $columns; 272 } 273 return $this->columns; 274 } else { 275 return $this->columns; 276 } 274 277 } 275 278 … … 301 304 * @access private 302 305 * @param array $masterData マスタデータの配列 306 * @param array $comments コメントの配列 303 307 * @return string 定数定義の文字列 304 308 */ 305 function getMasterDataAsDefine($masterData ) {309 function getMasterDataAsDefine($masterData, $comments = array()) { 306 310 $data = ""; 307 311 foreach ($masterData as $key => $val) { 312 if (isset($comments[$key])) { 313 $data .= "/** " . $comments[$key] . " */\n"; 314 } 308 315 $data .= "define('" . $key . "', " . $val . ");\n"; 309 316 }
Note: See TracChangeset
for help on using the changeset viewer.