Not Reviewed
Show More
Add another comment
| @@ -87,7 +87,7 if( $_POST ) { | |||
|
|
87 | 87 | $imagedata = getimagesize($_FILES['comicFile']['tmp_name']); |
|
|
88 | 88 | $strip->media = $imagedata[2]; |
|
|
89 | 89 | } |
|
|
90 | $fileext = $dbConnection->fetchColumn('SELECT extension FROM media_t WHERE id = ?', array($strip->media), array(PDO::PARAM_INT)); | |
|
|
90 | $fileext = $dbConnection->fetchColumn('SELECT extension FROM media_t WHERE id = ?', array($strip->media), 0, array(PDO::PARAM_INT)); | |
|
|
91 | 91 | |
|
|
92 | 92 | if(strlen($fileext) < 3) |
|
|
93 | 93 | { |
| @@ -2,6 +2,8 | |||
|
|
2 | 2 | |
|
|
3 | 3 | function twitterpost($message, $user=TWITTER_USER, $password=TWITTER_PASS) |
|
|
4 | 4 | { |
|
|
5 | if (!TWITTER_ENABLED) return; | |
|
|
6 | ||
|
|
5 | 7 | global $dbConnection, $info, $error; |
|
|
6 | 8 | if( $user == '' ) { |
|
|
7 | 9 | # preserve existing twitterpost(message) style posting until OAuth has been vetted. |
| @@ -6,12 +6,12 auth_redirect(); // Require logged in user to access this page. | |||
|
|
6 | 6 | |
|
|
7 | 7 | if( isset($_GET['delete']) && (int)$_GET['delete'] ) { |
|
|
8 | 8 | check_nonce('delete-type-' . (int)$_GET['delete']); |
|
|
9 |
if( |
|
|
|
9 | if(false === $dbConnection->executeUpdate('DELETE FROM strip_t WHERE id = ?', array($_GET['delete']))) | |
|
|
10 | 10 | { |
|
|
11 | 11 | adminlog("Error deleting type ".(int)$_GET['delete'], MTS_TYPE, MTA_DELETE, E_WARNING); |
|
|
12 | 12 | mtdie("Error on deletion of existing type: " . $dbConnection->errorCode(), 'SQL Error'); |
|
|
13 | 13 | } |
|
|
14 |
if( |
|
|
|
14 | if(false === $dbConnection->executeUpdate('DELETE FROM meta WHERE type = ?', array($_GET['delete']))) | |
|
|
15 | 15 | { |
|
|
16 | 16 | adminlog("Error on deletion of type ".(int)$_GET['delete']."'s metadata.", MTS_TYPE, MTA_DELETE, E_WARNING); |
|
|
17 | 17 | mtdie("Error on deletion of existing type's metadata: " . $dbConnection->errorCode(), 'SQL Error'); |
| @@ -101,7 +101,7 if( isset($_POST['action']) && $_POST['action'] == 'edit_type' ) { | |||
|
|
101 | 101 | } |
|
|
102 | 102 | |
|
|
103 | 103 | //display all types |
|
|
104 | $types = $dbConnection->fetchAll('SELECT strip_t.id AS id, strip_t.name AS name, strip_t.description AS description, COUNT(strip.id) AS strips FROM strip_t JOIN strip ON strip.type = strip_t.id GROUP BY strip_t.id'); | |
|
|
104 | $types = $dbConnection->fetchAll('SELECT strip_t.id AS id, strip_t.name AS name, strip_t.description AS description, COUNT(strip.id) AS strips FROM strip_t LEFT JOIN strip ON strip.type = strip_t.id GROUP BY strip_t.id'); | |
|
|
105 | 105 | |
|
|
106 | 106 | adminhead('Types'); |
|
|
107 | 107 | adminmenu(); |
Comments 0
You need to be logged in to leave comments.
Login now
