|
|
|
@ -2572,7 +2572,7 @@ CollectionDB::addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tq
|
|
|
|
|
command += ( image.isEmpty() ? "NULL" : '\'' + escapeString( image.url() ) + '\'' ) + ','; |
|
|
|
|
command += ( description.isEmpty() ? "NULL" : '\'' + escapeString( description ) + '\'' ) + ','; |
|
|
|
|
command += ( copyright.isEmpty() ? "NULL" : '\'' + escapeString( copyright ) + '\'' ) + ','; |
|
|
|
|
command += TQString::number( pcb.tqparentId() ) + ",'"; |
|
|
|
|
command += TQString::number( pcb.parentId() ) + ",'"; |
|
|
|
|
command += escapeString( pcb.saveLocation() ) + "',"; |
|
|
|
|
command += pcb.autoscan() ? boolT() + ',' : boolF() + ','; |
|
|
|
|
command += TQString::number( pcb.fetchType() ) + ','; |
|
|
|
@ -2812,17 +2812,17 @@ CollectionDB::getPodcastChannelBundle( const KURL &url, PodcastChannelBundle *pc
|
|
|
|
|
|
|
|
|
|
// return newly created folder id
|
|
|
|
|
int |
|
|
|
|
CollectionDB::addPodcastFolder( const TQString &name, const int tqparent_id, const bool isOpen ) |
|
|
|
|
CollectionDB::addPodcastFolder( const TQString &name, const int parent_id, const bool isOpen ) |
|
|
|
|
{ |
|
|
|
|
TQString command = TQString( "INSERT INTO podcastfolders ( name, tqparent, isOpen ) VALUES ('" ); |
|
|
|
|
command += escapeString( name ) + "',"; |
|
|
|
|
command += TQString::number( tqparent_id ) + ","; |
|
|
|
|
command += TQString::number( parent_id ) + ","; |
|
|
|
|
command += isOpen ? boolT() + ");" : boolF() + ");"; |
|
|
|
|
|
|
|
|
|
insert( command, NULL ); |
|
|
|
|
|
|
|
|
|
command = TQString( "SELECT id FROM podcastfolders WHERE name = '%1' AND tqparent = '%2';" ) |
|
|
|
|
.tqarg( name, TQString::number(tqparent_id) ); |
|
|
|
|
.tqarg( name, TQString::number(parent_id) ); |
|
|
|
|
TQStringList values = query( command ); |
|
|
|
|
|
|
|
|
|
return values[0].toInt(); |
|
|
|
@ -2841,7 +2841,7 @@ CollectionDB::updatePodcastChannel( const PodcastChannelBundle &b )
|
|
|
|
|
<< escapeString( b.link().url() ) |
|
|
|
|
<< escapeString( b.description() ) |
|
|
|
|
<< escapeString( b.copyright() ) |
|
|
|
|
<< TQString::number( b.tqparentId() ) |
|
|
|
|
<< TQString::number( b.parentId() ) |
|
|
|
|
<< escapeString( b.saveLocation() ) |
|
|
|
|
<< ( b.autoscan() ? boolT() : boolF() ) |
|
|
|
|
<< TQString::number( b.fetchType() ) |
|
|
|
@ -2888,13 +2888,13 @@ CollectionDB::updatePodcastEpisode( const int id, const PodcastEpisodeBundle &b
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void |
|
|
|
|
CollectionDB::updatePodcastFolder( const int folder_id, const TQString &name, const int tqparent_id, const bool isOpen ) |
|
|
|
|
CollectionDB::updatePodcastFolder( const int folder_id, const TQString &name, const int parent_id, const bool isOpen ) |
|
|
|
|
{ |
|
|
|
|
if( getDbConnectionType() == DbConnection::postgresql ) { |
|
|
|
|
query( TQStringx( "UPDATE podcastfolders SET name='%1', tqparent=%2, isOpen=%3 WHERE id=%4;" ) |
|
|
|
|
.args( TQStringList() |
|
|
|
|
<< escapeString(name) |
|
|
|
|
<< TQString::number(tqparent_id) |
|
|
|
|
<< TQString::number(parent_id) |
|
|
|
|
<< ( isOpen ? boolT() : boolF() ) |
|
|
|
|
<< TQString::number(folder_id) |
|
|
|
|
) |
|
|
|
@ -2906,7 +2906,7 @@ CollectionDB::updatePodcastFolder( const int folder_id, const TQString &name, co
|
|
|
|
|
.args( TQStringList() |
|
|
|
|
<< TQString::number(folder_id) |
|
|
|
|
<< escapeString(name) |
|
|
|
|
<< TQString::number(tqparent_id) |
|
|
|
|
<< TQString::number(parent_id) |
|
|
|
|
<< ( isOpen ? boolT() : boolF() ) |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|