Commit 2ee8650a6db70f34394ea2578d5157144731db0f
- Diff rendering mode:
- inline
- side by side
entry.class.php
(9 / 2)
|   | |||
| 446 | 446 | ||
| 447 | 447 | class Gitorious extends Entry{ | |
| 448 | 448 | var $img = 'http://gitorious.org/favicon.ico'; | |
| 449 | |||
| 449 | 450 | function getSingleTitle(){ | |
| 450 | return $this->title; | ||
| 451 | // The first paragraph has the same content as the title, but with links | ||
| 452 | if (preg_match('/^<p>(.+)<\/p>/i', htmlspecialchars_decode($this->content), $matches)) { | ||
| 453 | return $matches[1]; | ||
| 454 | } else { | ||
| 455 | return $this->title; | ||
| 456 | } | ||
| 451 | 457 | } | |
| 458 | |||
| 452 | 459 | function getSingleDescription(){ | |
| 453 | return htmlspecialchars_decode($this->content); | ||
| 460 | return preg_replace('/^(<p>.+<\/p>)/i', '', htmlspecialchars_decode($this->content)); | ||
| 454 | 461 | } | |
| 455 | 462 | } | |
| 456 | 463 |

