예제 #1
0
function runJavaTests($clientRoot)
{
    global $config;
    $jdkPath = $config['java']['jdk_path'];
    $externalJars = listDir("{$clientRoot}/lib");
    if (!is_dir("{$clientRoot}/bin")) {
        mkdir("{$clientRoot}/bin");
    }
    chdir("{$clientRoot}/bin");
    // compile the client library
    executeCommand("{$jdkPath}javac.exe", "-d . -sourcepath ../src -cp " . implode(';', addPrefix($externalJars, '../lib/')) . " ../src/com/kaltura/client/test/KalturaTestSuite.java");
    // pack the client library
    executeCommand("{$jdkPath}jar.exe", "cvf kalturaClient.jar .");
    // run the tests
    copy("{$clientRoot}/src/DemoImage.jpg", "{$clientRoot}/bin/DemoImage.jpg");
    copy("{$clientRoot}/src/DemoVideo.flv", "{$clientRoot}/bin/DemoVideo.flv");
    copy("{$clientRoot}/src/test.properties", "{$clientRoot}/bin/test.properties");
    $log4jConfig = fixSlashes("{$clientRoot}/src/log4j/log4j.properties");
    if ($log4jConfig[1] == ':') {
        $log4jConfig = substr($log4jConfig, 2);
    }
    $log4jParam = "-Dlog4j.configuration=file://{$log4jConfig}";
    $jarList = "bin/kalturaClient.jar;" . implode(';', addPrefix($externalJars, 'lib/'));
    chdir($clientRoot);
    executeCommand("{$jdkPath}java.exe", "-cp {$jarList} {$log4jParam} org.junit.runner.JUnitCore com.kaltura.client.test.KalturaTestSuite");
}
예제 #2
0
function getCssSourceFiles()
{
    $facetePomFile = "resources/facete-pom.xml";
    $pomXml = simplexml_load_file($facetePomFile);
    $fileNames = $pomXml->xpath("//*[local-name()='cssSourceFiles']/*[local-name()='param']");
    $webappDir = getWebappDir($pomXml);
    $cssSourceDir = getCssSourceDir($pomXml);
    #    $prefix = $webappDir . "/" . $cssSourceDir . "/";
    $prefix = $webappDir . $cssSourceDir;
    $result = addPrefix($prefix, $fileNames);
    return $result;
}
예제 #3
0
}
if (!empty($limit)) {
    shRemoveFromGETVarsList('limit');
}
if (!empty($limitstart)) {
    shRemoveFromGETVarsList('limitstart');
}
// start by inserting the menu element title (just an idea, this is not required at all)
$task = isset($task) ? $task : null;
$Itemid = isset($Itemid) ? $Itemid : null;
// Get the component prefix that is configured in SH404
$prefix = shGetComponentPrefix($option);
$prefix = empty($prefix) ? getMenuTitle($option, $task, $Itemid, null, $shLangName) : $prefix;
$prefix = empty($prefix) || $prefix == '/' ? JText::_('COM_EASYSOCIAL_SH404_DEFAULT_ALIAS') : $prefix;
// Add the prefix
addPrefix($title, $prefix);
// If view is set, pass the url builders to the view
if (isset($view)) {
    $adapter = dirname(__FILE__) . '/' . strtolower($view) . '.php';
    // Probably the view has some custom stuffs to perform.
    if (JFile::exists($adapter)) {
        include $adapter;
    } else {
        // Add the view to the list of titles
        addView($title, $view);
        // If layout is set, pass the url builders to the view
        if (isset($layout)) {
            addLayout($title, $view, $layout);
        }
    }
}
예제 #4
0
파일: install.php 프로젝트: kidaa/quantum
        $db_query = str_replace("INSERT INTO `url_alias`", "INSERT INTO `" . $db_pref . "url_alias`", $db_query);
        $db_query = str_replace("CREATE TABLE IF NOT EXISTS `users`", "CREATE TABLE IF NOT EXISTS `" . $db_pref . "users`", $db_query);
        $db_query = str_replace("INSERT INTO `users`", "INSERT INTO `" . $db_pref . "users`", $db_query);
        $db_query = str_replace("CREATE TABLE IF NOT EXISTS `user_group`", "CREATE TABLE IF NOT EXISTS `" . $db_pref . "user_group`", $db_query);
        $db_query = str_replace("INSERT INTO `user_group`", "INSERT INTO `" . $db_pref . "user_group`", $db_query);
        return $db_query;
    }
    $templine = '';
    $lines = file('install.sql');
    foreach ($lines as $line) {
        if (substr($line, 0, 2) == '--' || $line == '') {
            continue;
        }
        $templine .= $line;
        if (substr(trim($line), -1, 1) == ';') {
            mysqli_query($link, addPrefix($templine, $db_pref)) or trigger_error('Error: ' . mysqli_error($link) . '<br />Error No: ' . mysqli_errno($link));
            $templine = '';
        }
    }
    mysqli_query($link, "UPDATE " . $db_pref . "users SET name = '" . $name . "', password = '******', email = '" . $email . "' WHERE id = '1'");
    die(json_encode(1));
}
?>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>QUANTUM Install</title>
    <?php 
include_once 'media.tpl';
?>