@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | */ |
17 | 17 | |
18 | -if (!defined('DOKU_INC')){ |
|
18 | +if (!defined('DOKU_INC')) { |
|
19 | 19 | die(); |
20 | 20 | } |
21 | 21 | if (!defined('DOKU_PLUGIN')) { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | require_once DOKU_PLUGIN . 'action.php'; |
26 | -require_once(DOKU_INC.'inc/JpegMeta.php'); |
|
26 | +require_once(DOKU_INC . 'inc/JpegMeta.php'); |
|
27 | 27 | /** |
28 | 28 | * DokuWiki Plugin socialcards (Action Component). |
29 | 29 | * |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | if (empty($img)) { |
196 | 196 | $img = $this->getConf('fallbackImage'); |
197 | - if (substr($img, 0, 4 ) === "http") { |
|
197 | + if (substr($img, 0, 4) === "http") { |
|
198 | 198 | // don't use ml() as this results in a HTTP redirect after hitting the wiki |
199 | 199 | return $img; |
200 | 200 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | $alt = ""; |
217 | 217 | |
218 | 218 | if (!empty($imgID)) { |
219 | - require_once(DOKU_INC.'inc/JpegMeta.php'); |
|
219 | + require_once(DOKU_INC . 'inc/JpegMeta.php'); |
|
220 | 220 | $jpegmeta = new JpegMeta(mediaFN($imgID)); |
221 | 221 | $tags = array('IPTC.Caption', |
222 | 222 | 'EXIF.UserComment', |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | 'IPTC.Headline', |
226 | 226 | 'Xmp.dc:title' |
227 | 227 | ); |
228 | - $alt = media_getTag( $tags,$jpegmeta,""); |
|
228 | + $alt = media_getTag($tags, $jpegmeta, ""); |
|
229 | 229 | } |
230 | 230 | return htmlspecialchars($alt); |
231 | 231 | } |
@@ -21,8 +21,8 @@ |
||
21 | 21 | * @license BSD license |
22 | 22 | * @author Mark C. Prins <[email protected]> |
23 | 23 | */ |
24 | -$meta['twitterName'] = array ('string'); |
|
25 | -$meta['twitterUserName'] = array ('string'); |
|
26 | -$meta['fallbackImage'] = array ('string'); |
|
27 | -$meta['languageTerritory'] = array ('multichoice','_choices' => array('be_BY','bn_IN','cs_CZ','da_DK','de_CH','de_DE','el_GR','en_AU','en_CA','en_GB','en_HK','en_IN','en_NZ','en_PH','en_SG','en_US','en_ZA','es_AR','es_BO','es_CL','es_CO','es_CR','es_DO','es_EC','es_ES','es_GT','es_HN','es_MX','es_NI','es_PA','es_PE','es_PR','es_PY','es_SV','es_US','es_UY','es_VE','fi_FI','fr_BE','fr_CA','fr_CH','fr_FR','gu_IN','he_IL','hi_IN','hr_HR','hu_HU','id_ID','it_CH','it_IT','iw_IL','ja_JP','kk_KZ','ko_KR','mr_IN','ms_MY','nl_NL','no_NO','pa_IN','pl_PL','pt_BR','pt_PT','ro_RO','ru_RU','sk_SK','sl_SI','sv_SE','ta_IN','te_IN','th_TH','tr_TR','zh_CN','zh_HKS','zh_HKT','zh_SGS','zh_TW')); |
|
28 | -$meta['fbAppId'] = array ('string'); |
|
24 | +$meta['twitterName'] = array('string'); |
|
25 | +$meta['twitterUserName'] = array('string'); |
|
26 | +$meta['fallbackImage'] = array('string'); |
|
27 | +$meta['languageTerritory'] = array('multichoice', '_choices' => array('be_BY', 'bn_IN', 'cs_CZ', 'da_DK', 'de_CH', 'de_DE', 'el_GR', 'en_AU', 'en_CA', 'en_GB', 'en_HK', 'en_IN', 'en_NZ', 'en_PH', 'en_SG', 'en_US', 'en_ZA', 'es_AR', 'es_BO', 'es_CL', 'es_CO', 'es_CR', 'es_DO', 'es_EC', 'es_ES', 'es_GT', 'es_HN', 'es_MX', 'es_NI', 'es_PA', 'es_PE', 'es_PR', 'es_PY', 'es_SV', 'es_US', 'es_UY', 'es_VE', 'fi_FI', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_FR', 'gu_IN', 'he_IL', 'hi_IN', 'hr_HR', 'hu_HU', 'id_ID', 'it_CH', 'it_IT', 'iw_IL', 'ja_JP', 'kk_KZ', 'ko_KR', 'mr_IN', 'ms_MY', 'nl_NL', 'no_NO', 'pa_IN', 'pl_PL', 'pt_BR', 'pt_PT', 'ro_RO', 'ru_RU', 'sk_SK', 'sl_SI', 'sv_SE', 'ta_IN', 'te_IN', 'th_TH', 'tr_TR', 'zh_CN', 'zh_HKS', 'zh_HKT', 'zh_SGS', 'zh_TW')); |
|
28 | +$meta['fbAppId'] = array('string'); |
@@ -7,27 +7,27 @@ |
||
7 | 7 | */ |
8 | 8 | class general_plugin_socialcards_test extends DokuWikiTest { |
9 | 9 | |
10 | - /** |
|
11 | - * Simple test to make sure the plugin.info.txt is in correct format |
|
12 | - */ |
|
13 | - public function test_plugininfo() { |
|
14 | - $file = __DIR__.'/../plugin.info.txt'; |
|
15 | - $this->assertFileExists($file); |
|
10 | + /** |
|
11 | + * Simple test to make sure the plugin.info.txt is in correct format |
|
12 | + */ |
|
13 | + public function test_plugininfo() { |
|
14 | + $file = __DIR__.'/../plugin.info.txt'; |
|
15 | + $this->assertFileExists($file); |
|
16 | 16 | |
17 | - $info = confToHash($file); |
|
17 | + $info = confToHash($file); |
|
18 | 18 | |
19 | - $this->assertArrayHasKey('base', $info); |
|
20 | - $this->assertArrayHasKey('author', $info); |
|
21 | - $this->assertArrayHasKey('email', $info); |
|
22 | - $this->assertArrayHasKey('date', $info); |
|
23 | - $this->assertArrayHasKey('name', $info); |
|
24 | - $this->assertArrayHasKey('desc', $info); |
|
25 | - $this->assertArrayHasKey('url', $info); |
|
19 | + $this->assertArrayHasKey('base', $info); |
|
20 | + $this->assertArrayHasKey('author', $info); |
|
21 | + $this->assertArrayHasKey('email', $info); |
|
22 | + $this->assertArrayHasKey('date', $info); |
|
23 | + $this->assertArrayHasKey('name', $info); |
|
24 | + $this->assertArrayHasKey('desc', $info); |
|
25 | + $this->assertArrayHasKey('url', $info); |
|
26 | 26 | |
27 | - $this->assertEquals('socialcards', $info['base']); |
|
28 | - $this->assertRegExp('/^https?:\/\//', $info['url']); |
|
29 | - $this->assertTrue(mail_isvalid($info['email'])); |
|
30 | - $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); |
|
31 | - $this->assertTrue(false !== strtotime($info['date'])); |
|
32 | - } |
|
27 | + $this->assertEquals('socialcards', $info['base']); |
|
28 | + $this->assertRegExp('/^https?:\/\//', $info['url']); |
|
29 | + $this->assertTrue(mail_isvalid($info['email'])); |
|
30 | + $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); |
|
31 | + $this->assertTrue(false !== strtotime($info['date'])); |
|
32 | + } |
|
33 | 33 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * Simple test to make sure the plugin.info.txt is in correct format |
12 | 12 | */ |
13 | 13 | public function test_plugininfo() { |
14 | - $file = __DIR__.'/../plugin.info.txt'; |
|
14 | + $file = __DIR__ . '/../plugin.info.txt'; |
|
15 | 15 | $this->assertFileExists($file); |
16 | 16 | |
17 | 17 | $info = confToHash($file); |