diff --git a/admin/ajax.php b/admin/ajax.php
index ba49ca1..61fff4e 100644
--- a/admin/ajax.php
+++ b/admin/ajax.php
@@ -1,5 +1,5 @@
-error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT );
+error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
function __autoload_my_classes( $classname )
{
$q = explode( '\\' , $classname );
diff --git a/admin/templates/articles/article-edit.php b/admin/templates/articles/article-edit.php
index 6666668..5078384 100644
--- a/admin/templates/articles/article-edit.php
+++ b/admin/templates/articles/article-edit.php
@@ -119,12 +119,19 @@ ob_start();
- if ( is_array( $this -> authors ) ): foreach ( $this -> authors as $author ): $authors[ $author['id'] ] = $author['author']; endforeach; endif;?>
+
+ $authors[0] = '--- wybierz autora ---';
+ if ( is_array( $this -> authors ) ):
+ foreach ( $this -> authors as $author ):
+ $authors[ $author['id'] ] = $author['author'];
+ endforeach;
+ endif;
+ ?>
= \Html::select( [
'label' => 'Autor',
'name' => "id_author",
'id' => 'id_author',
- 'values' => array_merge( [ '0' => '--- wybierz autora ---' ], $authors ),
+ 'values' => $authors,
'value' => $this -> article['id_author']
] );?>
= \Html::input_switch(
@@ -148,6 +155,11 @@ ob_start();
'checked' => $this -> article['show_title'] == 1 ? true : false
)
);?>
+ = \Html::input_switch( [
+ 'label' => 'Pokaż spis treści',
+ 'name' => 'show_table_of_contents',
+ 'checked' => $this -> article['show_table_of_contents'] == 1 ? true : false
+ ] );?>
= \Html::input_switch(
array(
'label' => 'Pokaż datę dodania',
@@ -169,6 +181,15 @@ ob_start();
'checked' => $this -> article['show_date_modify'] == 1 ? true : false
)
);?>
+ = \Html::input(
+ array(
+ 'label' => 'Data modyfikacji',
+ 'class' => 'date-time',
+ 'name' => 'date_modify',
+ 'id' => 'date_modify',
+ 'value' => $this -> article['date_modify'] ? $this -> article['date_modify'] : date( 'Y-m-d H:i:s' )
+ )
+ );?>
= \Html::input_switch(
array(
'label' => 'Powtórz wprowadzenie',
diff --git a/autoload/admin/controls/class.Articles.php b/autoload/admin/controls/class.Articles.php
index 96c2581..b6f9e7d 100644
--- a/autoload/admin/controls/class.Articles.php
+++ b/autoload/admin/controls/class.Articles.php
@@ -99,7 +99,7 @@ class Articles
if ( $id = \admin\factory\Articles::article_save(
$values['id'], $values['title'], $values['main_image'], $values['entry'], $values['text'], $values['table_of_contents'], $values['status'], $values['show_title'], $values['show_table_of_contents'], $values['show_date_add'], $values['date_add'],
- $values['show_date_modify'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['layout_id'],
+ $values['show_date_modify'], $values['date_modify'], $values['seo_link'], $values['meta_title'], $values['meta_description'], $values['meta_keywords'], $values['layout_id'],
$values['pages'], $values['noindex'], $values['repeat_entry'], $values['copy_from'], $values['social_icons'], $values['event_date'], $values['hidden-tags'], $values['block_direct_access'],
$values['priority'], $values['password'], $values['pixieset'], $values['id_author'], $params
) )
diff --git a/autoload/admin/factory/class.Articles.php b/autoload/admin/factory/class.Articles.php
index a10b710..9a5a585 100644
--- a/autoload/admin/factory/class.Articles.php
+++ b/autoload/admin/factory/class.Articles.php
@@ -238,7 +238,7 @@ class Articles
}
public static function article_save(
- $article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_table_of_contents, $show_date_add, $date_add, $show_date_modify, $seo_link, $meta_title, $meta_description,
+ $article_id, $title, $main_image, $entry, $text, $table_of_contents, $status, $show_title, $show_table_of_contents, $show_date_add, $date_add, $show_date_modify, $date_modify, $seo_link, $meta_title, $meta_description,
$meta_keywords, $layout_id, $pages, $noindex, $repeat_entry, $copy_from, $social_icons, $event_date, $tags, $block_direct_access, $priority,
$password, $pixieset, $id_author, $params )
{
@@ -254,8 +254,8 @@ class Articles
'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0,
'show_date_add' => $show_date_add == 'on' ? 1 : 0,
'show_date_modify' => $show_date_modify == 'on' ? 1 : 0,
- 'date_add' => $date_add ? $date_add : date( 'Y-m-d H:i:s' ),
- 'date_modify' => $date_add ? $date_add : date( 'Y-m-d H:i:s' ),
+ 'date_add' => date( 'Y-m-d H:i:s' ),
+ 'date_modify' => date( 'Y-m-d H:i:s' ),
'modify_by' => $user['id'],
'layout_id' => $layout_id ? (int)$layout_id : null,
'status' => $status == 'on' ? 1 : 0,
@@ -438,8 +438,9 @@ class Articles
'show_title' => $show_title == 'on' ? 1 : 0,
'show_table_of_contents' => $show_table_of_contents == 'on' ? 1 : 0,
'show_date_add' => $show_date_add == 'on' ? 1 : 0,
+ 'date_add' => $date_add,
'show_date_modify' => $show_date_modify == 'on' ? 1 : 0,
- 'date_modify' => date( 'Y-m-d H:i:s' ),
+ 'date_modify' => $date_modify ? $date_modify : date( 'Y-m-d H:i:s' ),
'modify_by' => $user['id'],
'layout_id' => $layout_id ? (int)$layout_id : null,
'status' => $status == 'on' ? 1 : 0,