Skip to content

Instantly share code, notes, and snippets.

@BugBuster1701
Created August 8, 2012 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BugBuster1701/3295805 to your computer and use it in GitHub Desktop.
Save BugBuster1701/3295805 to your computer and use it in GitHub Desktop.
Contao2Go für Contao 3 Gäste
/*
Das Problem ist ja nur die constants.php die nicht gefunden wird und er dadurch ein Fehler anzeigt.
Ich habe daher auf meinem Server nur ein Link im Systemverzeichnis angelegt.
ln -s config/constants.php constants.php
Man müsste nun in /system/modules/c2gadmin/c2g_functions.php es irgendwie hinbekommen, das er an zwei stellen sucht und mit file_exists prüfen ob vorhanden.
Mal so, geht bestimmt noch schöner, in der loadVHostConfig:
*/
if ($bIncludeConstants)
{
if (file_exists($path.'/system/constants.php'))
{
$arrImportFiles['/system/constants.php'] = '/DEFINE\(\'(.*?)\',\s*\'(.*)\'\);/i';
}
else
{
$arrImportFiles['/system/config/constants.php'] = '/DEFINE\(\'(.*?)\',\s*\'(.*)\'\);/i';
}
}
/*
Ich hatte mal beide Definitionen hintereinander definiert und innerhalb der foreach die Test Abfrage gemacht, das ging nicht.
Da hat er entweder die 2.x oder die 3.x Versionen angezeigt, aber nie beide Arten.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment