From 0e8661256f7851e1feb0d5d49a46a2a56149fd83 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Fri, 1 Feb 2019 15:15:13 +0100 Subject: edit by fix --- app/class/art2.php | 10 +++++++--- app/class/controllerart.php | 2 +- app/view/templates/home.php | 29 ++++++++++++++--------------- app/view/templates/homeopt.php | 12 ++++++------ composer.json | 2 +- 5 files changed, 29 insertions(+), 26 deletions(-) diff --git a/app/class/art2.php b/app/class/art2.php index 4f04858..01ce218 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -148,7 +148,11 @@ class Art2 public function title($type = 'string') { - return $this->title; + if($type == 'sort') { + return strtolower($this->title); + } else { + return $this->title; + } } public function description($type = 'string') @@ -532,7 +536,7 @@ class Art2 public function setcss($css) { if (strlen($css) < self::LENTEXT and is_string($css)) { - $this->css = strip_tags(trim(strtolower($css))); + $this->css = trim(strtolower($css)); } } @@ -722,7 +726,7 @@ class Art2 public function setauthors($authors) { if(is_array($authors)) { - $this->authors = $authors; + $this->authors = array_values(array_filter($authors)); } } diff --git a/app/class/controllerart.php b/app/class/controllerart.php index dfdde7f..95a9d3e 100644 --- a/app/class/controllerart.php +++ b/app/class/controllerart.php @@ -149,7 +149,7 @@ class Controllerart extends Controller $this->setart($id, 'artedit'); - if ($this->importart() && $this->canedit()) { + if ($this->importart() && $this->canedit() && empty($this->art->editby())) { $tablist = ['main' => $this->art->main(), 'css' => $this->art->css(), 'header' => $this->art->header(), 'nav' => $this->art->nav(), 'aside' => $this->art->aside(), 'footer' => $this->art->footer(), 'body' => $this->art->body(), 'javascript' => $this->art->javascript()]; $faviconlist = $this->mediamanager->listfavicon(); diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 9636d7e..160b383 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -28,10 +28,13 @@

Pages

-
-
+ + + +
+ - [ 'getadress' => true, - 'label' => 'id', - 'show' => true] - ] - - - ?>
@@ -65,11 +60,13 @@ id edit see - del - isadmin()) { ?> - dl + del + issupereditor()) { ?> + dl tag + + title summary @@ -99,10 +96,12 @@ 👁 - isadmin()) { ?> + issupereditor()) { ?> tag('sort') ?> + + title() ?> description('short') ?> diff --git a/app/view/templates/homeopt.php b/app/view/templates/homeopt.php index 36b44c5..8b1b7d7 100644 --- a/app/view/templates/homeopt.php +++ b/app/view/templates/homeopt.php @@ -32,8 +32,8 @@ foreach ($opt->col('array') as $key => $col) {
    -tagcompare() == "OR" ? "checked" : "" ?> > -tagcompare() == "AND" ? "checked" : "" ?>> +tagcompare() == "OR" ? "checked" : "" ?> > +tagcompare() == "AND" ? "checked" : "" ?>> -authorcompare() == "OR" ? "checked" : "" ?> > -authorcompare() == "AND" ? "checked" : "" ?>> +authorcompare() == "OR" ? "checked" : "" ?> > +authorcompare() == "AND" ? "checked" : "" ?>> authorlist() as $authorfilter => $count) { if (in_array($authorfilter, $opt->authorfilter())) { - echo '
  • '; + echo '
  • '; } else { - echo '
  • '; + echo '
  • '; } } if ($in = true || $out = true) { diff --git a/composer.json b/composer.json index d572e49..ab0f8a6 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "w-cms", "description": "point'n think", - "version": "1.1.0", + "version": "1.1.1", "require": { "michelf/php-markdown": "^1.8", "league/plates": "3.*", -- cgit v1.2.3