CMSimple_XH 開発者ドキュメント
CoreLangFileEdit.php
1 <?php
2 
16 namespace XH;
17 
29 {
37  public function __construct()
38  {
39  global $sl, $cf, $tx;
40 
41  parent::__construct();
42  $this->varName = 'tx';
43  $this->params = array(
44  'form' => 'array',
45  'file' => 'language',
46  'action' => 'save'
47  );
48  $this->redir = '?file=language&action=array&xh_success=language';
49  $this->cfg = array();
50  foreach ($tx as $cat => $opts) {
51  $this->cfg[$cat] = array();
52  foreach ($opts as $name => $val) {
53  // don't show or save the following
54  if ($cat == 'meta' && $name =='codepage') {
55  continue;
56  }
57  $co = array('val' => $val, 'type' => 'text', 'isAdvanced' => false);
58  if ($cat == 'subsite' && $name == 'template') {
59  if ($sl === $cf['language']['default']) {
60  $co['type'] = 'hidden';
61  } else {
62  $co['type'] = 'enum';
63  $co['vals'] = $this->selectOptions('templates', '/^([^\.]*)$/i');
64  array_unshift($co['vals'], '');
65  }
66  }
67  $this->cfg[$cat][$name] = $co;
68  }
69  }
70  }
71 }
$cf
Definition: cms.php:272
if(!isset($cf['folders']['content'])) if($cf['site']['timezone'] !=='' &&function_exists('date_default_timezone_set')) $sl
Definition: cms.php:331
$tx
Definition: cms.php:363