<commit_before><?php
/**
 * conjoon
 * (c) 2002-2009 siteartwork.de/conjoon.org
 * <EMAIL>
 *
 * $Author$
 * $Id$
 * $Date$
 * $Revision$
 * $LastChangedDate$
 * $LastChangedBy$
 * $URL$
 */

/**
 * Tests the path where the application folder was moved to.
 *
 * @author <NAME> <<EMAIL>>
 */

$DOCPATH = array();

$_SESSION['doc_path_failed'] = false;

if (!isset($_SESSION['doc_path']) && !isset($_SESSION['installation_info']['doc_path'])) {
    $docPath = "";
    $pos = strrpos($_SERVER['REQUEST_URI'], '/install/?action=doc_path_check');
    if ($pos === false) {
        $pos = strrpos($_SERVER['REQUEST_URI'], '/install/?action=doc_path');
    }
    if ($pos !== false) {
        $docPath = substr($_SERVER['REQUEST_URI'], 0, $pos);
    }
    $_SESSION['doc_path'] = $docPath == "" ? "/" : $docPath;
} else if (!isset($_SESSION['doc_path']) && isset($_SESSION['installation_info']['doc_path'])) {
    $_SESSION['doc_path'] = $_SESSION['installation_info']['doc_path'];
}

if (isset($_POST['doc_path_post'])) {

    $docPath = trim((string)$_POST['doc_path']);

    $docPath = $docPath == "" ? "/" : $docPath;

    $_SESSION['doc_path'] = $docPath;

    header("Location: ./?action=doc_path_success");
    die();


}

include_once './view/doc_path.tpl';<commit_msg> - fixed: slash will now be prepended  to the base_url to prevent errors (closes CN-295)<commit_after><?php
/**
 * conjoon
 * (c) 2002-2009 siteartwork.de/conjoon.org
 * <EMAIL>joon.org
 *
 * $Author$
 * $Id$
 * $Date$
 * $Revision$
 * $LastChangedDate$
 * $LastChangedBy$
 * $URL$
 */

/**
 * Tests the path where the application folder was moved to.
 *
 * @author <NAME> <<EMAIL>>
 */

$DOCPATH = array();

$_SESSION['doc_path_failed'] = false;

if (!isset($_SESSION['doc_path']) && !isset($_SESSION['installation_info']['doc_path'])) {
    $docPath = "";
    $pos = strrpos($_SERVER['REQUEST_URI'], '/install/?action=doc_path_check');
    if ($pos === false) {
        $pos = strrpos($_SERVER['REQUEST_URI'], '/install/?action=doc_path');
    }
    if ($pos !== false) {
        $docPath = substr($_SERVER['REQUEST_URI'], 0, $pos);
    }
    $_SESSION['doc_path'] = $docPath == "" ? "/" : $docPath;
} else if (!isset($_SESSION['doc_path']) && isset($_SESSION['installation_info']['doc_path'])) {
    $_SESSION['doc_path'] = $_SESSION['installation_info']['doc_path'];
}

if (isset($_POST['doc_path_post'])) {

    $docPath = trim((string)$_POST['doc_path']);

    $docPath = '/' . ltrim($docPath, '/');

    $_SESSION['doc_path'] = $docPath;

    header("Location: ./?action=doc_path_success");
    die();


}

include_once './view/doc_path.tpl';
{'fraction_non_alphanumeric': 0.21423330887747616, 'fraction_numerical': 0.007703595011005136, 'mean_word_length': 3.463175122749591, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4314888', 'n_tokens_mistral': 1007, 'n_tokens_neox': 919, 'n_words': 158}