Bläddra i källkod

make CMS work with stricter rules of php8

master
Dom SP 3 år sedan
förälder
incheckning
0fa8c1aef9
5 ändrade filer med 20 tillägg och 47 borttagningar
  1. +7
    -7
      app/modules/filesinfolders.php
  2. +2
    -0
      app/views/colors.css
  3. +5
    -5
      app/views/header2.htm
  4. +5
    -35
      app/views/navigation.htm
  5. +1
    -0
      main.cfg.sample

+ 7
- 7
app/modules/filesinfolders.php Visa fil

@@ -136,7 +136,7 @@ class FilesInFolders {
//$str = sprintf("%s", $str);
$this->content[$domain][$key."30text"] = sprintf(
"<div class=\"item %s %s\"><a name=\"%s\"></a>%s</div>",
$page,
'',
$key,
$key,
$str
@@ -144,7 +144,7 @@ class FilesInFolders {
}
$includeTemplates = array_key_exists('includeTemplates', $this->config)
? $this->config['includeTemplates']
: $f3->get('includeTemplates') ? : FALSE
: ($f3->get('includeTemplates') ? : FALSE)
;
if ($includeTemplates) {
foreach($this->structs[$domain_key]['tpl'] as $key=>$file) {
@@ -152,7 +152,7 @@ class FilesInFolders {
$str = self::linkify($str);
$this->content[$domain][$key."00tpl"] = sprintf(
"<div class=\"item %s %s\">%s</div>",
$page,
'',
$key,
$str
);
@@ -160,7 +160,7 @@ class FilesInFolders {
}
$bulkIncludePic = array_key_exists('bulkIncludePic',$this->config)
? $this->config['bulkIncludePic']
: $f3->get('bulkIncludePic') ? : FALSE
: ($f3->get('bulkIncludePic') ? : FALSE)
;
if ($bulkIncludePic) {
@@ -185,9 +185,9 @@ class FilesInFolders {
}
$bulkIncludeAudio = array_key_exists('bulkIncludeAudio',$this->config)
? $this->config['bulkIncludeAudio']
: $f3->get('bulkIncludeAudio') ? : FALSE
;
? $this->config['bulkIncludeAudio']
: ($f3->get('bulkIncludeAudio') ? : FALSE)
;
if ($bulkIncludeAudio) {
foreach ($this->structs[$domain_key]['audio'] as $key=>$file) {
$this->content[$domain][$key."20audio"] = sprintf(

+ 2
- 0
app/views/colors.css Visa fil

@@ -1,6 +1,8 @@
body {
background-color: {{ @backgroundColor }};
<check if="{{ isset(@backgroundImage) }}">
background-image: url(/{{ @backgroundImage }});
</check>
}

<repeat group="{{ @customVars }}" key="{{ @ikey }}" value="{{ @ivalue }}">

+ 5
- 5
app/views/header2.htm Visa fil

@@ -17,19 +17,19 @@
</false>
</check>

<check if="{{ @subTitle }}">
<check if="{{ isset(@subTitle) }}">
<h2>{{ @subTitle }}</h2>
</check>

<check if="{{ @headerInfo1 || @headerInfo2 }}">
<check if="{{ isset(@headerInfo1) || isset(@headerInfo2) }}">
<div class="headerInfo">
<span class="headerInfo1">{{ @headerInfo1 }}</span>
<span class="headerInfo2">{{ @headerInfo2 }}</span>
<span class="headerInfo1">{{ isset(@headerInfo1) ? @headerInfo1 : ''}}</span>
<span class="headerInfo2">{{ isset(@headerInfo2) ? @headerInfo2 : ''}}</span>
</div>
</check>
</header>

<check if="{{ @banner }}">
<check if="{{ isset(@banner) }}">
<true>
<div id="site-banner"><img src="/{{ @banner }}" alt="{{ @subTitle }}" /></div>
</true>

+ 5
- 35
app/views/navigation.htm Visa fil

@@ -1,8 +1,11 @@
<ul class="nav level{{ @level }}">
<repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}">
<li class="{{ @item.class }}"><a href="{{ @item.href }}">{{ @item.name | raw }}</a>
<check if="{{ is_array(@item.submenu) }}">
<li class="{{ @item.class }}">
<a href="{{ @item.href }}">{{ @item.name | raw }}</a>
<check if="{{ array_key_exists('submenu', @item) && is_array(@item.submenu) }}">
<include href="navigation.htm" with="menu={{ @item.submenu }},level={{ @level + 1 }}" />
</check>
</li>
@@ -10,36 +13,3 @@
</repeat>
</ul>



<check if="{{ false }}">
<ul>
<repeat group="{{ @menu }}" key="{{ @key }}" value="{{ @item }}">
<check if="{{ is_array(@item) }}">
<true>
<li class="{{ in_array(@key,$url)?'active':'away' }}">
<a href="{{ @SITE_URL }}/{{ @key }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item.index }}</a>
<check if="{{ count(@item) > 1 }}">
<ul>
<repeat group="{{ @item }}" key="{{ @key2 }}" value="{{ @item2 }}">
<check if="{{ @key2 != 'index'}}">
<li class="{{ (in_array(@key2,$url) && in_array(@key,$url))?'active':'away' }}">
<a href="{{ @SITE_URL }}/{{ @key }}/{{ @key2 }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item2 }}</a>
</li>
</check>
</repeat>
</ul>
</check>
</li>
</true>
<false>
<li class="{{ in_array(@key,$url)?'active':'away' }}">
<a href="{{ @SITE_URL }}/{{ @key }}{{ (@LANG=='de' ? '' : '?lang='.@LANG )}}">{{ @item }}</a>
</li>
</false>
</check>
</repeat>
</ul>
</check>

+ 1
- 0
main.cfg.sample Visa fil

@@ -47,5 +47,6 @@ RESOURCES=rsc/
;default site template:
template=tpl/index.html
theme=style.css
themepath=./

external_links_open_in_new_window=false

Laddar…
Avbryt
Spara