diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-01-07 08:21:00 -0800 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-01-07 10:22:21 -0800 |
commit | 83e460cdc3fc09867a3adb48c3d0894579dd3050 (patch) | |
tree | 0771bd935b30971bf2c244b6f158ed7496b644e5 /src/controllers/NewMessage.class.php | |
parent | 3d64793a1ee45857856be1cd71c3a0a040a3e869 (diff) |
Refactor to separate the framework from the app; drop message stuff, this app is just user management. Add a json view for individual users
Diffstat (limited to 'src/controllers/NewMessage.class.php')
-rw-r--r-- | src/controllers/NewMessage.class.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/controllers/NewMessage.class.php b/src/controllers/NewMessage.class.php deleted file mode 100644 index e778385..0000000 --- a/src/controllers/NewMessage.class.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - /* -class NewMessage extends Controller { -$cmdline = isset($argv[0]); // called from the command line -@$method = $_SERVER['REQUEST_METHOD']; // What HTTP method was used -if ( ($method=='PUT') || ($method=='POST') || $cmdline ) { - // We're going to be uploading a new message. - - // so uniqid isn't 'secure', it doesn't need to be, it's to prevent - // random collisions. - $tmpfile = "$BASE/tmp/".uniqid(getmypid().'.'); - $infile = ($cmdline?'php://stdin':'php://input'); - $out = fopen($tmpfile, "w"); - $in = fopen($infile, "r"); - while ($data = fread($in, 1024)) - fwrite($out, $data); - fclose($out); - fclose($in); - //apache_request_headers() - require_once('MimeMailParser.class.php'); - $parser = new MimeMailParser(); - $parser->setPath($tmpfile); - $id = preg_replace('/<(.*)>/', '$1', - $parser->getHeader('message-id')); - $id = str_replace('/', '', $id); // for security reasons - $msg_file = "$BASE/msg/$id"; - rename($tmpfile, $msg_file); - - if (!$cmdline) { - $m->status('201 Created'); - header("Location: ".$m->baseUrl().'messages/'.$id); - } - exit(); -} - -} - */
\ No newline at end of file |