Minor - format code

pull/2970/head
Julio Montoya 6 years ago
parent debefbf9f0
commit 8b9a665b28
  1. 19
      main/inc/lib/Compilatio.php
  2. 20
      main/inc/lib/chat.lib.php

@ -5,9 +5,7 @@
* Build the comunication with the SOAP server Compilatio.net
* call severals methods for the file management in Compilatio.net.
*
* Date: 26/05/16
*
* @version:1.0
* @version: 2.0
*/
class Compilatio
{
@ -402,24 +400,22 @@ class Compilatio
}
/**
* Fonction affichage de la barre de progression d'analyse version 3.1.
* Fonction affichage de la barre de progression d'analyse version 3.1.
*
* @param string $status From the document
* @param $pour
* @param string $imagesPath
* @param array $text Array includes the extract from the text
* @param int $pour
* @param array $text Array includes the extract from the text
*
* @return string
*/
public static function getProgressionAnalyseDocv31($status, $pour = 0, $imagesPath = '', $text = [])
public static function getProgressionAnalyseDocv31($status, $pour = 0, $text = [])
{
$loading = Display::returnFontAwesomeIcon('spinner', null, true, 'fa-spin');
$loading .= ' ';
$refreshReturn = Display::url('javascript:window.location.reload(false);', $loading);
//$refreshReturn = Display::url('javascript:window.location.reload(false);', $loading);
switch ($status) {
case 'ANALYSE_IN_QUEUE' :
case 'ANALYSE_IN_QUEUE':
$content = $loading.$text['analysisinqueue'];
break;
case 'ANALYSE_PROCESSING':
@ -597,7 +593,6 @@ class Compilatio
$actionCompilatio .= self::getProgressionAnalyseDocv31(
$status,
$soapRes->documentStatus->progression,
$compilatioImgFolder,
$text
);
break;

@ -330,27 +330,11 @@ class Chat extends Model
];
}
/*if (!empty($_SESSION['openChatBoxes'])) {
foreach ($_SESSION['openChatBoxes'] as $userId => $time) {
if (!isset($_SESSION['tsChatBoxes'][$userId])) {
$now = time() - $time;
$time = api_convert_and_format_date($time, DATE_TIME_FORMAT_SHORT_TIME_FIRST);
$message = sprintf(get_lang('SentAtX'), $time);
if ($now > 180) {
if (isset($chatHistory[$userId])) {
$chatHistory[$userId]['items'][] = $item;
}
$_SESSION['tsChatBoxes'][$userId] = 1;
}
}
}
}*/
Session::write('chatHistory', $chatHistory);
$sql = "UPDATE ".$this->table."
SET recd = 1
WHERE to_user = '".$currentUserId."' AND recd = 0";
WHERE to_user = $currentUserId AND recd = 0";
Database::query($sql);
echo json_encode(['items' => $chatHistory]);
@ -439,7 +423,7 @@ class Chat extends Model
/**
* Close a specific chat box (user ID taken from $_POST['chatbox']).
*
* @param $userId
* @param int $userId
*/
public function closeWindow($userId)
{

Loading…
Cancel
Save