@@ -32,74 +32,74 @@ |
||
32 | 32 | class GraphLocation extends GraphObject |
33 | 33 | { |
34 | 34 | |
35 | - /** |
|
36 | - * Returns the street component of the location |
|
37 | - * |
|
38 | - * @return string|null |
|
39 | - */ |
|
40 | - public function getStreet() |
|
41 | - { |
|
35 | + /** |
|
36 | + * Returns the street component of the location |
|
37 | + * |
|
38 | + * @return string|null |
|
39 | + */ |
|
40 | + public function getStreet() |
|
41 | + { |
|
42 | 42 | return $this->getProperty('street'); |
43 | - } |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * Returns the city component of the location |
|
47 | - * |
|
48 | - * @return string|null |
|
49 | - */ |
|
50 | - public function getCity() |
|
51 | - { |
|
45 | + /** |
|
46 | + * Returns the city component of the location |
|
47 | + * |
|
48 | + * @return string|null |
|
49 | + */ |
|
50 | + public function getCity() |
|
51 | + { |
|
52 | 52 | return $this->getProperty('city'); |
53 | - } |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * Returns the state component of the location |
|
57 | - * |
|
58 | - * @return string|null |
|
59 | - */ |
|
60 | - public function getState() |
|
61 | - { |
|
55 | + /** |
|
56 | + * Returns the state component of the location |
|
57 | + * |
|
58 | + * @return string|null |
|
59 | + */ |
|
60 | + public function getState() |
|
61 | + { |
|
62 | 62 | return $this->getProperty('state'); |
63 | - } |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
66 | - * Returns the country component of the location |
|
67 | - * |
|
68 | - * @return string|null |
|
69 | - */ |
|
70 | - public function getCountry() |
|
71 | - { |
|
65 | + /** |
|
66 | + * Returns the country component of the location |
|
67 | + * |
|
68 | + * @return string|null |
|
69 | + */ |
|
70 | + public function getCountry() |
|
71 | + { |
|
72 | 72 | return $this->getProperty('country'); |
73 | - } |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * Returns the zipcode component of the location |
|
77 | - * |
|
78 | - * @return string|null |
|
79 | - */ |
|
80 | - public function getZip() |
|
81 | - { |
|
75 | + /** |
|
76 | + * Returns the zipcode component of the location |
|
77 | + * |
|
78 | + * @return string|null |
|
79 | + */ |
|
80 | + public function getZip() |
|
81 | + { |
|
82 | 82 | return $this->getProperty('zip'); |
83 | - } |
|
83 | + } |
|
84 | 84 | |
85 | - /** |
|
86 | - * Returns the latitude component of the location |
|
87 | - * |
|
88 | - * @return float|null |
|
89 | - */ |
|
90 | - public function getLatitude() |
|
91 | - { |
|
85 | + /** |
|
86 | + * Returns the latitude component of the location |
|
87 | + * |
|
88 | + * @return float|null |
|
89 | + */ |
|
90 | + public function getLatitude() |
|
91 | + { |
|
92 | 92 | return $this->getProperty('latitude'); |
93 | - } |
|
93 | + } |
|
94 | 94 | |
95 | - /** |
|
96 | - * Returns the street component of the location |
|
97 | - * |
|
98 | - * @return float|null |
|
99 | - */ |
|
100 | - public function getLongitude() |
|
101 | - { |
|
95 | + /** |
|
96 | + * Returns the street component of the location |
|
97 | + * |
|
98 | + * @return float|null |
|
99 | + */ |
|
100 | + public function getLongitude() |
|
101 | + { |
|
102 | 102 | return $this->getProperty('longitude'); |
103 | - } |
|
103 | + } |
|
104 | 104 | |
105 | 105 | } |
106 | 106 | \ No newline at end of file |
@@ -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 |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Licence: GPL |
|
4 | - * Please contact CBlue regarding any licences issues. |
|
5 | - * Author: [email protected] |
|
6 | - * Copyright: CBlue SPRL, 20XX |
|
7 | - * |
|
8 | - * External login module : FACEBOOK |
|
9 | - * |
|
10 | - * This files provides the facebookConnect() and facebook_get_url functions |
|
11 | - * Please edit the facebook.conf.php file to adapt it to your fb application parameter |
|
12 | - */ |
|
3 | + * Licence: GPL |
|
4 | + * Please contact CBlue regarding any licences issues. |
|
5 | + * Author: [email protected] |
|
6 | + * Copyright: CBlue SPRL, 20XX |
|
7 | + * |
|
8 | + * External login module : FACEBOOK |
|
9 | + * |
|
10 | + * This files provides the facebookConnect() and facebook_get_url functions |
|
11 | + * Please edit the facebook.conf.php file to adapt it to your fb application parameter |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | require_once dirname(__FILE__) . '/../../inc/global.inc.php'; |
15 | 15 | require_once dirname(__FILE__) . '/facebook.init.php'; |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Display nothing. This ensure Apache doesn't display the list of files and folders |
|
4 | - * when it is not propertly configured. |
|
5 | - * |
|
6 | - * @license see /license.txt |
|
7 | - * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva |
|
8 | - */ |
|
9 | 3 | \ No newline at end of file |
4 | + * Display nothing. This ensure Apache doesn't display the list of files and folders |
|
5 | + * when it is not propertly configured. |
|
6 | + * |
|
7 | + * @license see /license.txt |
|
8 | + * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva |
|
9 | + */ |
|
10 | 10 | \ No newline at end of file |
@@ -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(); |