Skip to content

Commit

Permalink
MDL-25612 sql - make rss_client block cross-db
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Feb 12, 2011
1 parent d911c72 commit 3612c3b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions blocks/rss_client/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ protected function specific_definition($mform) {
}

$rssfeeds = $DB->get_records_sql_menu('
SELECT id, CASE WHEN preferredtitle = ? THEN title ELSE preferredtitle END AS acutaltitle
SELECT id,
CASE WHEN preferredtitle = ? THEN ' . $DB->sql_compare_text('title', 64) .' ELSE preferredtitle END
FROM {block_rss_client}
WHERE userid = ? OR shared = 1
ORDER BY acutaltitle',
array($DB->sql_empty(), $USER->id));
ORDER BY CASE WHEN preferredtitle = ? THEN ' . $DB->sql_compare_text('title', 64) . ' ELSE preferredtitle END ',
array($DB->sql_empty(), $USER->id, $DB->sql_empty()));
if ($rssfeeds) {
$select = $mform->addElement('select', 'config_rssid', get_string('choosefeedlabel', 'block_rss_client'), $rssfeeds);
$select->setMultiple(true);
Expand Down

0 comments on commit 3612c3b

Please sign in to comment.