diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/3rdparty/site_config/standard/.about.com.txt | 14 | ||||
-rwxr-xr-x | inc/poche/Database.class.php | 1 | ||||
-rwxr-xr-x | inc/poche/Tools.class.php | 2 |
3 files changed, 16 insertions, 1 deletions
diff --git a/inc/3rdparty/site_config/standard/.about.com.txt b/inc/3rdparty/site_config/standard/.about.com.txt new file mode 100644 index 00000000..e1ebaee3 --- /dev/null +++ b/inc/3rdparty/site_config/standard/.about.com.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | body: //div[@id='articlebody'] | ||
2 | title: //h1 | ||
3 | author: //p[@id='by']//a | ||
4 | |||
5 | next_page_link: //span[@class='next']/a | ||
6 | # Not the same as below! | ||
7 | |||
8 | prune: yes | ||
9 | tidy: no | ||
10 | |||
11 | # Annoying 'next' links plainly inside the article body | ||
12 | strip: //*[text()[contains(.,'Next: ')]] | ||
13 | |||
14 | test_url: http://psychology.about.com/od/theoriesofpersonality/ss/defensemech.htm | ||
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index dddb2512..11cccb72 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -409,6 +409,7 @@ class Database { | |||
409 | public function add($url, $title, $content, $user_id, $isFavorite=0, $isRead=0) { | 409 | public function add($url, $title, $content, $user_id, $isFavorite=0, $isRead=0) { |
410 | $sql_action = 'INSERT INTO entries ( url, title, content, user_id, is_fav, is_read ) VALUES (?, ?, ?, ?, ?, ?)'; | 410 | $sql_action = 'INSERT INTO entries ( url, title, content, user_id, is_fav, is_read ) VALUES (?, ?, ?, ?, ?, ?)'; |
411 | $params_action = array($url, $title, $content, $user_id, $isFavorite, $isRead); | 411 | $params_action = array($url, $title, $content, $user_id, $isFavorite, $isRead); |
412 | |||
412 | if ( !$this->executeQuery($sql_action, $params_action) ) { | 413 | if ( !$this->executeQuery($sql_action, $params_action) ) { |
413 | $id = null; | 414 | $id = null; |
414 | } | 415 | } |
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 1ef875c9..cc01f403 100755 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php | |||
@@ -216,7 +216,7 @@ class Tools | |||
216 | 216 | ||
217 | public static function getDomain($url) | 217 | public static function getDomain($url) |
218 | { | 218 | { |
219 | return parse_url($url, PHP_URL_HOST); | 219 | return parse_url($url, PHP_URL_HOST); |
220 | } | 220 | } |
221 | 221 | ||
222 | public static function getReadingTime($text) { | 222 | public static function getReadingTime($text) { |