Legacy Cooperation with Vaultwiki

Status
Not open for further replies.

Replicators

Customer
I just ran into a problem with dbseo and vaultwiki, and for both these to work together correctly, changes need done to this in order to achieve compatibility. Fortunatly the developer of vaultwiki know's what he is doing and was able to fix the conflict and provided instructions for the team at dragonbyte to apply to dbseo which can evade this problem.

I will copy and paste his instructions, and link to the support post.

pegasus said:
Fixed. Unlike vBSEO, dbSEO sends the request back to the calling script if it doesn't know how to handle it. Since VaultWiki hands the request to dbSEO, when it can't handle it, we can find ourselves in an infinite loop.

wiki_index.php has been modified for the next release. If this particular loop is stepped into, VaultWiki will simply output the wiki index page.

Ideally, though, dbSEO should also be updated so that it doesn't hand a request back to a file that's above it in the get_included_files stack. A proper fix by the dbSEO devs would be similar to the following. In dbseo.php,

find:
Code:
		if (substr($fileType[1], 0, 2) == 'ph' OR $fileType[1] == 'php')
		{
			// This was a PHP file
			require(getcwd() . '/' . $_fileName);
		}
		else
		{
			// Any other kind of file
			echo file_get_contents(getcwd() . '/' . $_fileName);
		}

Replace with:
Code:
		$inc = get_included_files();
		$_filePath = realpath(getcwd() . '/' . $_fileName);

		if (!in_array($_filePath, $inc) AND file_exists($_filePath))
		{
			if (substr($fileType[1], 0, 2) == 'ph' OR $fileType[1] == 'php')
			{
				// This was a PHP file
				require(getcwd() . '/' . $_fileName);
			}
			else
			{
				// Any other kind of file
				echo file_get_contents(getcwd() . '/' . $_fileName);
			}
		}
		else
		{
			DBSEO::handle404('', true);
		}

Please visit https://www.vaultwiki.org/issues/3598 for the conflict found and fixed.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
I've made the change to the release files :)

Thanks to you and the VW devs for assisting with this :D
 
Status
Not open for further replies.
Back
Top