فهرست منبع

Issue #235: ajout d'une condition pour Persona

Si la connexion n'est pas paramétrée, on ne charge pas Persona
Marien Fressinaud 12 سال پیش
والد
کامیت
0382f4b152
2فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 2 1
      app/views/javascript/main.phtml
  2. 3 1
      public/scripts/main.js

+ 2 - 1
app/views/javascript/main.phtml

@@ -23,7 +23,8 @@
 	if ($mail != 'null') {
 		$mail = '"' . $mail . '"';
 	}
-	echo ',url_freshrss="', _url ('index', 'index'), '",',
+	echo ',use_persona=', login_is_conf ($this->conf) ? 'true' : 'false',
+		',url_freshrss="', _url ('index', 'index'), '",',
 		'url_login="', _url ('index', 'login'), '",',
 		'url_logout="', _url ('index', 'logout'), '",',
 		'current_user_mail=', $mail, ";\n";

+ 3 - 1
public/scripts/main.js

@@ -593,7 +593,9 @@ function init_all() {
 	init_notifications();
 	init_actualize();
 	init_load_more();
-	init_persona();
+	if (use_persona) {
+		init_persona();
+	}
 	if (window.console) {
 		console.log('FreshRSS init done.');
 	}