Skip to content

Commit 2bdcb8b

Browse files
committed
- files: removed unused code related to "picnik" upload
1 parent 2bc707c commit 2bdcb8b

File tree

2 files changed

+1
-68
lines changed

2 files changed

+1
-68
lines changed

Diff for: lib/packages/files/files.php

-44
Original file line numberDiff line numberDiff line change
@@ -333,50 +333,6 @@ function run()
333333

334334
core_terminate();
335335
break;
336-
/*
337-
case 91: // picnik editing
338-
ob_clean();
339-
340-
// $strPicnikUrl is the URL that we use to launch Picnik.
341-
$strPicnikUrl = "http://www.picnik.com/service";
342-
// $aPicnikParams collects together all the params we'll give Picnik. Start with an API key
343-
$aPicnikParams['_apikey'] = $website->picnik_api_key;
344-
// tell Picnik where to send the exported image
345-
$aPicnikParams['_export'] = NAVIGATE_URL.'/navigate_upload.php?wid='.$website->id.'&engine=picnik&id='.$_REQUEST['id'].'&engine=picnik&session_id='.session_id();
346-
// give the export button a title
347-
$aPicnikParams['_export_title'] = t(34, 'Save');
348-
// turn on the close button, and tell it to come back here
349-
//$aPicnikParams['_close_target'] = $strRoot;
350-
// send in the previous "king" image in case the user feels like decorating it
351-
$aPicnikParams['_import'] = NAVIGATE_DOWNLOAD.'?wid='.$website->id.'&id='.$_REQUEST['id'].'&disposition=attachment&sid='.session_id();
352-
// tell Picnik to redirect the user to the following URL after the HTTP POST instead of just redirecting to _export
353-
$aPicnikParams['_redirect'] = NAVIGATE_DOWNLOAD.'?wid='.$website->id.'&id='.$_REQUEST['id'].'&disposition=inline&ts='.core_time(); //'javascript: return false;';
354-
355-
// tell Picnik our name. It'll use it in a few places as appropriate
356-
$aPicnikParams['_host_name'] = 'Navigate';
357-
// turn off the "Save & Share" tab so users don't get confused
358-
$aPicnikParams['_exclude'] = "out";
359-
360-
echo '<html><head></head><body>';
361-
362-
echo '<form id="picnik_form" method="POST" action="'.$strPicnikUrl.'" style=" visibility: hidden; ">';
363-
364-
// put all the API parameters into the form as hidden inputs
365-
foreach( $aPicnikParams as $key => $value ) {
366-
echo "<input type='hidden' name='$key' value='$value'/>\n";
367-
}
368-
369-
//echo "<input type='text' name='address' value='Your Majesty'/>\n";
370-
echo "<input type='submit' value='Picnik'/>\n";
371-
echo "</form>";
372-
echo '<script language="javascript" type="text/javascript">
373-
document.forms[0].submit();
374-
</script>';
375-
echo '</body></html>';
376-
377-
core_terminate();
378-
break;
379-
*/
380336

381337
case 0: // list / search result
382338
default:

Diff for: navigate_upload.php

+1-24
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@ function navigate_upload_remove_temporary($targetDir, $maxFileAge=86400)
8383
$targetDir = NAVIGATE_PRIVATE.'/'.$website->id.'/files';
8484
$maxFileAge = 24 * 60 * 60; // Temp file age in seconds (1 day)
8585

86-
// no maximum uploading / execution time
86+
// no maximum uploading/execution time
8787
@set_time_limit(0);
8888

89-
//file_put_contents(NAVIGATE_PRIVATE.'/'.$website->id.'/files/out.txt', print_r($_FILES, true));
90-
9189
// filedrop drag'n'drop engine
9290
if($_REQUEST['engine']=='dropzone')
9391
{
@@ -136,27 +134,6 @@ function navigate_upload_remove_temporary($targetDir, $maxFileAge=86400)
136134
}
137135
}
138136
}
139-
else if($_REQUEST['engine']=='picnik')
140-
{
141-
// PHP script to receive image data from Picnik via HTTP POST
142-
// retrieve the image's attributes from the $_FILES array
143-
$image_tmp_filename = $_FILES['file']['tmp_name'];
144-
$image_filename = $_FILES['file']['name'];
145-
146-
// Save the image to disk. It'll go into the same directory as
147-
// this script. You'd probably want to put it somewhere else in the
148-
// file system like a "/images" directory, or maybe even into a database.
149-
// Make sure your web server has write access to the destination dir,
150-
// or the call to file_put_contents isn't going to work.
151-
$image_data = file_get_contents( $image_tmp_filename );
152-
153-
if(!empty($_REQUEST['id']) && file_exists($targetDir.'/'.$_REQUEST['id']))
154-
{
155-
file_put_contents( $targetDir.'/'.$_REQUEST['id'], $image_data );
156-
}
157-
158-
core_terminate();
159-
}
160137
else if($_REQUEST['engine']=='pixlr')
161138
{
162139
if(!empty($_REQUEST['id']) && file_exists($targetDir.'/'.$_REQUEST['id']))

0 commit comments

Comments
 (0)