Minor code style changes

skala
Julio Montoya 12 years ago
parent b2aa0ce44f
commit 4ee0c34b3e
  1. 8
      main/admin/index.php
  2. 2
      main/create_course/add_course.php
  3. 1
      main/inc/lib/chamilo_session.class.php
  4. 1
      main/inc/lib/internationalization.lib.php
  5. 7
      main/inc/lib/main_api.lib.php
  6. 8
      main/inc/lib/template.lib.php
  7. 3
      resources/config/prod.php
  8. 5
      src/ChamiloLMS/Command/Database/InstallCommand.php

@ -27,7 +27,6 @@ $nameTools = get_lang('PlatformAdmin');
// Displaying the header
$message = '';
if (api_is_platform_admin()) {
if (is_dir(api_get_path(SYS_CODE_PATH).'install/') && is_readable(api_get_path(SYS_CODE_PATH).'install/index.php')) {
$message = Display::return_message(get_lang('InstallDirAccessibleSecurityThreat'),'warning');
@ -299,9 +298,10 @@ if (api_is_platform_admin()) {
$blocks['version_check']['items'] = null;
}
$tpl = new Template();
$tpl->assign('blocks', $blocks);
$tpl->display('default/admin/settings_index.tpl');
$app['template']->assign('blocks', $blocks);
//$app['template']->display('default/admin/settings_index.tpl');
//$app['default_layout'] = $app['template_style'].'/admin/settings_index.tpl';
$app['template']->display('default/admin/settings_index.tpl');
/**
* Displays either the text for the registration or the message that the installation is (not) up to date

@ -36,7 +36,7 @@ if ($course_validation_feature) {
require_once api_get_path(LIBRARY_PATH).'course_request.lib.php';
}
$htmlHeadXtra[] = '<script type="text/javascript">
$htmlHeadXtra[] = '<script>
function setFocus(){
$("#title").focus();
}

@ -18,6 +18,7 @@
* @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Geneva
*/
class ChamiloSession extends System\Session
{

@ -57,7 +57,6 @@ define ('LANGUAGE_DETECT_MAX_LENGTH', 2000);
// $max_delta = 400 * 350 = 140000 is the best detection with lowest speed.
define ('LANGUAGE_DETECT_MAX_DELTA', 140000);
/**
* Initialization
*/

@ -261,9 +261,6 @@ define('SCRIPT_SWFOBJECT', '{SCRIPT_SWFOBJECT}');
define('SCRIPT_ASCIIMATHML', '{SCRIPT_ASCIIMATHML}');
define('DRAWING_ASCIISVG', '{DRAWING_ASCIISVG}');
// Forcing PclZip library to use a custom temporary folder.
define('PCLZIP_TEMPORARY_DIR', api_get_path(SYS_ARCHIVE_PATH));
// Relations type with Human resources manager
define('COURSE_RELATION_TYPE_RRHH', 1);
define('SESSION_RELATION_TYPE_RRHH', 1);
@ -514,6 +511,7 @@ function api_get_path($path_type, $path = null) {
// Always load root_web modifications for multiple url features
global $_configuration;
//default $_configuration['root_web'] configuration
$root_web = isset($_configuration['root_web']) ? $_configuration['root_web'] : null;
@ -530,8 +528,8 @@ function api_get_path($path_type, $path = null) {
$load_new_config = true;
}
}
if (!$is_this_function_initialized) {
global $_configuration;
$root_rel = isset($_configuration['url_append']) ? $_configuration['url_append'] : null;
//$code_folder = $_configuration['code_append'];
@ -627,6 +625,7 @@ function api_get_path($path_type, $path = null) {
$paths[CONFIGURATION_PATH] = $paths[SYS_CODE_PATH].$paths[CONFIGURATION_PATH];
$is_this_function_initialized = true;
} else {
if ($load_new_config) {
// Redefining variables to work well with the "multiple url" feature

@ -41,7 +41,7 @@ class Template
$this->app['classic_layout'] = true;
$this->navigation_array = $this->return_navigation_array();
$this->navigation_array = $this->returnNavigationArray();
// $this->app['template_style'] = 'default';
// $this->app['default_layout'] = $this->app['template_style'].'/layout/layout_1_col.tpl';
@ -99,7 +99,6 @@ class Template
}
}
}
}
public static function get_icon_path($image, $size = ICON_SIZE_SMALL)
@ -336,6 +335,7 @@ class Template
'web_plugin' => api_get_path(WEB_PLUGIN_PATH),
'web_lib' => api_get_path(WEB_LIBRARY_PATH),
);
$this->assign('_p', $_p);
//Here we can add system parameters that can be use in any template
@ -877,7 +877,7 @@ class Template
return $menu;
}
function return_navigation_links()
function returnNavigationLinks()
{
$html = '';
@ -1164,7 +1164,7 @@ class Template
return $html;
}
function return_navigation_array()
public function returnNavigationArray()
{
$navigation = array();
$menu_navigation = array();

@ -23,6 +23,9 @@ $app['profiler.cache_dir'] = $app['cache.path'].'profiler';
//Monolog log file
$app['chamilo.log'] = $app['cache.path'].'chamilo.log';
//PCLZIP temp dir
define('PCLZIP_TEMPORARY_DIR', $app['cache.path']);
// Assetic
/*
$app['assetic.path_to_cache'] = $app['cache.path'] . DIRECTORY_SEPARATOR . 'assetic' ;

@ -198,8 +198,11 @@ class InstallCommand extends AbstractCommand
'firstname' => 'M',
'username' => 'admin',
'password' => 'admin',
'email' => 'admin@example.org'
'email' => 'admin@example.org',
'language' => 'english',
'phone' => '6666666'
);
$output->writeln("<comment>Creating an admin User</comment>");
$userInfo = array();
foreach ($adminUser as $key => $value) {

Loading…
Cancel
Save