Changeset 23124 for branches/version-2_13-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php
- Timestamp:
- 2013/08/24 23:33:52 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php
r23098 r23124 38 38 * @return void 39 39 */ 40 function init()40 public function init() 41 41 { 42 42 parent::init(); … … 58 58 * @return void 59 59 */ 60 function process()60 public function process() 61 61 { 62 62 $this->action(); … … 69 69 * @return void 70 70 */ 71 function action()71 public function action() 72 72 { 73 73 $objFormParam = new SC_FormParam_Ex(); … … 127 127 * パラメーター情報の初期化 128 128 * 129 * @param object $objFormParam SC_FormParamインスタンス130 * @return void 131 */ 132 function lfInitParam(&$objFormParam)129 * @param object $objFormParam SC_FormParamインスタンス 130 * @return void 131 */ 132 public function lfInitParam(&$objFormParam) 133 133 { 134 134 $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); … … 141 141 * テンプレートをマスターデータに登録する. 142 142 * 143 * @param string $template_codeテンプレートコード144 * @param integer $device_type_id 端末種別ID145 * @return void 146 */ 147 function doUpdateMasterData($template_code, $device_type_id)143 * @param string $template_code テンプレートコード 144 * @param integer $device_type_id 端末種別ID 145 * @return void 146 */ 147 public function doUpdateMasterData($template_code, $device_type_id) 148 148 { 149 149 $masterData = new SC_DB_MasterData_Ex(); … … 178 178 * この SQL は, 各端末に合わせて実行する必要がある 179 179 * 180 * @param string $filepath SQLのファイルパス181 * @return void 182 */ 183 function updateBloc($filepath)180 * @param string $filepath SQLのファイルパス 181 * @return void 182 */ 183 public function updateBloc($filepath) 184 184 { 185 185 $sql = file_get_contents($filepath); … … 200 200 * テンプレートパッケージの削除. 201 201 * 202 * @param string $template_codeテンプレートコード203 * @param integer $device_type_id 端末種別ID202 * @param string $template_code テンプレートコード 203 * @param integer $device_type_id 端末種別ID 204 204 * @return boolean 成功した場合 true; 失敗した場合 false 205 205 */ 206 function doDelete($template_code, $device_type_id)206 public function doDelete($template_code, $device_type_id) 207 207 { 208 208 if ($template_code == $this->getTemplateName($device_type_id) 209 209 || $template_code == $this->getTemplateName($device_type_id, true)) { 210 210 $this->arrErr['err'] = '※ デフォルトテンプレートと、選択中のテンプレートは削除出来ません<br />'; 211 211 212 return false; 212 213 } else { … … 222 223 $this->arrErr['err'] = $error; 223 224 $objQuery->rollback(); 225 224 226 return false; 225 227 } … … 229 231 $this->arrErr['err'] = $error; 230 232 $objQuery->rollback(); 233 231 234 return false; 232 235 } … … 237 240 $this->arrErr['err'] = $error; 238 241 $objQuery->rollback(); 242 239 243 return false; 240 244 } 241 245 $objQuery->commit(); 246 242 247 return true; 243 248 } … … 249 254 * 失敗した場合は, エラーメッセージを出力し, false を返す. 250 255 * 251 * @param string $template_codeテンプレートコード252 * @param integer $device_type_id 端末種別ID256 * @param string $template_code テンプレートコード 257 * @param integer $device_type_id 端末種別ID 253 258 * @return boolean 成功した場合 true; 失敗した場合 false 254 259 */ 255 function doRegister($template_code, $device_type_id)260 public function doRegister($template_code, $device_type_id) 256 261 { 257 262 $tpl_dir = USER_TEMPLATE_REALDIR . $template_code . '/'; 258 263 if (!is_dir($tpl_dir)) { 259 264 $this->arrErr['err'] = '※ ' . $tpl_dir . 'が見つかりません<br />'; 265 260 266 return false; 261 267 } … … 281 287 * 失敗した場合は, エラーメッセージを出力し, false を返す. 282 288 * 283 * @param string$template_code テンプレートコード289 * @param string $template_code テンプレートコード 284 290 * @return boolean 成功した場合 true; 失敗した場合 false 285 291 */ 286 function doDownload($template_code)292 public function doDownload($template_code) 287 293 { 288 294 $from_dir = USER_TEMPLATE_REALDIR . $template_code . '/'; … … 290 296 if (SC_Utils_Ex::recursiveMkdir($to_dir) === false) { 291 297 $this->arrErr['err'] = '※ ディレクトリの作成に失敗しました<br />'; 298 292 299 return false; 293 300 } … … 295 302 if (SC_Helper_FileManager_Ex::downloadArchiveFiles(SMARTY_TEMPLATES_REALDIR . $template_code, $template_code) === false) { 296 303 $this->arrErr['err'] = '※ アーカイブファイルの作成に失敗しました<br />'; 304 297 305 return false; 298 306 } … … 304 312 * テンプレート情報を取得する. 305 313 * 306 * @param integer $device_type_id 端末種別ID307 * @return array テンプレート情報の配列308 */ 309 function getAllTemplates($device_type_id)314 * @param integer $device_type_id 端末種別ID 315 * @return array テンプレート情報の配列 316 */ 317 public function getAllTemplates($device_type_id) 310 318 { 311 319 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 317 325 * テンプレート名を返す. 318 326 * 319 * @param integer $device_type_id 端末種別ID320 * @param boolean $isDefaultデフォルトテンプレート名を返す場合 true321 * @return string テンプレート名322 */ 323 function getTemplateName($device_type_id, $isDefault = false)327 * @param integer $device_type_id 端末種別ID 328 * @param boolean $isDefault デフォルトテンプレート名を返す場合 true 329 * @return string テンプレート名 330 */ 331 public function getTemplateName($device_type_id, $isDefault = false) 324 332 { 325 333 switch ($device_type_id) {
Note: See TracChangeset
for help on using the changeset viewer.