[Pkg-owncloud-commits] [owncloud] 330/394: backport #1357 to stable45

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:12:42 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.

commit 41c4cb9089c8598b2a9fabd4d695ac087dfeb49d
Author: Thomas Mueller <thomas.mueller at tmit.eu>
Date:   Wed Feb 6 16:28:04 2013 +0100

    backport #1357 to stable45
---
 core/css/styles.css      |    4 ++++
 core/templates/login.php |   12 ++++++++++++
 lib/app.php              |    9 +++++++++
 lib/util.php             |    1 +
 4 files changed, 26 insertions(+)

diff --git a/core/css/styles.css b/core/css/styles.css
index 35ef8c3..9d403af 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -178,3 +178,7 @@ a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padd
 div.crumb { float:left; display:block; background:no-repeat right 0; padding:.75em 1.5em 0 1em; height:2.9em; }
 div.crumb:first-child { padding-left:1em; }
 div.crumb.last { font-weight:bold; }
+
+/* Alternative Logins */
+#alternative-logins legend { margin-bottom:10px; }
+#alternative-logins li { height:40px; display:inline-block; white-space:nowrap; }
diff --git a/core/templates/login.php b/core/templates/login.php
index bb7a833..2826472 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -17,3 +17,15 @@
 		<input type="submit" id="submit" class="login" value="<?php echo $l->t( 'Log in' ); ?>" />
 	</fieldset>
 </form>
+<?php if (!empty($_['alt_login'])) { ?>
+<form id="alternative-logins">
+	<fieldset>
+		<legend><?php echo $l->t('Alternative Logins') ?></legend>
+		<ul>
+			<? foreach($_['alt_login'] as $login): ?>
+			<li><a class="button" href="<?php echo $login['href']; ?>" ><?php echo $login['name']; ?></a></li>
+			<?php endforeach; ?>
+		</ul>
+	</fieldset>
+</form>
+<?php }
diff --git a/lib/app.php b/lib/app.php
index 5551c11..e0a99cf 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -36,6 +36,7 @@ class OC_App{
 	static private $appTypes = array();
 	static private $loadedApps = array();
 	static private $checkedApps = array();
+	static private $altLogin = array();
 
 	/**
 	 * @brief loads all apps
@@ -539,6 +540,14 @@ class OC_App{
 		self::$personalForms[]= $app.'/'.$page.'.php';
 	}
 
+	public static function registerLogIn($entry) {
+		self::$altLogin[] = $entry;
+	}
+
+	public static function getAlternativeLogIns() {
+		return self::$altLogin;
+	}
+
 	/**
 	 * @brief: get a list of all apps in the apps folder
 	 * @return array or app names (string IDs)
diff --git a/lib/util.php b/lib/util.php
index 75cc160..f1aa94e 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -342,6 +342,7 @@ class OC_Util {
 			$redirect_url = $_SERVER['REQUEST_URI'];
 		}
 		$parameters['redirect_url'] = $redirect_url;
+		$parameters['alt_login'] = OC_App::getAlternativeLogIns();
 		OC_Template::printGuestPage("", "login", $parameters);
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list