readability is important lolz
This commit is contained in:
parent
144d628081
commit
a4cb28686b
@ -90,17 +90,52 @@ This plugin creates a *sha256* table in your Textpattern DB. There, it stores th
|
||||
|
||||
// Hooks/callbacks
|
||||
function bts_podcast_initdb () {
|
||||
safe_query("CREATE TABLE IF NOT EXISTS bts_podcast (id int(11) NOT NULL AUTO_INCREMENT,url_title varchar(64) NOT NULL,filename varchar(64) NOT NULL,type char(3) NOT NULL,checksum char(64) NOT NULL,bytesize varchar(16) NOT NULL,created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,changed timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,PRIMARY KEY (id),UNIQUE KEY unique_index (url_title,type)) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8");
|
||||
safe_query(
|
||||
"CREATE TABLE IF NOT EXISTS bts_podcast (
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
url_title varchar(64) NOT NULL,
|
||||
filename varchar(64) NOT NULL,
|
||||
type char(3) NOT NULL,
|
||||
checksum char(64) NOT NULL,
|
||||
bytesize varchar(16) NOT NULL,
|
||||
created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
changed timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id),UNIQUE KEY unique_index (url_title,type)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
AUTO_INCREMENT=3
|
||||
DEFAULT CHARSET=utf8"
|
||||
);
|
||||
}
|
||||
|
||||
function bts_podccast_filesize($atts) {
|
||||
bytecount = filesize(bts_podcast_path($atts) . bts_podcast_filename($atts);
|
||||
$bytecount = filesize(bts_podcast_path($atts) . bts_podcast_filename($atts));
|
||||
return $bytecount;
|
||||
}
|
||||
|
||||
function bts_podcast_gen_metainfo ($input) {
|
||||
$hash = hash_file('sha256',file_article_upload());
|
||||
// safe_query("INSERT INTO bts_podcast (url_title,filename,type,checksum,bytesize) VALUES ('" . $input['urltitle'] . "','" . $input['mediafile'] . "','" . $input['mediatype'] . "','" . $input['mediachksum'] . "','" . $input['mediabytes'] . "') ON DUPLICATE KEY UPDATE url_title = '" . $input['urltitle'] . "', filename = '" . $input['mediafile'] . "', type = '" . $input['mediatype'] . "', checksum = '" . $input['mediachksum'] . "', bytesize = '" . $input['mediabytes'] . "'");
|
||||
/*
|
||||
safe_query(
|
||||
"INSERT INTO bts_podcast (
|
||||
url_title,
|
||||
filename,
|
||||
type,
|
||||
checksum,
|
||||
bytesize
|
||||
) VALUES (
|
||||
'" . $input['urltitle'] . "',
|
||||
'" . $input['mediafile'] . "',
|
||||
'" . $input['mediatype'] . "',
|
||||
'" . $input['mediachksum'] . "',
|
||||
'" . $input['mediabytes'] . "')
|
||||
ON DUPLICATE KEY UPDATE
|
||||
url_title = '" . $input['urltitle'] . "',
|
||||
filename = '" . $input['mediafile'] . "',
|
||||
type = '" . $input['mediatype'] . "',
|
||||
checksum = '" . $input['mediachksum'] . "',
|
||||
bytesize = '" . $input['mediabytes'] . "'");
|
||||
*/
|
||||
}
|
||||
|
||||
//use pluggable_ui(event,step,default content, record set)
|
||||
|
Reference in New Issue
Block a user