Skip to content
This repository

See comments in commits... #7

Merged
merged 3 commits into from over 2 years ago

2 participants

miiihi Hamish Campbell
miiihi

No description provided.

Hamish Campbell hamishcampbell merged commit 99c74e6 into from
Hamish Campbell hamishcampbell closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
13  code/ExternalAuthenticatedRole.php
@@ -63,11 +63,16 @@ function augmentDatabase() {
63 63
      * to edit the new database fields.
64 64
      */
65 65
     function updateCMSFields(FieldSet &$fields) {
66  
-        $sources    = ExternalAuthenticator::getIDandNames();
  66
+    	// let make sure, this runs only once (because member and dataobject both extend updateCMSFields
  67
+    	// 	making it run twice!)
  68
+    	$cp = $fields->fieldByName('Root');
  69
+    	if ($cp && $cp->fieldByName('ExternalAuthentication')) return;
  70
+
  71
+    	$sources    = ExternalAuthenticator::getIDandNames();
67 72
         $sources    = array_merge(array("" => "-"), $sources);
68  
-        $fields->addFieldToTab('Root.ExternalAuthentication', 
69  
-                               new HeaderField(_t('ExternalAuthenticator.ModFormHead',
70  
-                                                  'ID for external authentication source')));
  73
+		$fields->findOrMakeTab('Root.ExternalAuthentication', _t('ExternalAuthenticator.Title'));
  74
+        $fields->addFieldToTab('Root.ExternalAuthentication',
  75
+        						new HeaderField('External_Header', _t('ExternalAuthenticator.ModFormHead','ID for external authentication source')));
71 76
         $fields->addFieldToTab('Root.ExternalAuthentication', 
72 77
                                new LiteralField('ExternalDescription',_t('ExternalAuthenticator.EnterUser',
73 78
                                                 'Enter the user id and authentication source for this user'))
2  code/ExternalAuthenticator.php
@@ -721,7 +721,7 @@ private static function getMyGroup($source, $groupinsrc) {
721 721
       }
722 722
       
723 723
       // Now check if the group is valid     
724  
-      if ($group = DataObject::get_one('Group','"Group"."Title" = \'' . Convert::raw2sql($returngroup).'\'')) {
  724
+      if ($group = DataObject::get_one('Group','"Group"."Code" = \'' . Convert::raw2sql($returngroup).'\'')) {
725 725
           return $group;
726 726
       } else {
727 727
           return false;
14  lang/sl_SI.php
@@ -2,20 +2,20 @@
2 2
 
3 3
 global $lang;
4 4
 
5  
-$lang['sl_SI']['ExternalAuthenticator']['ModFormHead'] = 'ID za zunanjo avtentikacijo vira';
6  
-$lang['sl_SI']['ExternalAuthenticator']['EnterUser'] = 'ID-uporabnika in vir za avtentikacijo tega uporabnika';
7  
-$lang['sl_SI']['ExternalAuthenticator']['EnterNewId'] = 'ID mora biti uporabljen s tem virom';
  5
+$lang['sl_SI']['ExternalAuthenticator']['ModFormHead'] = 'Povezava z virom zunanje avtentikacije';
  6
+$lang['sl_SI']['ExternalAuthenticator']['EnterUser'] = 'Izberite vir zunanje avtentikacije in uporabniško ime (ID), ki ga ta uporabnik uporablja na tem viru';
  7
+$lang['sl_SI']['ExternalAuthenticator']['EnterNewId'] = 'Uporabniško ime (ID) na zunanjem viru';
8 8
 $lang['sl_SI']['ExternalAuthenticator']['UserExists'] = 'Uporabnik s tem uporabniškim imenom že obstaja';
9 9
 $lang['sl_SI']['ExternalAuthenticator']['Failed'] = 'Avtentikacija ni uspela';
10 10
 $lang['sl_SI']['ExternalAuthenticator']['EnterUID'] = 'Vpišite %s';
11  
-$lang['sl_SI']['ExternalAuthenticator']['MailAddr'] = 'e-naslov';
  11
+$lang['sl_SI']['ExternalAuthenticator']['MailAddr'] = 'E-naslov';
12 12
 $lang['sl_SI']['ExternalAuthenticator']['EnterMailAddr'] = 'Vpišite e-naslov';
13 13
 $lang['sl_SI']['ExternalAuthenticator']['GroupExists'] = 'Uporabniški račun s tem e-naslovom že obstaja';
14  
-$lang['sl_SI']['ExternalAuthenticator']['Title'] = 'Zunanji dostop';
  14
+$lang['sl_SI']['ExternalAuthenticator']['Title'] = 'Zunanja avtentikacija';
15 15
 $lang['sl_SI']['ExternalAuthenticator']['LogOutIn'] = 'Prijavite se z drugim uporabniškim računom';
16 16
 $lang['sl_SI']['ExternalAuthenticator']['Password'] = 'Geslo';
17  
-$lang['sl_SI']['ExternalAuthenticator']['Remember'] = 'Zapomni si me na tem računalniku';
18  
-$lang['sl_SI']['ExternalAuthenticator']['Sources'] = 'Avtentikacija virov';
  17
+$lang['sl_SI']['ExternalAuthenticator']['Remember'] = 'Zapomni si me do prihodnjič';
  18
+$lang['sl_SI']['ExternalAuthenticator']['Sources'] = 'Zunanji vir';
19 19
 $lang['sl_SI']['ExternalAuthenticator']['Login'] = 'Prijava';
20 20
 $lang['sl_SI']['ExternalAuthenticator']['LogFailed'] = 'Dostop do poročil o odpravi napak ni možen';
21 21
 $lang['sl_SI']['FTP_Authenticator']['NoConnect'] = 'Nimam povezave s FTP-strežnikom';
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.