Minor - format code

pull/2487/head
jmontoyaa 9 years ago
parent b0ff7b7923
commit 6f18a6399b
  1. 9
      main/admin/user_import.php
  2. 4
      main/inc/lib/events_dispatcher.class.php
  3. 15
      main/inc/lib/search/xapian/XapianIndexer.class.php
  4. 2
      plugin/buycourses/src/service_information.php
  5. 2
      plugin/buycourses/src/service_process.php
  6. 2
      plugin/buycourses/src/service_success.php
  7. 2
      plugin/buycourses/src/session_catalog.php
  8. 2
      plugin/buycourses/src/session_panel.php

@ -1,4 +1,4 @@
<?php
*<?php
/* For licensing terms, see /license.txt */
/**
* This tool allows platform admins to add users by uploading a CSV or XML file
@ -171,7 +171,8 @@ function complete_missing_data($user)
* Save the imported data
* @param array $users List of users
* @return void
* @uses global variable $inserted_in_course, which returns the list of courses the user was inserted in
* @uses global variable $inserted_in_course, which returns the list of
* courses the user was inserted in
*/
function save_data($users)
{
@ -531,8 +532,8 @@ if ($count_fields > 0) {
}
}
?>
<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
<blockquote>
<p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p>
<blockquote>
<pre>
<b>LastName</b>;<b>FirstName</b>;<b>Email</b>;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;<span style="color:red;"><?php if (count($list) > 0) echo implode(';', $list).';'; ?></span>Courses;ClassId;
<b>xxx</b>;<b>xxx</b>;<b>xxx</b>;xxx;xxx;<?php echo implode('/', $defined_auth_sources); ?>;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br />

@ -23,8 +23,8 @@ class EventsDispatcher
foreach ($event_config[$event_name]["actions"] as $func) {
$execute = true;
if (!function_exists($func)) // if the function doesn't exist, we log
{
// if the function doesn't exist, we log
if (!function_exists($func)) {
error_log("EventsDispatcher warning : ".$func." does not exist.");
$execute = false;
}

@ -15,7 +15,6 @@ require_once __DIR__.'/../IndexableChunk.class.php';
abstract class XapianIndexer
{
/* XapianWritableDatabase */
protected $db;
/* IndexableChunk[] */
protected $chunks;
@ -27,7 +26,7 @@ abstract class XapianIndexer
/**
* Class contructor
*/
function __construct()
public function __construct()
{
$this->db = null;
$this->stemmer = null;
@ -70,13 +69,16 @@ abstract class XapianIndexer
*/
function connectDb($path = null, $dbMode = null, $lang = 'english')
{
if ($this->db != null)
if ($this->db != null) {
return $this->db;
if ($dbMode == null)
}
if ($dbMode == null) {
$dbMode = Xapian::DB_CREATE_OR_OPEN;
}
if ($path == null)
if ($path == null) {
$path = api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb/';
}
try {
$this->db = new XapianWritableDatabase($path, $dbMode);
@ -203,7 +205,8 @@ abstract class XapianIndexer
*
* @param int $did Xapian::docid
* @param array $terms New terms of the document
* @param string $prefix Prefix used to categorize the doc (usually 'T' for title, 'A' for author)
* @param string $prefix Prefix used to categorize the doc
* (usually 'T' for title, 'A' for author)
* @return boolean false on error
*/
function update_terms($did, $terms, $prefix)

@ -36,4 +36,4 @@ $template->assign('essence', Essence\Essence::instance());
$content = $template->fetch('buycourses/view/service_information.tpl');
$template->assign('content', $content);
$template->display_one_col_template();
$template->display_one_col_template();

@ -152,7 +152,7 @@ if ($typeUser) {
// Now get all the courses lp's
$thisLpList = $em->getRepository('ChamiloCourseBundle:CLp')->findBy(['cId' => $course->getCourse()->getId()]);
foreach ($thisLpList as $lp) {
$courseLpList[$lp->getCId()] = $lp->getName().' ('.$course->getCourse()->getTitle().')'; ;
$courseLpList[$lp->getCId()] = $lp->getName().' ('.$course->getCourse()->getTitle().')';
}
}

@ -157,9 +157,7 @@ if ($form->validate()) {
}
unset($_SESSION['bc_service_sale_id']);
header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
exit;
}

@ -57,7 +57,7 @@ $form->addButtonFilter(get_lang('Search'));
$sessionList = $plugin->getCatalogSessionList($nameFilter, $minFilter, $maxFilter);
//View
// View
if (api_is_platform_admin()) {
$interbreadcrumb[] = [
'url' => 'configuration.php',

@ -62,4 +62,4 @@ $tpl->assign(
);
$tpl->assign('header', $templateName);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
$tpl->display_one_col_template();

Loading…
Cancel
Save