svn: /web/doc-editor/trunk/php/ RepositoryFetcher.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Thu, 21 Jul 2011 23:05:11 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=313566

Log:
Add icon to work in progress module to reflect authService used

Changed paths:
    U   web/doc-editor/trunk/php/RepositoryFetcher.php

Modified: web/doc-editor/trunk/php/RepositoryFetcher.php
===================================================================
--- web/doc-editor/trunk/php/RepositoryFetcher.php	2011-07-21 23:02:42 UTC (rev 313565)
+++ web/doc-editor/trunk/php/RepositoryFetcher.php	2011-07-21 23:05:11 UTC (rev 313566)
@@ -990,6 +990,19 @@
                 // $userInfo[1] => anonymousIdent
                 $userInfo = explode('@|@',$user);

+                // Get authService from anonymousIdent
+                $tmp = explode('-', $userInfo[1]);
+                if( isset($tmp[1]) ) $authService = $tmp[0];
+                else $authService = false;
+
+                if( $authService == 'google' ) {
+                    $iconUser = 'iconGoogle';
+                } else if( $authService == 'facebook' ) {
+                    $iconUser = 'iconFacebook';
+                } else {
+                    $iconUser = 'iconUser';
+                }
+
                 if( $userInfo[0] == $vcsLogin && $userInfo[1] == $anonymousIdent ) {
                     $expanded  = 'true';
                 } else {
@@ -1000,7 +1013,7 @@
                 $email = ($email) ? $email : 'false';

                 // We put nbFiles into user's nodes to not have to count it by the client
-                $result .= "{task:'".$userInfo[0]."',type:'user',isAnonymous:".(($am->anonymous($userInfo[0], $userInfo[1])) ? 'true' : 'false').",email:'".$email."', iconCls:'iconUser',expanded:".$expanded.",children:[";
+                $result .= "{task:'".$userInfo[0]."',type:'user',isAnonymous:".(($am->anonymous($userInfo[0], $userInfo[1])) ? 'true' : 'false').",email:'".$email."', iconCls:'".$iconUser."',expanded:".$expanded.",children:[";

                     // We now walk into the folders for this users
                     while( list($folder, $dataFiles) = each($dataFolders)) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.