Example #1
0
    } else {
        confChange('SELF_PROTOCOL', 'http');
    }
}
/**
* get domain for email-address
*/
if (!confGet('SELF_DOMAIN') && isset($_SERVER["HTTP_HOST"])) {
    confChange('SELF_DOMAIN', $_SERVER["HTTP_HOST"]);
}
/**
* set administrator-address (this should be set in customize.inc)
* - this address is used in errors, etc.
*/
if (!confGet('EMAIL_ADMINISTRATOR') && isset($_SERVER["HTTP_HOST"])) {
    confChange('EMAIL_ADMINISTRATOR', 'admin@' . confGet('SELF_DOMAIN'));
}
/**
* maps directory name => Title in person profile
*/
$g_themes = array('clean' => 'Clean', 'custom' => 'Custom');
$g_theme_names = array_keys($g_themes);
/**
* default role when added to projects
*
* Don't get confuse about User-rights, user-profile and project-rights.
* Profiles are some kind of template to quickly INITIALIZE user-rights
* and project-roles. These values are COPIED into the "person.user_rights"
* and the "projectperson.*_level".
*
* Don't be affraid to add new profiles here, but keep up the order of
Example #2
0
<?php

if (!function_exists('startedIndexPhp')) {
    header("location:../index.php");
    exit;
}
/**
* list row color-settings (depend on javascript)
* 
* set some odd/even-colors for 	 "table.list tr.odd" to avoid flickering
*/
confChange('LIST_COLOR_SELECTED', '#ffde00');
confChange('LIST_COLOR_ODD', '#ffffff');
confChange('LIST_COLOR_EVEN', '#f8f8f8');
confChange('LIST_COLOR_HOVER', '#DDF0F0');
Example #3
0
 /**
  *
  */
 function testAllPages()
 {
     global $g_streber_url;
     TestEnvironment::prepare('fixtures/project_setup.sql');
     TestEnvironment::initStreberUrl();
     $this->addHeader('USER_AGENT: streber_unit_tester');
     /**
      * we require some valid logins and ids to test all pages
      */
     $login_name = "admin";
     $login_password = "";
     # FIXME: Setting an absolute path is bad!
     $url_start = $g_streber_url . '/index.php?go=logout';
     $test_params = array("_projectView_" => 12, "_projectEdit_" => 12, "_taskView_" => 18, "_taskEdit_" => 18, "_personView_" => 1, "_personEdit_" => 1, "_companyView_" => 8, "_companyEdit_" => 8, "_commentView_" => 39, "_commentEdit_" => 39, "_effortView_" => 35, "_effortEdit_" => 35);
     require_once "../conf/defines.inc.php";
     # the order of those includes is tricky
     require_once '../std/class_auth.inc.php';
     require_once "../std/class_pagehandler.inc.php";
     require_once "../pages/_handles.inc.php";
     confChange('USE_MOD_REWRITE', false);
     # uncomment this for apache 1.x
     /**
      * test all pagehandles for correct rendering
      */
     ### go though all pagehandles and render ###
     foreach ($PH->hash as $key => $handle) {
         ### enter login-infos ###
         $this->assertTrue($this->get($url_start), 'getting logout-page (%s)');
         $this->assertTrue($this->setField('login_name', $login_name), 'set login-name (%s)');
         $this->assertTrue($this->setField('login_password', $login_password), 'set password (%s)');
         ### submit -> login to home ###
         $this->assertTrue($this->clickSubmit('Submit'), 'click_submit');
         $this->assertNoUnwantedPattern('/invalid login/i', 'Login for testing working (%s)');
         if ($handle->test == 'yes') {
             TestEnvironment::prepare('fixtures/project_setup.sql');
             $params = array();
             if (isset($handle->test_params)) {
                 foreach ($handle->test_params as $param => $value) {
                     if (isset($test_params[$value])) {
                         #echo "using param $param=$test_params[$value]<br>";
                         $params[$param] = $test_params[$value];
                     }
                 }
                 $url = $g_streber_url . $PH->getUrl($key, $params);
             } else {
                 $url = $g_streber_url . $PH->getUrl($key);
             }
             echo "<b>{$handle->id}</b> ";
             print_r($params);
             echo "<br>";
             $this->assertTrue($this->get("/" . $url), "getting {$url} (%s)");
             $this->assertNoUnwantedPattern('/PHP Error |<b>Fatal error<\\/b>|<b>Warning<\\/b>|<b>Error<\\/b>|<b>Notice<\\/b>|<b>Parse error<\\/b>/i', 'php-error found (%s)');
             $this->assertNoUnwantedPattern('/' . '%' . '%' . '/i', 'debug output found (%s)');
             $this->assertValidHtmlStucture($url);
             $this->assertNoUnwantedPattern('/fatal error \\(/i', 'check for streber warnings (%s)');
             $this->assertNoUnwantedPattern('/Error:/i', 'check for streber warnings (%s)');
             $this->assertWantedPattern('/<\\/html>/', 'rendering Complete? (%s)');
             $this->assertNoUnwantedPattern('/<x>/', 'check unescaped data (%s)');
             $this->assertNoUnwantedPattern('/&amp;lt;x&amp;gt;/', 'check double escaped data (%s)');
             for ($i = 0; $i < 20; $i++) {
                 echo "                       ";
             }
         }
     }
 }
Example #4
0
} else {
    header("location:install/install.php");
    exit;
}
include_once confGet('DIR_SETTINGS') . confGet('SITE_SETTINGS');
### user-settings ##
if (file_exists('customize.inc.php')) {
    require_once confGet('DIR_STREBER') . 'customize.inc.php';
}
/**
* overwrite db-settings if page requested while unit testing
* read more at www.streber-pm.org/7276
*/
if (getServerVar('HTTP_USER_AGENT') == 'streber_unit_tester') {
    confChange('DB_TABLE_PREFIX', 'test_' . confGet('DB_TABLE_PREFIX'));
    confChange('LOG_LEVEL', '');
}
### start output-buffering? ###
if (confGet('USE_FIREPHP')) {
    ob_start();
}
filterGlobalArrays();
/**
* run profiler and output measures in footer?
*/
if (confGet('USE_PROFILER')) {
    require_once confGet('DIR_STREBER') . "std/profiler.inc.php";
} else {
    ###  define empty functions ###
    function measure_start($id)
    {
<?php

/**
* This clones the content of the fixture database to the primary database.
*
* WARNING:
* - All changes to this database will be lost!
*
* This is required for updating the fixture database in case heavy db-changes
* are done to the database scheme.
*/
error_reporting(E_ALL);
require_once 'simpletest/web_tester.php';
require_once 'simpletest/reporter.php';
/**
* test installation
*/
### create a function to make sure we are starting at index.php ###
function startedIndexPhp()
{
    return true;
}
### include some core libraries ###
require_once '../std/common.inc.php';
require_once dirname(__FILE__) . '/../conf/conf.inc.php';
require_once dirname(__FILE__) . '/class.test_environment.php';
confChange('DB_TABLE_PREFIX_UNITTEST', '');
# overwrite development database!!!
TestEnvironment::prepare('fixtures/project_setup.sql');
header('Location: install/install.php');
Example #6
0
    exit;
}
/**
* Edit this file to overwrite streber-settings
*
* use confChange('NAME', 'Value'); 
*
* read http://www.streber-pm.org/3719  or have a look at conf/conf.inc
*/
confChange('LOG_LEVEL', LOG_MESSAGE_ALL);
confChange('DISPLAY_ERROR_LIST', 'DETAILS');
#confChange('CHECK_IP_ADDRESS', true);
#confChange('USE_MOD_REWRITE', true);
#confChange('USE_PROFILER', true);
confChange('STOP_IF_INSTALL_DIRECTORY_EXISTS', false);
#confChange('LINK_STAR_LIGHT', true);		# syntaxhighlighting for Gheckobased browsers
### uncomment the following line if you upgraded from mySQL 4
#confChange('DB_USE_UTF8_ENCODING',true);
#confChange('EMAIL_ADMINISTRATOR','mail.somedomain.de');
#confChange('SMTP','mail.yourdomain.de');
#confChange('ANONYMOUS_USER', 7);
#confChange('REGISTER_NEW_USERS', true);
#confChange('REGISTER_NEW_USERS_TO_PROJECT', 10);
#function postInitCustomize()
#{
#    global $PH;
#    $PH->hash['projView']->req= 'pages/custom_projView.inc.php';
#    $PH->hash['projViewFiles']->req= 'pages/custom_projViewFiles.inc.php';
#}
confChange('TASKDETAILS_IN_SIDEBOARD', true);