diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index df79797..0f5c775 100755
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -19,9 +19,10 @@
-
+
+
@@ -32,7 +33,7 @@
-
+
@@ -76,7 +77,8 @@
1601618466935
-
+
+
1601618764031
@@ -155,7 +157,14 @@
1601751040426
-
+
+ 1601751093352
+
+
+
+ 1601751093352
+
+
@@ -171,6 +180,7 @@
+
@@ -182,7 +192,8 @@
-
+
+
@@ -221,10 +232,10 @@
-
+
-
+
diff --git a/config.inc.php b/config.inc.php
index f33ecf7..853fb8d 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -8,4 +8,4 @@ define( 'MYSQL_DB', 'c1online_faq' );
define( 'CODE_LENGTH', 4 );
define( 'SHARE_URL_PREFIX', 'https://faq.hw-table.de/?code=' );
-define( 'WASTED_TIME', '33hrs and 17mins' );
+define( 'WASTED_TIME', '20hrs and 17mins' );
diff --git a/model/FaqModel.class.inc.php b/model/FaqModel.class.inc.php
index 6d3b86d..c2d79c1 100644
--- a/model/FaqModel.class.inc.php
+++ b/model/FaqModel.class.inc.php
@@ -43,9 +43,19 @@ class FaqModel
$return = array();
foreach( $result as $index => $value )
{
- $result[$index]['question'] = substr( $result[$index]['question'], 0, 50 );
+ $end_question = '';
+ $end_answer = '';
+ if( strlen( $result[$index]['question'] ) > 50 )
+ {
+ $end_question = '...';
+ }
+ if( strlen( $result[$index]['answer'] ) > 50 )
+ {
+ $end_answer = '...';
+ }
+ $result[$index]['question'] = substr( $result[$index]['question'], 0, 50 ) . $end_question;
$result[$index]['question'] = str_replace( "\n", ' ', $result[$index]['question'] );
- $result[$index]['answer'] = substr( $result[$index]['answer'], 0, 50 );
+ $result[$index]['answer'] = substr( $result[$index]['answer'], 0, 50 ) . $end_answer;
$result[$index]['answer'] = str_replace( "\n", ' ', $result[$index]['answer'] );
}