@@ -32,104 +32,104 @@ |
||
| 32 | 32 | class GraphUser extends GraphObject |
| 33 | 33 | { |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Returns the ID for the user as a string if present. |
|
| 37 | - * |
|
| 38 | - * @return string|null |
|
| 39 | - */ |
|
| 40 | - public function getId() |
|
| 41 | - { |
|
| 35 | + /** |
|
| 36 | + * Returns the ID for the user as a string if present. |
|
| 37 | + * |
|
| 38 | + * @return string|null |
|
| 39 | + */ |
|
| 40 | + public function getId() |
|
| 41 | + { |
|
| 42 | 42 | return $this->getProperty('id'); |
| 43 | - } |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Returns the name for the user as a string if present. |
|
| 47 | - * |
|
| 48 | - * @return string|null |
|
| 49 | - */ |
|
| 50 | - public function getName() |
|
| 51 | - { |
|
| 45 | + /** |
|
| 46 | + * Returns the name for the user as a string if present. |
|
| 47 | + * |
|
| 48 | + * @return string|null |
|
| 49 | + */ |
|
| 50 | + public function getName() |
|
| 51 | + { |
|
| 52 | 52 | return $this->getProperty('name'); |
| 53 | - } |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - public function getEmail() |
|
| 56 | - { |
|
| 55 | + public function getEmail() |
|
| 56 | + { |
|
| 57 | 57 | return $this->getProperty('email'); |
| 58 | - } |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * Returns the first name for the user as a string if present. |
|
| 62 | - * |
|
| 63 | - * @return string|null |
|
| 64 | - */ |
|
| 65 | - public function getFirstName() |
|
| 66 | - { |
|
| 60 | + /** |
|
| 61 | + * Returns the first name for the user as a string if present. |
|
| 62 | + * |
|
| 63 | + * @return string|null |
|
| 64 | + */ |
|
| 65 | + public function getFirstName() |
|
| 66 | + { |
|
| 67 | 67 | return $this->getProperty('first_name'); |
| 68 | - } |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * Returns the middle name for the user as a string if present. |
|
| 72 | - * |
|
| 73 | - * @return string|null |
|
| 74 | - */ |
|
| 75 | - public function getMiddleName() |
|
| 76 | - { |
|
| 70 | + /** |
|
| 71 | + * Returns the middle name for the user as a string if present. |
|
| 72 | + * |
|
| 73 | + * @return string|null |
|
| 74 | + */ |
|
| 75 | + public function getMiddleName() |
|
| 76 | + { |
|
| 77 | 77 | return $this->getProperty('middle_name'); |
| 78 | - } |
|
| 78 | + } |
|
| 79 | 79 | |
| 80 | - /** |
|
| 81 | - * Returns the last name for the user as a string if present. |
|
| 82 | - * |
|
| 83 | - * @return string|null |
|
| 84 | - */ |
|
| 85 | - public function getLastName() |
|
| 86 | - { |
|
| 80 | + /** |
|
| 81 | + * Returns the last name for the user as a string if present. |
|
| 82 | + * |
|
| 83 | + * @return string|null |
|
| 84 | + */ |
|
| 85 | + public function getLastName() |
|
| 86 | + { |
|
| 87 | 87 | return $this->getProperty('last_name'); |
| 88 | - } |
|
| 88 | + } |
|
| 89 | 89 | |
| 90 | - /** |
|
| 91 | - * Returns the gender for the user as a string if present. |
|
| 92 | - * |
|
| 93 | - * @return string|null |
|
| 94 | - */ |
|
| 95 | - public function getGender() |
|
| 96 | - { |
|
| 90 | + /** |
|
| 91 | + * Returns the gender for the user as a string if present. |
|
| 92 | + * |
|
| 93 | + * @return string|null |
|
| 94 | + */ |
|
| 95 | + public function getGender() |
|
| 96 | + { |
|
| 97 | 97 | return $this->getProperty('gender'); |
| 98 | - } |
|
| 98 | + } |
|
| 99 | 99 | |
| 100 | - /** |
|
| 101 | - * Returns the Facebook URL for the user as a string if available. |
|
| 102 | - * |
|
| 103 | - * @return string|null |
|
| 104 | - */ |
|
| 105 | - public function getLink() |
|
| 106 | - { |
|
| 100 | + /** |
|
| 101 | + * Returns the Facebook URL for the user as a string if available. |
|
| 102 | + * |
|
| 103 | + * @return string|null |
|
| 104 | + */ |
|
| 105 | + public function getLink() |
|
| 106 | + { |
|
| 107 | 107 | return $this->getProperty('link'); |
| 108 | - } |
|
| 108 | + } |
|
| 109 | 109 | |
| 110 | - /** |
|
| 111 | - * Returns the users birthday, if available. |
|
| 112 | - * |
|
| 113 | - * @return \DateTime|null |
|
| 114 | - */ |
|
| 115 | - public function getBirthday() |
|
| 116 | - { |
|
| 110 | + /** |
|
| 111 | + * Returns the users birthday, if available. |
|
| 112 | + * |
|
| 113 | + * @return \DateTime|null |
|
| 114 | + */ |
|
| 115 | + public function getBirthday() |
|
| 116 | + { |
|
| 117 | 117 | $value = $this->getProperty('birthday'); |
| 118 | 118 | if ($value) { |
| 119 | - return new \DateTime($value); |
|
| 119 | + return new \DateTime($value); |
|
| 120 | 120 | } |
| 121 | 121 | return null; |
| 122 | - } |
|
| 122 | + } |
|
| 123 | 123 | |
| 124 | - /** |
|
| 125 | - * Returns the current location of the user as a FacebookGraphLocation |
|
| 126 | - * if available. |
|
| 127 | - * |
|
| 128 | - * @return GraphLocation|null |
|
| 129 | - */ |
|
| 130 | - public function getLocation() |
|
| 131 | - { |
|
| 124 | + /** |
|
| 125 | + * Returns the current location of the user as a FacebookGraphLocation |
|
| 126 | + * if available. |
|
| 127 | + * |
|
| 128 | + * @return GraphLocation|null |
|
| 129 | + */ |
|
| 130 | + public function getLocation() |
|
| 131 | + { |
|
| 132 | 132 | return $this->getProperty('location', GraphLocation::className()); |
| 133 | - } |
|
| 133 | + } |
|
| 134 | 134 | |
| 135 | 135 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | |
| 31 | 31 | if (version_compare(PHP_VERSION, '5.4.0', '<')) { |
| 32 | - throw new Exception('The Facebook SDK v4 requires PHP version 5.4 or higher.'); |
|
| 32 | + throw new Exception('The Facebook SDK v4 requires PHP version 5.4 or higher.'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -42,29 +42,29 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | spl_autoload_register(function ($class) |
| 44 | 44 | { |
| 45 | - // project-specific namespace prefix |
|
| 46 | - $prefix = 'Facebook\\'; |
|
| 45 | + // project-specific namespace prefix |
|
| 46 | + $prefix = 'Facebook\\'; |
|
| 47 | 47 | |
| 48 | - // base directory for the namespace prefix |
|
| 49 | - $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__ . '/src/Facebook/'; |
|
| 48 | + // base directory for the namespace prefix |
|
| 49 | + $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__ . '/src/Facebook/'; |
|
| 50 | 50 | |
| 51 | - // does the class use the namespace prefix? |
|
| 52 | - $len = strlen($prefix); |
|
| 53 | - if (strncmp($prefix, $class, $len) !== 0) { |
|
| 51 | + // does the class use the namespace prefix? |
|
| 52 | + $len = strlen($prefix); |
|
| 53 | + if (strncmp($prefix, $class, $len) !== 0) { |
|
| 54 | 54 | // no, move to the next registered autoloader |
| 55 | 55 | return; |
| 56 | - } |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - // get the relative class name |
|
| 59 | - $relative_class = substr($class, $len); |
|
| 58 | + // get the relative class name |
|
| 59 | + $relative_class = substr($class, $len); |
|
| 60 | 60 | |
| 61 | - // replace the namespace prefix with the base directory, replace namespace |
|
| 62 | - // separators with directory separators in the relative class name, append |
|
| 63 | - // with .php |
|
| 64 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
| 61 | + // replace the namespace prefix with the base directory, replace namespace |
|
| 62 | + // separators with directory separators in the relative class name, append |
|
| 63 | + // with .php |
|
| 64 | + $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
| 65 | 65 | |
| 66 | - // if the file exists, require it |
|
| 67 | - if (file_exists($file)) { |
|
| 66 | + // if the file exists, require it |
|
| 67 | + if (file_exists($file)) { |
|
| 68 | 68 | require $file; |
| 69 | - } |
|
| 69 | + } |
|
| 70 | 70 | }); |
| 71 | 71 | \ No newline at end of file |
@@ -28,14 +28,14 @@ |
||
| 28 | 28 | $loginLdapSucces = ldap_login($login, $password); |
| 29 | 29 | |
| 30 | 30 | if ($loginLdapSucces) { |
| 31 | - $loginFailed = false; |
|
| 32 | - $uidReset = true; |
|
| 33 | - $_user['user_id'] = $uData['user_id']; |
|
| 34 | - Session::write('_uid',$_uid); |
|
| 31 | + $loginFailed = false; |
|
| 32 | + $uidReset = true; |
|
| 33 | + $_user['user_id'] = $uData['user_id']; |
|
| 34 | + Session::write('_uid',$_uid); |
|
| 35 | 35 | // Jand: copied from event_login in events.lib.php to enable login statistics: |
| 36 | - Event::event_login($uData['user_id']); |
|
| 36 | + Event::event_login($uData['user_id']); |
|
| 37 | 37 | } else { |
| 38 | - $loginFailed = true; |
|
| 39 | - unset($_user['user_id']); |
|
| 40 | - $uidReset = false; |
|
| 38 | + $loginFailed = true; |
|
| 39 | + unset($_user['user_id']); |
|
| 40 | + $uidReset = false; |
|
| 41 | 41 | } |
@@ -17,10 +17,10 @@ |
||
| 17 | 17 | { |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * Store for User objects. Interact with the database. |
|
| 21 | - * |
|
| 22 | - * @return UserStore |
|
| 23 | - */ |
|
| 20 | + * Store for User objects. Interact with the database. |
|
| 21 | + * |
|
| 22 | + * @return UserStore |
|
| 23 | + */ |
|
| 24 | 24 | public static function store() |
| 25 | 25 | { |
| 26 | 26 | static $result = false; |
@@ -17,10 +17,10 @@ |
||
| 17 | 17 | { |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - * Store for Admin objects. Interact with the database. |
|
| 21 | - * |
|
| 22 | - * @return AdminStore |
|
| 23 | - */ |
|
| 20 | + * Store for Admin objects. Interact with the database. |
|
| 21 | + * |
|
| 22 | + * @return AdminStore |
|
| 23 | + */ |
|
| 24 | 24 | public static function store() |
| 25 | 25 | { |
| 26 | 26 | static $result = false; |
@@ -53,10 +53,10 @@ |
||
| 53 | 53 | $table_header[] = array('tag', true); |
| 54 | 54 | $table_header[] = array('attributes', false); |
| 55 | 55 | foreach ($tags as $tag => & $attributes) { |
| 56 | - $row = array(); |
|
| 57 | - $row[] = '<kbd>'.$tag.'</kbd>'; |
|
| 58 | - $row[] = '<kbd> '.implode(', ', array_keys($attributes)).'</kbd>'; |
|
| 59 | - $table_data[] = $row; |
|
| 56 | + $row = array(); |
|
| 57 | + $row[] = '<kbd>'.$tag.'</kbd>'; |
|
| 58 | + $row[] = '<kbd> '.implode(', ', array_keys($attributes)).'</kbd>'; |
|
| 59 | + $table_data[] = $row; |
|
| 60 | 60 | } |
| 61 | 61 | Display::display_sortable_table($table_header, $table_data, array(), array(), array('fullpage' => intval($_GET['fullpage']))); |
| 62 | 62 | ?> |
@@ -41,9 +41,9 @@ |
||
| 41 | 41 | $form->display(); |
| 42 | 42 | } |
| 43 | 43 | } else { |
| 44 | - $faq_content = @(string)file_get_contents(api_get_path(SYS_APP_PATH).'home/'.$faq_file); |
|
| 45 | - $faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content))); |
|
| 46 | - echo $faq_content; |
|
| 44 | + $faq_content = @(string)file_get_contents(api_get_path(SYS_APP_PATH).'home/'.$faq_file); |
|
| 45 | + $faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content))); |
|
| 46 | + echo $faq_content; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | Display::display_footer(); |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | |
| 15 | 15 | // load templates |
| 16 | 16 | function reports_loadTemplates() { |
| 17 | - global $reports_enabled_templates, $reports_template; |
|
| 18 | - foreach ($reports_enabled_templates as $t) |
|
| 19 | - require_once 'templates/'.$t.'.reports.php'; |
|
| 17 | + global $reports_enabled_templates, $reports_template; |
|
| 18 | + foreach ($reports_enabled_templates as $t) |
|
| 19 | + require_once 'templates/'.$t.'.reports.php'; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | |
@@ -149,18 +149,18 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | // return tools ID (parametre is a constant from main_api |
| 151 | 151 | function reports_getToolId($tool) { |
| 152 | - $tools = array_flip(api_get_tools_lists()); |
|
| 153 | - if (array_key_exists($tool, $tools)) |
|
| 154 | - return $tools[$tool]; |
|
| 155 | - else |
|
| 156 | - return null; |
|
| 152 | + $tools = array_flip(api_get_tools_lists()); |
|
| 153 | + if (array_key_exists($tool, $tools)) |
|
| 154 | + return $tools[$tool]; |
|
| 155 | + else |
|
| 156 | + return null; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | // return a sql clause returning triplet of (course, $session, $uid) the |
| 160 | 160 | // current user is authorized to reed |
| 161 | 161 | function reports_getVisibilitySQL () { |
| 162 | - return "select cru.user_id from ".Database::get_main_table(TABLE_MAIN_COURSE_USER).' cru'; |
|
| 163 | - // fixme sessions |
|
| 162 | + return "select cru.user_id from ".Database::get_main_table(TABLE_MAIN_COURSE_USER).' cru'; |
|
| 163 | + // fixme sessions |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | // this function execute keys_query (SQL statement) |
@@ -134,14 +134,14 @@ |
||
| 134 | 134 | <select class="input_field_12em link required" name="type" id="type"> |
| 135 | 135 | <?php |
| 136 | 136 | foreach ($reports_template as $key => $value) { |
| 137 | - echo '<option value="'.$key.'">'.$value['description'].'</option>'; |
|
| 137 | + echo '<option value="'.$key.'">'.$value['description'].'</option>'; |
|
| 138 | 138 | } |
| 139 | 139 | ?> |
| 140 | 140 | </select><br /> |
| 141 | 141 | </span> |
| 142 | 142 | <?php |
| 143 | 143 | foreach ($reports_template as $key => $value) { |
| 144 | - echo $value['wizard']; |
|
| 144 | + echo $value['wizard']; |
|
| 145 | 145 | } |
| 146 | 146 | ?> |
| 147 | 147 | <span id="format" class="step submit_step"> |