public
Fork of economysizegeek/postie
Description: A plugin for WordPress that makes mobloging and blogging by email much much better
Homepage: http://postie.economysizegeek.com/
Clone URL: git://github.com/tedkulp/postie.git
Search Repo:
Applied patch from 
http://oyster.x10hosting.com/wp/the-postie-plugin-patch-for-wordpress-25/


Changes:
1. Category specification in Subject - the database tables in v2.5 have 
changed
drastically. I’ve updated Postie’s handling of categories to reflect 
those
changes.  Note: This will only work for Wordpress v2.5.
2. exec(’chmod 0755′ . $file) - my hosting provider has disabled the 
exec function
(for security reasons), so I’ve changed all calls to exec-chmod to 
php’s
built-in chmod.
3. missing ‘)’ in line 70 of postieIMAP.php file
tedkulp (author)
Thu May 08 04:55:26 -0700 2008
commit  515672fe3ddf2335259fb4a4dd064893cf6a6872
tree    4e4a3b59ee5cf0dea859d72b90f2f5051afb6f21
parent  93cc7facaf1abb4f367d2bb6ccbbf151181fc65d
...
380
381
382
383
 
384
385
386
...
426
427
428
429
 
430
431
432
...
469
470
471
472
 
473
474
475
...
933
934
935
936
 
937
938
939
...
945
946
947
948
 
949
950
951
...
978
979
980
981
 
982
983
984
...
1102
1103
1104
1105
 
1106
1107
1108
...
1138
1139
1140
1141
 
1142
1143
1144
1145
...
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
 
 
 
1537
1538
 
1539
1540
1541
...
380
381
382
 
383
384
385
386
...
426
427
428
 
429
430
431
432
...
469
470
471
 
472
473
474
475
...
933
934
935
 
936
937
938
939
...
945
946
947
 
948
949
950
951
...
978
979
980
 
981
982
983
984
...
1102
1103
1104
 
1105
1106
1107
1108
...
1138
1139
1140
 
1141
1142
1143
1144
1145
...
1523
1524
1525
 
 
 
 
 
 
 
 
 
 
 
1526
1527
1528
1529
 
1530
1531
1532
1533
0
@@ -380,7 +380,7 @@
0
                 $fp = fopen($file, 'w');
0
                 fwrite($fp, $part->body);
0
                 fclose($fp);
0
- @exec ('chmod 755 ' . $file);
0
+ chmod($file, 0755);
0
                 if ($config["USE_IMAGEMAGICK"] && $config["AUTO_SMART_SHARP"]) {
0
                             ImageMagickSharpen($file);
0
                 }
0
@@ -426,7 +426,7 @@
0
                     $fp = fopen($file, 'w');
0
                     fwrite($fp, $part->body );
0
                     fclose($fp);
0
- @exec ('chmod 755 ' . $file);
0
+ chmod($file, 0755);
0
                     $cid = trim($part->headers["content-id"],"<>");; //cids are in <cid>
0
 
0
                      if ($part->ctype_secondary == "3gpp"
0
@@ -469,7 +469,7 @@
0
                                             escapeshellarg($file) .
0
                                             " -y -ss 00:00:01 -vframes 1 -an -sameq -f gif " .
0
                                             escapeshellarg($scaledFile) );
0
- @exec ('chmod 755 ' . escapeshellarg($scaledFile));
0
+ chmod(escapeshellarg($scaledFile), 0755);
0
 
0
                                 $attachments["html"][] .= '<!--Mime Type of File is '.$part->ctype_primary."/".$part->ctype_secondary.' --><div class="' . $config["3GPDIV"].'"><a href="' . $config["URLPHOTOSDIR"] . $fileName. '"><img src="' . $config["URLPHOTOSDIR"] . $scaledFileName . '" alt="' . $part->ctype_parameters['name'] . '" style="'.$config["IMAGESTYLE"].'" class="'.$config["IMAGECLASS"].'" /></a></div>' . "\n";
0
                              }
0
@@ -933,7 +933,7 @@
0
              escapeshellarg($source) . " ".
0
                 '\( +clone -modulate 100,0 \) \( +clone -unsharp 0x1+200+0 \) \( -clone 0 -edge 3 -colorspace GRAY -colors 256 -level 20%,95% -gaussian 10 -level 10%,95% \) -colorspace RGB -fx "u[0]+(((u[2]+1)/(u[1]+1))-1)*u[0]*u[3]" ' .
0
                 escapeshellarg($dest) );
0
- @exec ('chmod 755 ' . escapeshellarg($dest));
0
+ chmod(escapeshellarg($dest), 0755);
0
 
0
 }
0
 function RotateImageWithImageMagick($file,$type,$rotation) {
0
@@ -945,7 +945,7 @@
0
                 escapeshellarg($file) .
0
                 " " .
0
                 escapeshellarg($file) );
0
- @exec ('chmod 755 ' . escapeshellarg($file));
0
+ chmod(escapeshellarg($file), 0755);
0
 }
0
 function RotateImageWithGD($file,$type,$rotation) {
0
     $config = GetConfig();
0
@@ -978,7 +978,7 @@
0
             }
0
             eval ('image'.$typePrefix.'($rotatedImage,$file);');
0
             imagedestroy($sourceImage);
0
- @exec ('chmod 755 ' . escapeshellarg($file));
0
+ chmod(escapeshellarg($file), 0755);
0
         }
0
 }
0
 /**
0
@@ -1102,7 +1102,7 @@
0
                         " " .
0
                         escapeshellarg($scaledFile) );
0
 
0
- @exec ('chmod 755 ' . escapeshellarg($scaledFile));
0
+ chmod(escapeshellarg($scaledFile), 0755);
0
     }
0
     return(array($scaledFileName,$fileName));
0
 
0
@@ -1138,7 +1138,7 @@
0
                             $scaledW,$scaledH,
0
                             $sizeInfo[0],$sizeInfo[1]);
0
       imagejpeg($scaledImage,$scaledFile,$config["JPEGQUALITY"]);
0
- @exec ('chmod 755 ' . escapeshellarg($scaledFile));
0
+ chmod(escapeshellarg($scaledFile), 0755);
0
             imagedestroy($scaledImage);
0
             imagedestroy($sourceImage);
0
         }
0
0
@@ -1523,19 +1523,11 @@
0
             print("Working on $match\n");
0
             //Work on the category search to see if we can determine the cat_id  
0
             //check the database to see if their is a category similar
0
- $sql_name = 'SELECT cat_ID
0
- FROM ' . $wpdb->categories. '
0
- WHERE cat_name=\'' . addslashes($match) . '\'';
0
- $sql_id = 'SELECT cat_ID
0
- FROM ' . $wpdb->categories. '
0
- WHERE cat_ID=\'' . addslashes($match) . '\'';
0
- $sql_sub_name = 'SELECT cat_ID
0
- FROM ' . $wpdb->categories. '
0
- WHERE cat_name LIKE \'' . addslashes($match) . '%\' limit 1';
0
-
0
-
0
+ $sql_name = 'SELECT wpt.term_id FROM wp_terms wpt INNER JOIN wp_term_taxonomy wptt ON wpt.term_id = wptt.term_id WHERE wptt.taxonomy = \'category\' AND wpt.name = \'' . addslashes($match) . '\'';
0
+ $sql_id = 'SELECT wpt.term_id FROM wp_terms wpt INNER JOIN wp_term_taxonomy wptt ON wpt.term_id = wptt.term_id WHERE wptt.taxonomy = \'category\' AND wpt.term_id = \'' . addslashes($match) . '\'';
0
+ $sql_sub_name = 'SELECT wpt.term_id FROM wp_terms wpt INNER JOIN wp_term_taxonomy wptt ON wpt.term_id = wptt.term_id WHERE wptt.taxonomy = \'category\' AND wpt.name LIKE \'' . addslashes($match) . '%\'';
0
             if ( $category = $wpdb->get_var($sql_name) ) {
0
- //then category is a named and found
0
+ //then category is a name and found
0
             } elseif ( $category = $wpdb->get_var($sql_id) ) {
0
                 //then cateogry was an ID and found
0
             } elseif ( $category = $wpdb->get_var($sql_sub_name) ) {
...
67
68
69
70
 
71
72
73
...
67
68
69
 
70
71
72
73
0
@@ -67,7 +67,7 @@
0
         if ($this->_self_cert) {
0
             $option .= "/novalidate-cert";
0
         }
0
- if (eregi("google",$server)) {
0
+ if (eregi("google",$server)) {
0
             //Fix from Jim Hodgson http://www.jimhodgson.com/2006/07/19/postie/
0
             $server_string = "{".$server.":".$port.$option."}INBOX";
0
         }

Comments

    No one has commented yet.