• R/O
  • SSH
  • HTTPS

copper: Commit


Commit MetaInfo

Revision802 (tree)
Time2012-04-04 18:22:38
Authormiyabe

Log Message

(empty log message)

Change Summary

Incremental Difference

--- solutions/wp/trunk/pripre/actions/image.php (nonexistent)
+++ solutions/wp/trunk/pripre/actions/image.php (revision 802)
@@ -0,0 +1,11 @@
1+<?php
2+require_once ('../../../../wp-load.php');
3+require_once ('../includes/utils.inc.php');
4+
5+$page = $_GET['page'];
6+
7+$tmp = pripre_get_tmp_dir();
8+
9+header('Content-Type: image/png');
10+readfile("$tmp/$page.png");
11+?>
--- solutions/wp/trunk/pripre/includes/edit.inc.php (revision 801)
+++ solutions/wp/trunk/pripre/includes/edit.inc.php (revision 802)
@@ -35,10 +35,8 @@
3535 echo '<input type="button" value="HTML" onClick="pripre_preview_html();"/>';
3636 echo ' <a href="" target="_blank" id="pripre_site"></a>';
3737
38- $tmp = pripre_get_tmp_url();
3938 echo '<script type="text/javascript">';
4039 echo 'var pripre_base = "'.plugins_url('pripre').'";
41- var pripre_tmp = "'.$tmp.'";
4240 var pripre_auto_preview = "'.get_option("pripre_auto_preview").'";
4341 var pripre_post_id = "'.$post->ID.'";
4442 var pripre_template_params = {';
--- solutions/wp/trunk/pripre/includes/utils.inc.php (revision 801)
+++ solutions/wp/trunk/pripre/includes/utils.inc.php (revision 802)
@@ -36,7 +36,7 @@
3636 function pripre_get_tmp_dir() {
3737 $dir = pripre_get_base_dir();
3838 $id = pripre_get_session_id();
39- $tmp = "$dir/tmp";
39+ $tmp = "$dir/data/tmp";
4040 $dir = "$tmp/$id";
4141 if (!@mkdir($dir, 0777, true)) {
4242 touch($dir);
@@ -55,13 +55,6 @@
5555 return $dir;
5656 }
5757
58-function pripre_get_tmp_url() {
59- $id = pripre_get_session_id();
60- $dir = plugins_url("pripre/tmp/$id");
61- @mkdir($dir);
62- return $dir;
63-}
64-
6558 function pripre_get_templates() {
6659 $dir = pripre_get_base_dir();
6760 $dir = "$dir/templates/book";
--- solutions/wp/trunk/pripre/js/edit.js (revision 801)
+++ solutions/wp/trunk/pripre/js/edit.js (revision 802)
@@ -111,7 +111,7 @@
111111 }
112112
113113 function pripre_image_src() {
114- return pripre_tmp+"/"+pripre_page+".png?"+(new Date().getTime());
114+ return pripre_base+"/actions/image.php?page="+pripre_page+"&"+(new Date().getTime());
115115 }
116116
117117 function pripre_preview_simple(action) {
Show on old repository browser