Mercurial > epgrec.yaz
comparison Settings.class.php @ 69:1033324d7ecc
Merge branch 'origin/testing'
author | yoneda <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Tue, 03 Nov 2009 14:54:40 +0900 |
parents | a2c4665b310c 3d6e7c606896 |
children | 11f63ae04a96 cce6f88590fd |
comparison
equal
deleted
inserted
replaced
68:25736d81c66d | 69:1033324d7ecc |
---|---|
7 | 7 |
8 public static function factory() { | 8 public static function factory() { |
9 | 9 |
10 if( file_exists( INSTALL_PATH . self::CONFIG_XML ) ) { | 10 if( file_exists( INSTALL_PATH . self::CONFIG_XML ) ) { |
11 $xmlfile = file_get_contents(INSTALL_PATH . self::CONFIG_XML); | 11 $xmlfile = file_get_contents(INSTALL_PATH . self::CONFIG_XML); |
12 return new self($xmlfile); | 12 $obj = new self($xmlfile); |
13 | |
14 // 8月14日以降に追加した設定項目の自動生成 | |
15 | |
16 // キーワード自動録画の録画モード | |
17 if( $obj->exists("autorec_mode") == 0 ) { | |
18 $obj->autorec_mode = 0; | |
19 $obj->save(); | |
20 } | |
21 | |
22 return $obj; | |
13 } | 23 } |
14 else { | 24 else { |
15 // 初回起動 | 25 // 初回起動 |
16 $xmlfile = '<?xml version="1.0" encoding="UTF-8" ?><epgrec></epgrec>'; | 26 $xmlfile = '<?xml version="1.0" encoding="UTF-8" ?><epgrec></epgrec>'; |
17 $xml = new self($xmlfile); | 27 $xml = new self($xmlfile); |
101 // 1局の幅 | 111 // 1局の幅 |
102 $xml->ch_set_width = 150; | 112 $xml->ch_set_width = 150; |
103 // 1分あたりの高さ | 113 // 1分あたりの高さ |
104 $xml->height_per_hour = 120; | 114 $xml->height_per_hour = 120; |
105 | 115 |
116 // 8月14日版以降に追加した設定項目 | |
117 | |
118 // キーワード自動録画の録画モード | |
119 $xml->autorec_mode = 0; | |
120 | |
106 $xml->save(); | 121 $xml->save(); |
107 | 122 |
108 return $xml; | 123 return $xml; |
109 } | 124 } |
110 } | 125 } |