不要API削除、setup.phpを微調整
@@ -98,6 +98,21 @@ | ||
98 | 98 | <th>補足</th> |
99 | 99 | </tr> |
100 | 100 | <?php |
101 | + function is_file_writable($d) { | |
102 | + $files = glob($d.'*'); | |
103 | + foreach ($files as $f) { | |
104 | + $b = basename($f); | |
105 | + if (substr($b,0,1) == '.') | |
106 | + continue; | |
107 | + if (is_dir($f)) | |
108 | + continue; | |
109 | + if (!is_writable($f)) { | |
110 | + var_dump($f); | |
111 | + return FALSE; | |
112 | + } | |
113 | + } | |
114 | + return TRUE; | |
115 | + } | |
101 | 116 | $c = array(); |
102 | 117 | $i = 0; |
103 | 118 | $c[$i] = array( |
@@ -113,6 +128,12 @@ | ||
113 | 128 | $c[$i++]['ret'] = is_writable(DATA); |
114 | 129 | |
115 | 130 | $c[$i] = array( |
131 | + 'name' => 'DATAディレクトリ内のファイル', | |
132 | + 'desc' => DATA.'ディレクトリ内のファイルに、書き込み権限を与えてください。' | |
133 | + ); | |
134 | + $c[$i++]['ret'] = is_file_writable(DATA); | |
135 | + | |
136 | + $c[$i] = array( | |
116 | 137 | 'name' => 'SESSIONディレクトリ', |
117 | 138 | 'desc' => SESSION.'ディレクトリに、書き込み権限を与えてください。' |
118 | 139 | ); |
@@ -133,6 +154,12 @@ | ||
133 | 154 | $c[$i++]['ret'] = is_writable(LAYOUTS); |
134 | 155 | |
135 | 156 | $c[$i] = array( |
157 | + 'name' => 'LAYOUTSディレクトリ内のファイル', | |
158 | + 'desc' => '必須ではありませんが、書き込み権限を与えないと管理機能の「ボックス配置」が動作しません。' | |
159 | + ); | |
160 | + $c[$i++]['ret'] = is_file_writable(LAYOUTS); | |
161 | + | |
162 | + $c[$i] = array( | |
136 | 163 | 'name' => 'boxディレクトリ', |
137 | 164 | 'desc' => '必須ではありませんが、書き込み権限を与えないと管理機能の「ボックス管理」が動作しません。' |
138 | 165 | ); |
@@ -139,6 +166,12 @@ | ||
139 | 166 | $c[$i++]['ret'] = is_writable(PAGES.'box'); |
140 | 167 | |
141 | 168 | $c[$i] = array( |
169 | + 'name' => 'boxディレクトリ内のファイル', | |
170 | + 'desc' => '必須ではありませんが、書き込み権限を与えないと管理機能の「ボックス管理」が動作しません。' | |
171 | + ); | |
172 | + $c[$i++]['ret'] = is_file_writable(PAGES.'box/'); | |
173 | + | |
174 | + $c[$i] = array( | |
142 | 175 | 'name' => 'BASE_URL', |
143 | 176 | 'desc' => 'config.inc.phpで、正しいサーバのURLを設定してください。現在 http:// から指定してしまうと問題が出るので、http://host/yukisuke/ というURLであれば、/yukisuke/ という形で指定してください。' |
144 | 177 | ); |
@@ -148,29 +181,14 @@ | ||
148 | 181 | $skin = new Skin(); |
149 | 182 | $c[$i] = array( |
150 | 183 | 'name' => 'スキンフォルダ', |
151 | - 'desc' => $skin->target_dir.'フォルダに書き込み権限を与えてください。' | |
184 | + 'desc' => '必須ではありませんが、スキンを切り替える場合'.$skin->target_dir.'フォルダに書き込み権限を与えてください。' | |
152 | 185 | ); |
153 | 186 | $c[$i++]['ret'] = is_writable($skin->target_dir); |
154 | 187 | $c[$i] = array( |
155 | - 'name' => 'admin.css', | |
156 | - 'desc' => $skin->target_dir.'admin.cssに書き込み権限を与えてください。' | |
188 | + 'name' => 'スキンフォルダ内のファイル', | |
189 | + 'desc' => '必須ではありませんが、スキンを切り替える場合'.$skin->target_dir.'フォルダ内のファイルに書き込み権限を与えてください。' | |
157 | 190 | ); |
158 | - $c[$i++]['ret'] = is_writable($skin->target_dir.'admin.css'); | |
159 | - $c[$i] = array( | |
160 | - 'name' => 'bullet-gethtml.css', | |
161 | - 'desc' => $skin->target_dir.'bullet-gethtml.cssに書き込み権限を与えてください。' | |
162 | - ); | |
163 | - $c[$i++]['ret'] = is_writable($skin->target_dir.'bullet-gethtml.css'); | |
164 | - $c[$i] = array( | |
165 | - 'name' => 'main.css', | |
166 | - 'desc' => $skin->target_dir.'main.cssに書き込み権限を与えてください。' | |
167 | - ); | |
168 | - $c[$i++]['ret'] = is_writable($skin->target_dir.'main.css'); | |
169 | - $c[$i] = array( | |
170 | - 'name' => 'url.css', | |
171 | - 'desc' => $skin->target_dir.'url.cssに書き込み権限を与えてください。' | |
172 | - ); | |
173 | - $c[$i++]['ret'] = is_writable($skin->target_dir.'url.css'); | |
191 | + $c[$i++]['ret'] = is_file_writable($skin->target_dir); | |
174 | 192 | |
175 | 193 | $c[$i] = array( |
176 | 194 | 'name' => 'TIMEZONE', |
@@ -1,6 +0,0 @@ | ||
1 | -<?php | |
2 | -include '../env.php'; | |
3 | -require_once(LIB.'common.inc.php'); | |
4 | -require_once(LIB.'Post.class.php'); | |
5 | -$post = new Post(); | |
6 | -?> | |
\ No newline at end of file |