Fixed images
authorDan
Sun, 06 Apr 2008 00:35:38 -0400
changeset 8 8baccbad4a55
parent 7 98bbc533541c
child 9 a932ce8c4827
Fixed images
plugins/PunBB.php
--- a/plugins/PunBB.php	Sun Apr 06 00:28:50 2008 -0400
+++ b/plugins/PunBB.php	Sun Apr 06 00:35:38 2008 -0400
@@ -36,7 +36,7 @@
 $plugins->attachHook('session_started', '
     $pid = RenderMan::strToPageId($paths->get_pageid_from_url());
 
-    $is_style_or_script = ( strpos($_SERVER["REQUEST_URI"], "/style/") || strpos($_SERVER["REQUEST_URI"], "/include/js/") );
+    $is_style_or_script = ( ( strpos($_SERVER["REQUEST_URI"], "/style/") || strpos($_SERVER["REQUEST_URI"], "/include/js/") || strpos($_SERVER["REQUEST_URI"], "/img/") ) && !strpos($_SERVER["REQUEST_URI"], "/help/") );
     if ( getConfig("punbb_installed") == "yes" && getConfig("punbb_version") == PUNANO_VERSION && $pid[0] == "Forum" && $pid[1] == "Special" && !$is_style_or_script )
     {
       require( "punbb/include/common.php" );
@@ -65,13 +65,7 @@
   {
     punano_admin_console();
   }
-  else if ( $paths->getParam(0) == 'style' )
-  {
-    $path = $paths->getAllParams();
-    header('Location: ' . scriptPath . '/punbb/' . $path);
-    exit();
-  }
-  else if ( $paths->getParam(0) == 'include' && $paths->getParam(1) == 'js' )
+  else if ( ( $paths->getParam(0) == 'style' ) || ( $paths->getParam(0) == 'include' && $paths->getParam(1) == 'js' ) || ( $paths->getParam(0) == 'img' ) )
   {
     $path = $paths->getAllParams();
     header('Location: ' . scriptPath . '/punbb/' . $path);