]> git.mjollnir.org Git - moodle.git/commitdiff
fixing syntex errors
authortoyomoyo <toyomoyo>
Thu, 21 Sep 2006 02:03:39 +0000 (02:03 +0000)
committertoyomoyo <toyomoyo>
Thu, 21 Sep 2006 02:03:39 +0000 (02:03 +0000)
backup/backuplib.php

index 3df72f929252bfc366949311757ff85834ec0499..9264fb450c65c7b1d2ad78e833388be0f15e2b04 100644 (file)
                fwrite ($bf,start_tag("ROLE_CAPABILITIES",6,true));
                // foreach role that has an override in this context
                    foreach ($roles as $role) {
-                       fwrite ($bf, start_tag("ROLE", 7, true, array('name'=>$role->name);
+                       fwrite ($bf, start_tag("ROLE", 7, true, array('name'=>$role->name)));
                        $capabilities = get_records_sql("SELECT * 
                                                        FROM {$CFG->prefix}role_capabilities
                                                        WHERE contextid = $context->id
                            fwrite ($bf, full_tag("NAME", 8, $capability->capability));
                            fwrite ($bf, full_tag("VALUE", 8, $capability->value));
                        }
-                       fwrite ($bf, end_tag("ROLE", 7, true);
+                       fwrite ($bf, end_tag("ROLE", 7, true));
                    }
                fwrite ($bf,end_tag("ROLE_CAPABILITIES",6,true));
                fwrite ($bf,end_tag("MOD",5,true));
                     fwrite ($bf,start_tag("ROLES",4,true));
                     //PRINT ROLE INFO
                     //Admins
-                    $roles = explode(",", $user->info) {
-                        foreach ($roles as $role) {
-                            if ($role!="" && $role!="needed") {
-                                fwrite ($bf,start_tag("ROLE",5,true));
-                                //Print Role info
-                                fwrite ($bf,full_tag("TYPE",6,false,$role));
-                                //Print ROLE end
-                                fwrite ($bf,end_tag("ROLE",5,true)); 
-                            }  
-                        }
+                    $roles = explode(",", $user->info);
+                    foreach ($roles as $role) {
+                        if ($role!="" && $role!="needed") {
+                            fwrite ($bf,start_tag("ROLE",5,true));
+                            //Print Role info
+                            fwrite ($bf,full_tag("TYPE",6,false,$role));
+                            //Print ROLE end
+                            fwrite ($bf,end_tag("ROLE",5,true)); 
+                        }  
                     }
+
                     /*
                     if ($user->isadmin!==false) {
                         //Print ROLE start