Przeglądaj źródła

new content element CE; php8 compatibility issues

master
Dom SP 3 lat temu
rodzic
commit
c3c2b761cb
4 zmienionych plików z 25 dodań i 4 usunięć
  1. +5
    -1
      app/modules/contenttype.php
  2. +13
    -0
      app/modules/filesinfolders.php
  3. +6
    -2
      app/modules/toc.php
  4. +1
    -1
      app/views/header2.htm

+ 5
- 1
app/modules/contenttype.php Wyświetl plik

@@ -23,7 +23,11 @@ class ContentType {
$this->href= $f3->get('SITE_URL').str_replace($f3->get('CONTENT'),"",$this->config['path']);

foreach ($this->keys as $k=>$v) {
$this->values[$v] = $keys[$k];
if (array_key_exists($k, $keys)) {
$this->values[$v] = $keys[$k];
} else {
$this->values[$v] = '';
}
}

$ke = explode("/",$this->config['path']);

+ 13
- 0
app/modules/filesinfolders.php Wyświetl plik

@@ -408,11 +408,24 @@ class FilesInFolders {
}
break;
case 'CE':
switch($request[1]) {
case 'publication':
$CE = new \Modules\CPublication($this->config,['path'=>$this->folder]);
if(count($request)>2) {
$CE->set_layout($request[2]);
}
$new = $CE;
break;
}
break;
case 'TOC':
// throw away TOC part of request, we don't need it
array_shift($request);
$toc = new \Modules\TOC($request,$this->folder,$body);
$toc->dispatch();
$new=sprintf("<div class=\"TOC %s\">%s</div>",
array_shift($request),
$toc);

+ 6
- 2
app/modules/toc.php Wyświetl plik

@@ -73,6 +73,10 @@ class TOC {
case 'concerts':
$this->load('\Modules\CConcert');
break;
case 'publication':
case 'publications':
$this->load('\Modules\CPublication');
break;
}
}

@@ -97,7 +101,7 @@ class TOC {
function apply_filters() {
foreach($this->elements as $k=>$v) {
$show = true;
if (count($this->filters['must_have'])) {
if (array_key_exists('must_have', $this->filters) && count($this->filters['must_have'])) {
$show = false;
foreach ($this->filters['must_have'] as $l=>$w) {
$ke = array_keys($w);
@@ -118,7 +122,7 @@ class TOC {
}
}
}
if (count($this->filters['must_not_have'])) {
if (array_key_exists('must_not_have', $this->filters) && count($this->filters['must_not_have'])) {
foreach ($this->filters['must_not_have'] as $l=>$w) {
$ke = array_keys($w);
$key = $ke[0];

+ 1
- 1
app/views/header2.htm Wyświetl plik

@@ -6,7 +6,7 @@
</div>
</check>
<check if="{{ @logo }}">
<check if="{{ isset(@logo) }}">
<true>
<a href="{{ @SITE_URL }}/"><h1>
<img src="/{{ @logo }}" alt="{{ @title }}" />

Ładowanie…
Anuluj
Zapisz