Index: trunk/extensions/Storyboard/api/ApiStoryboardStoriesFeed.php |
— | — | @@ -45,7 +45,24 @@ |
46 | 46 | // Get the requests parameters. |
47 | 47 | $params = $this->extractRequestParams(); |
48 | 48 | |
| 49 | + $this->addTables( 'storyboard' ); |
| 50 | + $this->addFields( array( |
| 51 | + 'story_author_name', |
| 52 | + 'story_title', |
| 53 | + 'story_text', |
| 54 | + 'story_created' |
| 55 | + ) ); |
| 56 | + $this->addWhere( array( |
| 57 | + 'story_is_published' => 1 |
| 58 | + ) ); |
| 59 | + $this->addOption( 'LIMIT', $params['limit'] ); |
| 60 | + $this->addOption( 'ORDER BY', 'story_modified' ); |
49 | 61 | |
| 62 | + $stories = $this->select( __METHOD__ ); |
| 63 | + |
| 64 | + while ( $story = $stories->fetchObject() ) { |
| 65 | + // TODO: figure out how to output the data so the storyboard can use it |
| 66 | + } |
50 | 67 | } |
51 | 68 | |
52 | 69 | /** |