Commit 4c7cd9bdca7229e142eff4bb48e03c9ecf3e53d7
- Diff rendering mode:
- inline
- side by side
entry.class.php
(7 / 5)
|   | |||
| 116 | 116 | #TODO: un-hardcode | |
| 117 | 117 | $usernames['twitter'] = 'balleyne: '; | |
| 118 | 118 | $usernames['facebook'] = 'Blaise '; | |
| 119 | $ustring = ''; | ||
| 119 | 120 | foreach($usernames as $username) | |
| 120 | 121 | $ustring .= "^$username|"; | |
| 121 | 122 | return preg_replace('/('.$ustring.'\.$)/i','',$this->title); | |
| 122 | 123 | } | |
| 123 | 124 | ||
| 124 | 125 | function merge($other){ | |
| 125 | if(!$this->icons){ | ||
| 126 | if(!isset($this->icons)){ | ||
| 126 | 127 | $this->icons = array(); | |
| 127 | 128 | $this->icons[$this->link] = $this->getIcon(); | |
| 128 | 129 | $this->icons[$other->link] = $other->getIcon(); | |
| … | … | ||
| 134 | 134 | ||
| 135 | 135 | #TODO: find a better place for these links | |
| 136 | 136 | function getIcon(){ | |
| 137 | if(!$this->icons) | ||
| 137 | if(empty($this->icons)) | ||
| 138 | 138 | $this->icons[$this->link] = parent::getIcon(); | |
| 139 | 139 | ||
| 140 | 140 | $result = ""; | |
| … | … | ||
| 147 | 147 | class SharedItems extends Entry{ | |
| 148 | 148 | var $action = 'shared'; | |
| 149 | 149 | var $items = 'items'; | |
| 150 | var $canHaveMultiples = True; | ||
| 150 | var $canHaveMultiples = TRUE; | ||
| 151 | var $multiple_sources = FALSE; //default | ||
| 151 | 152 | ||
| 152 | 153 | function getSingleTitle(){ | |
| 153 | 154 | #TODO: hardcoded. Can I use author? Is it not consistent enough? | |
| … | … | ||
| 272 | 272 | // Otherwise, this is a duplicate from multiple sources | |
| 273 | 273 | else{ | |
| 274 | 274 | $this->multiple_sources = TRUE; | |
| 275 | if(!$this->icons){ | ||
| 275 | if(!isset($this->icons)) { | ||
| 276 | 276 | $this->icons = array(); | |
| 277 | 277 | $this->icons[$this->link] = $this->getIcon(); | |
| 278 | 278 | $this->icons[$other->link] = $other->getIcon(); | |
| … | … | ||
| 283 | 283 | } | |
| 284 | 284 | ||
| 285 | 285 | function getIcon($hyperlink=FALSE){ | |
| 286 | if(!$this->icons) | ||
| 286 | if(empty($this->icons)) | ||
| 287 | 287 | $this->icons[$this->link] = parent::getIcon(); | |
| 288 | 288 | ||
| 289 | 289 | $result = ""; |
main.php
(1 / 0)
|   | |||
| 89 | 89 | $dbh = db_connect(); | |
| 90 | 90 | ||
| 91 | 91 | // Build query filters | |
| 92 | $filter_query = ""; | ||
| 92 | 93 | if ($filters) { | |
| 93 | 94 | $fields = array('tag' => 't.name', 'feed' => 'f.id'); | |
| 94 | 95 |

