aboutsummaryrefslogtreecommitdiff
path: root/class/class.app.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-04-13 22:46:13 +0200
committervincent-peugnet <v.peugnet@free.fr>2018-04-13 22:46:13 +0200
commit899a4bd60570ff9b77fabe89dd4902f09bbdeb47 (patch)
treed1aba3f501dc633a9e154adfb2b122502975a3c1 /class/class.app.php
parent1b6f5e650fa774cda77d511bf4cbdc638a2b42f6 (diff)
downloadwcms-899a4bd60570ff9b77fabe89dd4902f09bbdeb47.tar.gz
wcms-899a4bd60570ff9b77fabe89dd4902f09bbdeb47.zip
V2 feat nico search lien confirm background100%
Diffstat (limited to 'class/class.app.php')
-rw-r--r--class/class.app.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/class/class.app.php b/class/class.app.php
index d9e3fff..5891cae 100644
--- a/class/class.app.php
+++ b/class/class.app.php
@@ -26,7 +26,7 @@ class App
$now = new DateTimeImmutable(null, timezone_open("Europe/Paris"));
- $q = $this->bdd->prepare('INSERT INTO art(id, titre, soustitre, intro, tag, datecreation, datemodif, css, html, secure, couleurtext, couleurbkg, couleurlien, couleurlienblank) VALUES(:id, :titre, :soustitre, :intro, :tag, :datecreation, :datemodif, :css, :html, :secure, :couleurtext, :couleurbkg, :couleurlien, :couleurlienblank)');
+ $q = $this->bdd->prepare('INSERT INTO art(id, titre, soustitre, intro, tag, datecreation, datemodif, css, html, secure, couleurtext, couleurbkg, couleurlien, couleurlienblank, lien) VALUES(:id, :titre, :soustitre, :intro, :tag, :datecreation, :datemodif, :css, :html, :secure, :couleurtext, :couleurbkg, :couleurlien, :couleurlienblank, :lien)');
$q->bindValue(':id', $art->id());
$q->bindValue(':titre', $art->titre());
@@ -42,6 +42,7 @@ class App
$q->bindValue(':couleurbkg', $art->couleurbkg());
$q->bindValue(':couleurlien', $art->couleurlien());
$q->bindValue(':couleurlienblank', $art->couleurlienblank());
+ $q->bindValue(':lien', $art->lien('string'));
$q->execute();
}
@@ -104,8 +105,9 @@ class App
public function update(Art $art)
{
$now = new DateTimeImmutable(null, timezone_open("Europe/Paris"));
+ $art->updatelien();
- $q = $this->bdd->prepare('UPDATE art SET titre = :titre, soustitre = :soustitre, intro = :intro, tag = :tag, datecreation = :datecreation, datemodif = :datemodif, css = :css, html = :html, secure = :secure, couleurtext = :couleurtext, couleurbkg = :couleurbkg, couleurlien = :couleurlien, couleurlienblank = :couleurlienblank WHERE id = :id');
+ $q = $this->bdd->prepare('UPDATE art SET titre = :titre, soustitre = :soustitre, intro = :intro, tag = :tag, datecreation = :datecreation, datemodif = :datemodif, css = :css, html = :html, secure = :secure, couleurtext = :couleurtext, couleurbkg = :couleurbkg, couleurlien = :couleurlien, couleurlienblank = :couleurlienblank, lien=:lien WHERE id = :id');
$q->bindValue(':id', $art->id());
$q->bindValue(':titre', $art->titre());
@@ -121,6 +123,7 @@ class App
$q->bindValue(':couleurbkg', $art->couleurbkg());
$q->bindValue(':couleurlien', $art->couleurlien());
$q->bindValue(':couleurlienblank', $art->couleurlienblank());
+ $q->bindValue(':lien', $art->lien('string'));
$q->execute();
}