]> granicus.if.org Git - php/commitdiff
- Make shockwave work with virtual_dir (a bit ugly).
authorAndi Gutmans <andi@php.net>
Sun, 11 Jun 2000 16:34:53 +0000 (16:34 +0000)
committerAndi Gutmans <andi@php.net>
Sun, 11 Jun 2000 16:34:53 +0000 (16:34 +0000)
- swf_openfile doesn't return any values. This seems to mean that you can
- only have one file open at a time.

ext/swf/swf.c

index 5a0c006184d96e94f0c06d7ba1a86d2f3e0d93c2..eaea922cc09d08e8a93091c3675380559f9e3802 100644 (file)
@@ -168,10 +168,19 @@ PHP_FUNCTION(swf_openfile)
        convert_to_double_ex(b);
        
        na = Z_STRVAL_PP(name);
+
+#ifdef VIRTUAL_DIR
+       if (virtual_filepath(na, &na)) {
+               return;
+       }
+#endif
        
        swf_openfile((strcasecmp("php://stdout", na)==0) ? fileno(stdout) : na,
                         (float)Z_DVAL_PP(sizeX), (float)Z_DVAL_PP(sizeY),
                         (float)Z_DVAL_PP(frameRate), (float)Z_DVAL_PP(r), (float)Z_DVAL_PP(g), (float)Z_DVAL_PP(b));
+#ifdef VIRTUAL_DIR
+       free(na);
+#endif
 }
 /* }}} */
 
@@ -1144,4 +1153,4 @@ PHP_FUNCTION(swf_posround)
 }
 /* }}} */
 
-#endif
\ No newline at end of file
+#endif