소스 검색

Merge branch '1.10.x' into bootstrap

aragonc 9 년 전
부모
커밋
95f2ce47b3

+ 1 - 1
documentation/changelog.html

@@ -48,7 +48,7 @@
 
 <a  name="1.10.0"></a>
 
-<h1>Chamilo 1.10.0 - San Juan, ? of August 2015</h1>
+<h1>Chamilo 1.10.0 - San Juan, ? of October 2015</h1>
 <h3>Release notes - summary</h3>
 <p>Chamilo 1.10.0 is a major version of the 1.10.x branch, with new features and bugfixes on top of 1.9.10. As a major version, it requires the use of the upgrade script in order to upgrade an existing Chamilo portal. See install instructions</p>
 <h3>Release name</h3>

+ 35 - 89
documentation/installation_guide.html

@@ -332,30 +332,35 @@ date.timezone = 'America/New_York'
 <h2><a name="3._Upgrade_from_a_previous_version_of"></a>3. Upgrade from a
 previous version of Chamilo LMS (1.*) or Dok€os (&lt;2.0)</h2>
 Before upgrading, we <b>heavily</b> recommend you do a full backup of the previous
-Chamilo or Dok€os directories and databases. If you are unsure how to achieve this
+Chamilo directories and databases. If you are unsure how to achieve this
 please ask your hosting provider for advice.<br />
-<em>Chamilo LMS 1.10 comes with a new database structure in comparison to 1.9, and so between 1.9 and 1.8.
+<em>Chamilo LMS 1.10 comes with a new database structure in comparison to 1.9,
+as was the case between 1.9 and 1.8.
 Although the upgrade script takes the migration in charge, it might be generating
 a very heavy load on your server during the upgrade, and will change your
-database completely, preserving the data as well as possible (we have tested
+database considerably, preserving the data as well as possible (we have tested
 the procedure many times, but remember this is GNU/GPLv3 and we cannot be held
 responsible for what would happen to your data without professional supervision).
 This is why we *really* recommend you take a full backup of your system before
 you upgrade.</em>
 <br />
 <br />
-Also note that Chamilo LMS 1.10 removes some deprecated language files from the
-main/lang/ directory. If you have changed language files directly (instead of
-using the recommended way of sublanguages), you should take a backup copy of
+Also note that Chamilo LMS 1.10 unites all language files from the
+main/lang/ directory into one single file by language.
+If you have changed language files directly (instead of
+using the recommended way: sub-languages), you should take a backup copy of
 these changed translations before you upgrade. Sublanguages might also require
 som manual work, but the upgrade procedure will not touch sublanguages directly.
 <br />
 <div class="muted"> NOTE: For very heavy Chamilo databases, some of our official
 providers have developed improved migration procedures that use more memory but
-process the upgrades up to 20 times faster. If this is the kind of thing you
+process the upgrades much faster. If this is the kind of thing you
 need, we highly recommend you contact them (see reference below).</div>
-<div class="muted"> NOTE: This version of Chamilo can only be used to upgrade from earlier versions of Chamilo or Dok€os. For example, you cannot use the normal
-upgrade scripts from Chamilo 1.9 to upgrade from Dok€os 2.0 (which was born after the split with Chamilo). If you need this, please contact one of the Chamilo Association's <a href="https://chamilo.org/providers">official providers</a>)</div>
+<div class="muted"> NOTE: This version of Chamilo can only be used to upgrade
+from earlier versions of Chamilo 1.9.*. For example, you cannot use the normal
+upgrade scripts from Chamilo 1.10 to upgrade from Chamilo 1.8.* or even Dok€os 2.0
+(which was born after the split with Chamilo). If you need this, please contact one
+of the Chamilo Association's <a href="https://chamilo.org/providers">official providers</a>)</div>
 
 <p></p>
 
@@ -377,36 +382,20 @@ As this is only a minor version change from previous 1.10.* versions of Chamilo,
 <br />
 
 
-<h3>3.2 Upgrading from Chamilo 1.8.x or 1.9.x</h3>
-<ul>
-  <li> check that you haven't left any customised stylesheet or image <span class="muted">(if you have, make sure you keep a copy on the side*)</span></li>
-  <li> download the Chamilo 1.10 install package from the <a href="http://www.chamilo.org/download">Chamilo download page</a></li>
-  <li> unzip the new files of Chamilo 1.10 over the files of the older version (or unzip the files in one folder and then copy the files from there to the older version's directory)</li>
-  <li> point your browser on your portal URL + main/install/</li>
-  <li> choose your language and click&nbsp;<span style="font-style: italic;">Upgrade from 1.8.x/1.9.x</span></li>
-  <li> clean your archive/ directory: take a temporary copy of index.html, delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!). It will all be re-generated. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
-  <li> make sure "AllowOverride All" is present in your Apache configuration, as interpreting the .htaccess files is very important for Chamilo to work</li>
-</ul>
-
-<br />
-
-<h3>3.3 Upgrading from Dok€os 1.8.x</h3>
+<h3>3.2 Upgrading from Chamilo 1.8.x</h3>
+    To upgrade from version of Chamilo prior to 1.9.0, you will need to first upgrade them to 1.9.10.2, then upgrade again (separately) to 1.10.x
 
-<em>If you upgrade from Dok€os 1.8.x</em> :&nbsp;
+<h3>3.2 Upgrading from Chamilo 1.9.x</h3>
 <ul>
   <li> check that you haven't left any customised stylesheet or image <span class="muted">(if you have, make sure you keep a copy on the side*)</span></li>
   <li> download the Chamilo 1.10 install package from the <a href="http://www.chamilo.org/download">Chamilo download page</a></li>
   <li> unzip the new files of Chamilo 1.10 over the files of the older version (or unzip the files in one folder and then copy the files from there to the older version's directory)</li>
+  <li> make *absolutely sure* that the .htaccess file of version 1.10 is copied as well</li>
+  <li> make sure "AllowOverride All" is present in your Apache configuration, as interpreting the .htaccess files is very important for Chamilo to work (note that Order-Allow directives have been replaced by "Require all granted" in Apache 2.4)</li>
   <li> point your browser on your portal URL + main/install/</li>
-  <li> choose your language and click&nbsp;<span style="font-style: italic;">Upgrade from 1.8.x/1.9.x</span></li>
-  <li> clean your archive/ directory: take a temporary copy of index.html, delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!). It will all be re-generated. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
+  <li> click&nbsp;<span style="font-style: italic;">Install</span>, then choose <span style="font-style: italic;">Upgrade from 1.9.*</span></li>
 </ul>
-A bunch of Chamilo administrators have reported minor issues with the migration between versions considerably apart (like from Dok€os to Chamilo).
-This might include loosing some assignments or forum posts. To avoid any ugly effect on your users, we recommend you first establish a checklist
-of all the content that is critical to you, and that you keep a working copy of your previous site on the side. This way, it will be easier to
-manage the transition by letting your users get access to their contents from the previous site and making it easier for you to compare the two.
-If you are experiencing difficulties, consider asking for help from a PHP developer or hiring an <a href="http://www.chamilo.org/en/providers" target="_blank">official Chamilo provider</a>. They will make sure
-you get the best our of your Chamilo migration.
+
 <br />
 
 <span class="muted">* Styles and images are located in the main/css or main/img
@@ -423,52 +412,11 @@ to the old ones which will be deprecated shortly (not maintained).</span>
 
 <p></p>
 
-<h3>3.4 Upgrading from Dok€os 1.6.x</h3>
-
-
-<em>If you upgrade from a lower version of Dok€os (1.6.x)</em>, the first
-and most important thing to do is to *move* your current directory to another
-place.<br />
-An easy way to do that is to create a subdirectory called "old_version"
-in your current Chamilo/Dok€os directory and move everything in there using a
-simple "move" command (i.e. under Linux: mkdir old_version; mv *
-old_verion/), then make the old_version/ directory writeable by the web
-server so that courses/ and upload/ directories can be moved from the
-old to the new installation.<br />
-<br />
-The complete process is as follow:
-<ul>
-  <li> move the current Dok€os directory contents to a subdirectory called
-    <em>old_version</em> and make it writeable by the web server. This
-is important to allow the move of the courses/ and upload/ directories
-to the new install</li>
-  <li> download the Chamilo 1.10 install package from the
-    <a href="http://www.chamilo.org/download">Chamilo download page</a></li>
-  <li> unzip the new files of Chamilo 1.10 in the main Chamilo/Dok€os directory. The
-new directory <em>main</em> should be located directly inside your
-Chamilo/Dok€os root folder</li>
-  <li> point your browser on your portal URL</li>
-  <li> choose your language and click&nbsp;<span style="font-style: italic;">Upgrade from 1.6.x</span> and confirm the
-current directory of the old version</li>
-  <li> clean your archive/ directory: take a temporary copy of index.html, delete all the contents *in* this directory (do NOT remove the directory itself, only its contents!). It will all be re-generated. You can also delete the contents of this directory through the "Archive directory cleanup" option in the "System" box of the Administration page.</li>
-</ul>
-
-<br />
-
-<p class="muted"> NOTE: The upgrade from 1.6.x to 1.8.x implies a revision of
-the customised graphics and styles. The new version uses a complete new
-set of icons and styles, which means the ones from version 1.6 cannot be
-simply reused. The good news is the version 1.8.x allows you to create
-your own style in a separate css folder, that you can then reuse through
-all the 1.8.x versions
-</p>
-
 <p>
 <b>WARNING:</b><br />
 
-Do not delete the previous Chamilo/Dok€os installation directory before installing
-the new one. When the update is successfully finished, you can remove
-the old path.</p>
+Do not delete the previous Chamilo installation directory before installing
+the new one. The upgrade process should take care of (=delete) all unrequired folders.</p>
 
 
 <p class="muted">
@@ -482,19 +430,16 @@ choose "Configure the homepage" in the Chamilo administration section.</p>
 
 The following directories need to be readable, writeable and executable for the web server:
 <ul>
-    <li>[chamilo]/app/config/</li>
-    <li>[chamilo]/app/upload/users/</li>
-    <li>[chamilo]/app/upload/sessions/</li>
-    <li>[chamilo]/app/upload/courses/</li>
-    <li>[chamilo]/app/cache/</li>
-    <li>[chamilo]/app/courses/</li>
-    <li>[chamilo]/app/home/</li>
-    <li>[chamilo]/app/logs/</li>
+    <li>[chamilo]/main/lang/ (in order to delete unnecessary language files)</li>
+    <li>[chamilo]/courses/ (in order to move the courses files to the app/courses folder)</li>
+    <li>[chamilo]/archive/ (in order to remove unnecessary files or move them to app/cache/)</li>
+    <li>[chamilo]/home/ (in order to move files to app/home)</li>
+    <li>[chamilo]/app</li>
     <li>[chamilo]/main/default_course_document/images/</li>
 </ul>
 On Linux, Mac OS X and BSD operating systems you can quick-fix this using the
 <em>chmod 0777</em> command, but if you are unsure, we recommend you seek advice for
-your own OS on <a href="http://www.chamilo.org/forum">our forum</a>.
+your own OS on <a href="https://chamilo.org/forum">our forum</a>.
 In Windows, you may need to check the properties of the folders.
 <p></p>
 <h3>3.6 Quick-upgrade from 1.9.x guide for Linux</h3>
@@ -518,11 +463,12 @@ On the command-line, type:
   <li>mkdir /var/www/chamilo/old_version</li>
   <li>mv /var/www/chamilo/* /var/www/chamilo/old_version/</li>
   <li>chmod -R 0777 /var/www/chamilo/old_version/</li>
-  <li>wget https://github.com/chamilo/chamilo-lms/archive/v1.9.10.tar.gz</li>
-  <li>tar zxvf chamilo-lms-1.9.10.tar.gz</li>
-  <li>sudo cp -ra chamilo-lms-1.9.10/* /var/www/chamilo/</li>
-  <li>rm chamilo-lms-1.9.10.tar.gz</li>
-  <li>sudo rm -r chamilo-lms-1.9.10/</li>
+  <li>wget https://github.com/chamilo/chamilo-lms/archive/v1.10.0.tar.gz</li>
+  <li>tar zxvf chamilo-lms-1.10.0.tar.gz</li>
+  <li>sudo cp -ra chamilo-lms-1.10.0/* /var/www/chamilo/</li>
+  <li>sudo cp -ra chamilo-lms-1.10.0/.* /var/www/chamilo/</li>
+  <li>rm chamilo-lms-1.10.0.tar.gz</li>
+  <li>sudo rm -r chamilo-lms-1.10.0/</li>
 </ul>
 
 <br />

+ 82 - 79
main/admin/access_url_edit.php

@@ -1,9 +1,9 @@
 <?php
 /* For licensing terms, see /license.txt */
 /**
-*	@package chamilo.admin
-*	@author Julio Montoya <gugli100@gmail.com>
-*/
+ * 	@package chamilo.admin
+ * 	@author Julio Montoya <gugli100@gmail.com>
+ */
 $cidReset = true;
 require_once '../inc/global.inc.php';
 $this_section = SECTION_PLATFORM_ADMIN;
@@ -26,107 +26,110 @@ if ($form->validate()) {
         $description = Security::remove_XSS($url_array['description']);
         $active = intval($url_array['active']);
         $url_id = $url_array['id'];
-        $url_to_go='access_urls.php';
+        $url_to_go = 'access_urls.php';
         if ($url_id != '') {
             //we can't change the status of the url with id=1
             if ($url_id == 1) {
                 $active = 1;
             }
             //checking url
-            if (substr($url, strlen($url)-1, strlen($url)) == '/') {
+            if (substr($url, strlen($url) - 1, strlen($url)) == '/') {
                 UrlManager::update($url_id, $url, $description, $active);
             } else {
-                UrlManager::update($url_id, $url.'/', $description, $active);
+                UrlManager::update($url_id, $url . '/', $description, $active);
             }
             // URL Images
-            $url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/';
+            $url_images_dir = api_get_path(SYS_PATH) . 'custompages/url-images/';
             $image_fields = array("url_image_1", "url_image_2", "url_image_3");
             foreach ($image_fields as $image_field) {
                 if ($_FILES[$image_field]['error'] == 0) {
                     // Hardcoded: only PNG files allowed
                     if (end(explode('.', $_FILES[$image_field]['name'])) == 'png') {
+                        if (file_exists($url_images_dir . $url_id . '_' . $image_field . '.png')) {
+                            // if the file exists, we have to remove it before move_uploaded_file
+                            unlink($url_images_dir . $url_id . '_' . $image_field . '.png');
+                        }
                         move_uploaded_file(
-                            $_FILES[$image_field]['tmp_name'],
-                            $url_images_dir.$url_id.'_'.$image_field.'.png'
+                            $_FILES[$image_field]['tmp_name'], $url_images_dir . $url_id . '_' . $image_field . '.png'
                         );
                     }
                     // else fail silently
                 }
                 // else fail silently
             }
-            $url_to_go='access_urls.php';
-            $message=get_lang('URLEdited');
-		} else {
-			$num = UrlManager::url_exist($url);
-			if ($num == 0) {
+            $url_to_go = 'access_urls.php';
+            $message = get_lang('URLEdited');
+        } else {
+            $num = UrlManager::url_exist($url);
+            if ($num == 0) {
                 // checking url
-				if (substr($url, strlen($url)-1, strlen($url))=='/') {
-					UrlManager::add($url, $description, $active);
-				} else {
-					//create
-					UrlManager::add($url.'/', $description, $active);
-				}
-				$message = get_lang('URLAdded');
-				$url_to_go='access_urls.php';
-			} else {
-				$url_to_go='access_url_edit.php';
-				$message = get_lang('URLAlreadyAdded');
-			}
-			// URL Images
-			$url .= (substr($url,strlen($url)-1, strlen($url))=='/') ? '' : '/';
-			$url_id = UrlManager::get_url_id($url);
-			$url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/';
-			$image_fields = array("url_image_1", "url_image_2", "url_image_3");
-			foreach ($image_fields as $image_field) {
-				if ($_FILES[$image_field]['error'] == 0) {
-					// Hardcoded: only PNG files allowed
-					if (end(explode('.', $_FILES[$image_field]['name'])) == 'png') {
-						move_uploaded_file($_FILES[$image_field]['tmp_name'], $url_images_dir.$url_id.'_'.$image_field.'.png');
-					}
-					// else fail silently
-				}
-				// else fail silently
-			}
-		}
-		Security::clear_token();
-		$tok = Security::get_token();
-		header('Location: '.$url_to_go.'?action=show_message&message='.urlencode($message).'&sec_token='.$tok);
-		exit();
-	}
+                if (substr($url, strlen($url) - 1, strlen($url)) == '/') {
+                    UrlManager::add($url, $description, $active);
+                } else {
+                    //create
+                    UrlManager::add($url . '/', $description, $active);
+                }
+                $message = get_lang('URLAdded');
+                $url_to_go = 'access_urls.php';
+            } else {
+                $url_to_go = 'access_url_edit.php';
+                $message = get_lang('URLAlreadyAdded');
+            }
+            // URL Images
+            $url .= (substr($url, strlen($url) - 1, strlen($url)) == '/') ? '' : '/';
+            $url_id = UrlManager::get_url_id($url);
+            $url_images_dir = api_get_path(SYS_PATH) . 'custompages/url-images/';
+            $image_fields = array("url_image_1", "url_image_2", "url_image_3");
+            foreach ($image_fields as $image_field) {
+                if ($_FILES[$image_field]['error'] == 0) {
+                    // Hardcoded: only PNG files allowed
+                    if (end(explode('.', $_FILES[$image_field]['name'])) == 'png') {
+                        move_uploaded_file($_FILES[$image_field]['tmp_name'], $url_images_dir . $url_id . '_' . $image_field . '.png');
+                    }
+                    // else fail silently
+                }
+                // else fail silently
+            }
+        }
+        Security::clear_token();
+        $tok = Security::get_token();
+        header('Location: ' . $url_to_go . '?action=show_message&message=' . urlencode($message) . '&sec_token=' . $tok);
+        exit();
+    }
 } else {
-	if(isset($_POST['submit'])) {
-		Security::clear_token();
-	}
-	$token = Security::get_token();
-	$form->addElement('hidden','sec_token');
-	$form->setConstants(array('sec_token' => $token));
+    if (isset($_POST['submit'])) {
+        Security::clear_token();
+    }
+    $token = Security::get_token();
+    $form->addElement('hidden', 'sec_token');
+    $form->setConstants(array('sec_token' => $token));
 }
 
-$form->addElement('text','url', 'URL', array('class'=>'span6'));
+$form->addElement('text', 'url', 'URL', array('class' => 'span6'));
 $form->addRule('url', get_lang('ThisFieldIsRequired'), 'required');
-$form->addRule('url', '', 'maxlength',254);
-$form->addElement('textarea','description',get_lang('Description'));
+$form->addRule('url', '', 'maxlength', 254);
+$form->addElement('textarea', 'description', get_lang('Description'));
 
 //the first url with id = 1 will be always active
 if (isset($_GET['url_id']) && $_GET['url_id'] != 1) {
-    $form->addElement('checkbox','active', null, get_lang('Active'));
+    $form->addElement('checkbox', 'active', null, get_lang('Active'));
 }
 
-$defaults['url']='http://';
+$defaults['url'] = 'http://';
 $form->setDefaults($defaults);
 
 $submit_name = get_lang('AddUrl');
 if (isset($_GET['url_id'])) {
-	$url_id = intval($_GET['url_id']);
-	$num_url_id = UrlManager::url_id_exist($url_id);
-	if($num_url_id != 1) {
-		header('Location: access_urls.php');
-		exit();
-	}
-	$url_data = UrlManager::get_url_data_from_id($url_id);
-	$form->addElement('hidden','id',$url_data['id']);
-	$form->setDefaults($url_data);
-	$submit_name = get_lang('AddUrl');
+    $url_id = intval($_GET['url_id']);
+    $num_url_id = UrlManager::url_id_exist($url_id);
+    if ($num_url_id != 1) {
+        header('Location: access_urls.php');
+        exit();
+    }
+    $url_data = UrlManager::get_url_data_from_id($url_id);
+    $form->addElement('hidden', 'id', $url_data['id']);
+    $form->setDefaults($url_data);
+    $submit_name = get_lang('AddUrl');
 }
 
 if (!api_is_multiple_url_enabled()) {
@@ -135,23 +138,23 @@ if (!api_is_multiple_url_enabled()) {
 }
 
 $tool_name = get_lang('AddUrl');
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
-$interbreadcrumb[] = array ("url" => 'access_urls.php', "name" => get_lang('MultipleAccessURLs'));
+$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
+$interbreadcrumb[] = array("url" => 'access_urls.php', "name" => get_lang('MultipleAccessURLs'));
 
 Display :: display_header($tool_name);
 
-if (isset ($_GET['action'])) {
-	switch ($_GET['action']) {
-		case 'show_message' :
-			Display :: display_normal_message(stripslashes($_GET['message']));
-			break;
-	}
+if (isset($_GET['action'])) {
+    switch ($_GET['action']) {
+        case 'show_message' :
+            Display :: display_normal_message(stripslashes($_GET['message']));
+            break;
+    }
 }
 
 // URL Images
-$form->addElement('file','url_image_1','URL Image 1 (PNG)');
-$form->addElement('file','url_image_2','URL Image 2 (PNG)');
-$form->addElement('file','url_image_3','URL Image 3 (PNG)');
+$form->addElement('file', 'url_image_1', 'URL Image 1 (PNG)');
+$form->addElement('file', 'url_image_2', 'URL Image 2 (PNG)');
+$form->addElement('file', 'url_image_3', 'URL Image 3 (PNG)');
 
 // Submit button
 $form->addButtonCreate($submit_name);

+ 3 - 0
main/inc/ajax/chat.ajax.php

@@ -46,6 +46,9 @@ if (!isset($_SESSION['openChatBoxes'])) {
 }
 
 $chat = new Chat();
+if (chat::disableChat()){
+    exit;
+}
 if ($chat->is_chat_blocked_by_exercises()) {
     // Disconnecting the user
     $chat->setUserStatus(0);

+ 28 - 1
main/inc/lib/chat.lib.php

@@ -272,7 +272,34 @@ class Chat extends Model
 
         return $text;
     }
-
+    
+    /**
+     * SET Disable Chat
+     * @param boolean status to disable chat
+     * @return void
+     */
+    public static function setDisableChat($status = true)
+    {
+        $_SESSION['disable_chat'] = $status;
+    }
+    
+    /**
+     * Disable Chat - disable the chat
+     * @return boolean - return true if setDisableChat status is true
+     */
+    public static function disableChat()
+    {
+        if (!empty($_SESSION['disable_chat'])){
+            $status = $_SESSION['disable_chat'];
+            if ($status == true){
+                $_SESSION['disable_chat'] = null;
+                return true;
+            }
+        }
+         
+         return false;
+    }
+    
     public function is_chat_blocked_by_exercises()
     {
         if (isset($_SESSION['current_exercises'])) {

+ 1 - 1
main/inc/lib/elfinder/filemanager.php

@@ -2,6 +2,6 @@
 /* For licensing terms, see /license.txt */
 
 require_once '../../global.inc.php';
-
+Chat::setDisableChat();
 $template = new Template();
 $template->display('default/javascript/editor/ckeditor/elfinder.tpl');

+ 1 - 0
main/inc/lib/social.lib.php

@@ -1878,6 +1878,7 @@ class SocialManager extends UserManager
                 'style' => 'width : 100%'
             ]
         );
+        $form->addHtml('<div class="form-group "><div class="url_preview col-md-9 panel-body"></div></div>');
         $form->addHidden('url_content', '');
         $form->addButtonSend(get_lang('Post'));
         $html = Display::panel($form->returnForm(), get_lang('SocialWall'));

+ 1 - 1
main/install/configuration.dist.php

@@ -147,7 +147,7 @@ $_configuration['session_lifetime'] = SESSION_LIFETIME;
 // Activation for multi-url access
 //$_configuration['multiple_access_urls'] = true;
 $_configuration['software_name'] = 'Chamilo';
-$_configuration['software_url'] = 'http://www.chamilo.org/';
+$_configuration['software_url'] = 'https://chamilo.org/';
 //Deny the elimination of users
 $_configuration['deny_delete_users'] = false;
 // Version settings

+ 1 - 1
main/install/index.php

@@ -547,7 +547,7 @@ if (@$_POST['step2']) {
 
         // For version 1.9
         $urlForm = $_configuration['root_web'];
-        $encryptPassForm = get_config_param('userPasswordCrypted');
+        $encryptPassForm = get_config_param('password_encryption');
         // Managing the $encryptPassForm
         if ($encryptPassForm == '1') {
             $encryptPassForm = 'sha1';

+ 7 - 2
main/install/install.lib.php

@@ -1688,8 +1688,13 @@ function display_configuration_settings_form(
     $html .= '<div class="form-group">';
     $html .= '<label class="col-sm-6 control-label">'. get_lang('AllowSelfRegProf') .'</label>
         <div class="col-sm-6">';
-    if ($installType == 'update'){
-        $html .= '<input type="hidden" name="allowSelfRegProf" value="'. $allowSelfRegProf.'" />'. $allowSelfRegProf? get_lang('Yes') : get_lang('No');
+    if ($installType == 'update') {
+        if ($allowSelfRegProf == 'true') {
+            $label = get_lang('Yes');
+        } else {
+            $label = get_lang('No');
+        }
+        $html .= '<input type="hidden" name="allowSelfRegProf" value="'. $allowSelfRegProf.'" />'. $label;
     } else {
         $html .= '<div class="control-group">
                 <label class="checkbox-inline">