Merge 1.10.x

1.10.x
Julio Montoya 10 years ago
commit fbd809110d
  1. 11
      composer.json
  2. 2
      main/admin/user_list.php
  3. 2
      main/auth/sso/sso.Drupal.class.php
  4. 3
      main/auth/sso/sso.class.php
  5. 4
      main/css/base.css
  6. 3
      main/inc/lib/template.lib.php
  7. 4
      main/inc/lib/usermanager.lib.php
  8. 3
      main/template/default/layout/head.tpl
  9. 11
      plugin/advanced_subscription/src/admin_view.php
  10. 18
      tests/scripts/fix_user_id.php

@ -53,8 +53,12 @@
"symfony/validator": "2.6.4",
"gedmo/doctrine-extensions": "~2.3",
"sonata-project/user-bundle": "~2.2",
"fxp/composer-asset-plugin": "~1.0",
"ramsey/array_column": "~1.1",
"patchwork/utf8": "~1.2",
"ddeboer/data-import": "@stable",
"phpoffice/phpexcel": "~1.8"
"webit/eval-math": "dev-master",
"fxp/composer-asset-plugin": "~1.0",
"bower-asset/bootstrap": "3.3.*",
"bower-asset/fontawesome": "4.3.*",
"bower-asset/moment": "2.9",
@ -66,10 +70,7 @@
"bower-asset/mediaelement": "2.16.*",
"bower-asset/modernizr": "2.8.*",
"bower-asset/jqueryui-timepicker-addon": "1.5.*",
"ramsey/array_column": "~1.1",
"patchwork/utf8": "~1.2",
"ddeboer/data-import": "@stable",
"phpoffice/phpexcel": "~1.8"
"bower-asset/imageMap-resizer": "0.5.3"
},
"require-dev": {
"behat/behat": "2.5.*@stable",

@ -895,7 +895,7 @@ if (!empty($extra_data)) {
$form->addElement('html', '</td></tr>');
$form->addElement('html', '<tr><td>');
$form->addElement('button', 'submit',get_lang('SearchUsers'));
$form->addButtonSearch(get_lang('SearchUsers'));
$form->addElement('html', '</td></tr>');
$form->addElement('html', '</table>');

@ -118,7 +118,7 @@ class ssoDrupal
//Check if the account is active (not locked)
if ($uData['active']=='1') {
// check if the expiration date has not been reached
if ($uData['expiration_date'] > date('Y-m-d H:i:s') OR $uData['expiration_date']=='0000-00-00 00:00:00') {
if (empty($uData['expiration_date']) OR $uData['expiration_date'] > date('Y-m-d H:i:s') OR $uData['expiration_date']=='0000-00-00 00:00:00') {
//If Multiple URL is enabled
if (api_get_multiple_access_url()) {

@ -123,7 +123,8 @@ class sso {
//Check if the account is active (not locked)
if ($uData['active']=='1') {
// check if the expiration date has not been reached
if ($uData['expiration_date'] > date('Y-m-d H:i:s')
if (empty($uData['expiration_date'])
or $uData['expiration_date'] > date('Y-m-d H:i:s')
or $uData['expiration_date']=='0000-00-00 00:00:00') {
//If Multiple URL is enabled

@ -84,6 +84,10 @@ select {
#announcements-slider .carousel-indicators .active{
background: #C52D2F;
}
#announcements-slider .carousel-inner img {
height: auto;
width: 100%;
}
.carousel-indicators{
bottom: 0px !important;
}

@ -616,7 +616,8 @@ class Template
'bootstrap-daterangepicker/daterangepicker.js',
'jquery-timeago/jquery.timeago.js',
'mediaelement/build/mediaelement-and-player.min.js',
'jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon.min.js'
'jqueryui-timepicker-addon/dist/jquery-ui-timepicker-addon.min.js',
'imagemap-resizer/js/imageMapResizer.min.js'
];
if ($isoCode != 'en') {

@ -851,7 +851,7 @@ class UserManager
{
$t_uf = Database::get_main_table(TABLE_MAIN_USER_FIELD);
$t_ufv = Database::get_main_table(TABLE_MAIN_USER_FIELD_VALUES);
$sql = "SELECT id
$sql = "SELECT user_id
FROM $t_uf uf
INNER JOIN $t_ufv ufv
ON ufv.field_id=uf.id
@ -861,7 +861,7 @@ class UserManager
$res = Database::query($sql);
$row = Database::fetch_object($res);
if ($row) {
return $row->id;
return $row->user_id;
} else {
return 0;
}

@ -465,6 +465,9 @@ $(function() {
$(".td_actions").parent('tr').mouseout(function() {
$(".td_actions").hide();
});*/
/* Make responsive image maps */
$('map').imageMapResize();
});
</script>
{{ css_custom_file_to_string }}

@ -27,21 +27,20 @@ if (!empty($sessionId)) {
$sessionList[$sessionId]['selected'] = 'selected="selected"';
$studentList['session']['id'] = $sessionId;
// Assign variables
$fieldsArray = array('description', 'target', 'mode', 'publication_end_date', 'recommended_number_of_participants');
$fieldsArray = array('description', 'target', 'mode', 'publication_end_date', 'recommended_number_of_participants', 'vacancies');
$sessionArray = api_get_session_info($sessionId);
$extraSession = new ExtraFieldValue('session');
$extraField = new ExtraField('session');
// Get session fields
$fieldList = $extraField->get_all(array(
'field_variable IN ( ?, ?, ?, ?, ?)' => $fieldsArray
'field_variable IN ( ?, ?, ?, ?, ?, ?)' => $fieldsArray
));
// Index session fields
foreach ($fieldList as $field) {
$fields[$field['id']] = $field['field_variable'];
}
$mergedArray = array_merge(array($sessionId), array_keys($fields));
$sessionFieldValueList = $extraSession->get_all(array('session_id = ? field_id IN ( ?, ?, ?, ?, ?, ?, ? )' => $mergedArray));
$params = array(' session_id = ? ' => $sessionId);
$sessionFieldValueList = $extraSession->get_all(array('where' => $params));
foreach ($sessionFieldValueList as $sessionFieldValue) {
// Check if session field value is set in session field list
if (isset($fields[$sessionFieldValue['field_id']])) {
@ -73,7 +72,7 @@ if (!empty($sessionId)) {
$student['firstname'] . ', ' . $student['lastname'] :
$student['lastname'] . ', ' . $student['firstname'];
}
$tpl->assign('session', $studentList['session']);
$tpl->assign('session', $sessionArray);
$tpl->assign('students', $studentList['students']);
}

@ -0,0 +1,18 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Temporary fix to set user.user_id to the same as user.id
*/
if (PHP_SAPI != 'cli') {
die('This script can only be executed from the command line');
}
require __DIR__.'/../../main/inc/conf/configuration.php';
$dbh = mysql_connect(
$_configuration['db_host'],
$_configuration['db_user'],
$_configuration['db_password']
);
$db = mysql_select_db($_configuration['main_database']);
$sql = "UPDATE user SET user_id = id";
mysql_query($sql);
Loading…
Cancel
Save