Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/ajax/eqLogic.ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@
$eqLogicsSave = json_decode($eqLogicSaves, true);
$nbrSave = count($eqLogicsSave);
$return = array();

$eqLogic = null;
foreach ($eqLogicsSave as $eqLogicSave) {

if (!is_array($eqLogicSave)) {
Expand Down
1 change: 1 addition & 0 deletions core/ajax/scenario.ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
if (init('action') == 'applyTemplate') {
unautorizedInDemo();
$path = __DIR__ . '/../../data/scenario';
$converts = [];
if (!file_exists($path . '/' . init('template'))) {
throw new Exception(__('Fichier non trouvé :', __FILE__) . ' ' . $path . '/' . init('template'));
}
Expand Down
1 change: 1 addition & 0 deletions core/ajax/user.ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

if (!isConnect()) {
if (config::byKey('sso:allowRemoteUser') == 1) {
$configs = config::byKeys(array('session_lifetime', 'sso:allowRemoteUser', 'sso:remoteUserHeader'));
$header = $configs['sso:remoteUserHeader'];
$header_value = $_SERVER[$header];
$user = user::byLogin($header_value);
Expand Down
5 changes: 5 additions & 0 deletions core/api/jeeApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@
throw new Exception(__('Vous n\'avez pas les droits de faire cette action', __FILE__), -32701);
}
unautorizedInDemo();
$object = null;
if (isset($params['id'])) {
$object = jeeObject::byId($params['id']);
}
Expand Down Expand Up @@ -836,6 +837,7 @@

if ($jsonrpc->getMethod() == 'cmd::save') {
unautorizedInDemo();
$cmd = null;
if (isset($params['id'])) {
$cmd = cmd::byId($params['id']);
if (is_object($_USER_GLOBAL) && !$cmd->hasRight($_USER_GLOBAL)) {
Expand Down Expand Up @@ -979,6 +981,7 @@

if ($jsonrpc->getMethod() == 'scenario::save') {
unautorizedInDemo();
$scenario = null;
if (isset($params['id'])) {
$scenario = scenario::byId($params['id']);
}
Expand Down Expand Up @@ -1151,6 +1154,7 @@
throw new Exception(__('Vous n\'avez pas les droits de faire cette action', __FILE__), -32701);
}
unautorizedInDemo();
$update = null;
if (isset($params['plugin_id'])) {
$update = update::byId($params['plugin_id']);
}
Expand Down Expand Up @@ -1293,6 +1297,7 @@
throw new Exception(__('Vous n\'avez pas les droits de faire cette action', __FILE__), -32701);
}
unautorizedInDemo();
$update = null;
if (isset($params['plugin_id'])) {
$update = update::byId($params['plugin_id']);
}
Expand Down
1 change: 1 addition & 0 deletions core/class/history.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ public static function all($_cmd_id, $_startTime = null, $_endTime = null, $_gro
$values['endTime'] = $_endTime;
}
$sql='';
$goupingType = [];
if ($_groupingType == null || strpos($_groupingType, '::') === false) {
$sql .= 'SELECT ' . DB::buildField(__CLASS__);
} else {
Expand Down
3 changes: 3 additions & 0 deletions core/class/interactQuery.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public static function removeByInteractDefId($_interactDef_id) {
}

public static function recognize($_query) {
$closest = null;
$_query = trim(interactDef::sanitizeQuery($_query));
if (trim($_query) == '') {
return null;
Expand Down Expand Up @@ -248,6 +249,7 @@ public static function findInQuery($_type, $_query, $_data = null) {
$return['query'] = strtolower(sanitizeAccent($_query));
$return[$_type] = null;
$synonyms = self::getQuerySynonym($return['query'], $_type);
$objects = [];
if ($_type == 'object') {
$objects = jeeObject::all();
} elseif ($_type == 'eqLogic') {
Expand Down Expand Up @@ -332,6 +334,7 @@ public static function autoInteract($_query, $_parameters = array()) {
$data = array_merge($data, self::findInQuery('eqLogic', $data['query'], $data));
$data = array_merge($data, self::findInQuery('cmd', $data['query'], $data));
if (isset($data['eqLogic']) && is_object($data['eqLogic']) && (!isset($data['cmd']) || !is_object($data['cmd']))) {
$cmd = null;
foreach ($data['eqLogic']->getCmd('action') as $cmd) {
if ($cmd->getSubtype() == 'slider') {
break;
Expand Down
1 change: 1 addition & 0 deletions core/class/jeeObject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ public static function checkSummaryUpdate($_cmd_id) {
}
$toRefreshCmd = array();
$global = array();
$events = [];
foreach ($objects as $object) {
$summaries = $object->getConfiguration('summary');
if (!is_array($summaries)) {
Expand Down
1 change: 1 addition & 0 deletions core/class/update.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ public function postInstallUpdate($_infos) {
}

public static function getLastAvailableVersion() {
$url = 'undefined url';
try {
$url = 'https://raw.githubusercontent.com/jeedom/core/' . config::byKey('core::branch', 'core', 'master') . '/core/config/version';
$request_http = new com_http($url);
Expand Down
1 change: 1 addition & 0 deletions core/class/utils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public static function getJsonAttr(&$_attr, $_key = '', $_default = '') {
}
if (empty($_attr)) {
if (is_array($_key)) {
$return = [];
foreach ($_key as $key) {
$return[$key] = $_default;
}
Expand Down
1 change: 1 addition & 0 deletions core/class/widgets.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class widgets {
private $test;
private $display;
private $_changed = false;
protected $_needRefreshWidget = false;

/* * ***********************Méthodes statiques*************************** */

Expand Down
4 changes: 1 addition & 3 deletions core/php/utils.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,7 @@ function getTZoffsetMin() {
}

function pageTitle($_page) {
$return = $_page;
switch ($_page) {
case 'overview':
$return = __('Synthèse', __FILE__);
Expand Down Expand Up @@ -1786,9 +1787,6 @@ function pageTitle($_page) {
$return = __('Panel', __FILE__);
break;
}
default:
$return = $_page;
break;
}
return ucfirst($return);
}
Expand Down
1 change: 1 addition & 0 deletions desktop/modal/planHeader.configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
$tr .= $plan->getLink_id();
$tr .= '</td>';
$tr .= '<td>';
$link = null;
if (in_array($plan->getLink_type(),array('text','summary','graph','plan','view','zone','image'))) {
$tr .= '<span class="label label-default">N/A</span>';
} else {
Expand Down
Loading