-
51 |
- 52 | 54 | {{ 'recent-uploads'|message }} 55 | 56 | 57 | {% if user %} 58 |
- {{ 'logged-in-as'|message(user) }} 59 |
- {{ 'logout'|message }} 60 | {% endif %} 61 |
40 | * {{ 'my-message-key'|message }}
41 | * {{ 'my-message-key'|message( 'foo', 'bar' ) }}
42 | * {{ 'my-message-key'|message( [ 'foo', 'bar' ] ) }}
43 | * {{ 'my-message-key'|message( 'foo', 'bar' )|raw }}
44 | *
45 | *
46 | * @param string $key Message key
47 | * @return string Unescaped message content
48 | */
49 | public function messageFilterCallback( $key ) {
50 | $params = func_get_args();
51 | array_shift( $params );
52 | if ( count( $params ) == 1 && is_array( $params[0] ) ) {
53 | // Unwrap args array
54 | $params = $params[0];
55 | }
56 | return $this->intuition->msg( $key, [ 'variables' => $params ] );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/OAuth/MediaWikiOAuthException.php:
--------------------------------------------------------------------------------
1 | key = $key;
33 | $this->secret = $secret;
34 | }
35 |
36 | /**
37 | * @return string
38 | */
39 | public function getKey() {
40 | return $this->key;
41 | }
42 |
43 | /**
44 | * @return string
45 | */
46 | public function getSecret() {
47 | return $this->secret;
48 | }
49 |
50 | /**
51 | * @return string[]
52 | */
53 | public function jsonSerialize() {
54 | return [
55 | 'key' => $this->key,
56 | 'secret' => $this->secret
57 | ];
58 | }
59 |
60 | /**
61 | * Get a JSON string representation of this token.
62 | * @return string
63 | */
64 | public function serialize() {
65 | return json_encode( $this );
66 | }
67 |
68 | /**
69 | * Populate this token from a serialized string.
70 | * @param string $serialized The unserialized string.
71 | */
72 | public function unserialize( $serialized ) {
73 | $content = json_decode( $serialized, true );
74 | $this->key = $content['key'];
75 | $this->secret = $content['secret'];
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/views/commons/fill.twig:
--------------------------------------------------------------------------------
1 | {% extends "template.twig" %}
2 | {% block body %}
3 |
102 | {% endblock %}
103 |
--------------------------------------------------------------------------------
/views/commons/init.twig:
--------------------------------------------------------------------------------
1 | {% extends "template.twig" %}
2 | {% block body %}
3 |
35 |
36 | {{ 'job-queue-empty'|message }}
39 | {% else %} 40 |41 | {{ 'jobs-will-be-removed'|message }} 42 | {% if user %} 43 | {{ 'user-contribs-link'|message('https://commons.wikimedia.org/wiki/Special:Contributions/'~user)|raw }} 44 | {% endif %} 45 |
46 |{{ 'table-header-ia-item'|message }} | 50 |{{ 'table-header-commons-filename'|message }} | 51 |{{ 'table-header-status'|message }} | 52 |{{ 'table-header-log'|message }} | 53 |{{ 'table-header-download'|message }} | 54 |
---|---|---|---|---|
{{ job.iaId }} | 60 |{{ job.fullCommonsName }} | 61 |62 | {% if job.failed %}{{ 'possibly-failed'|message }} 63 | {% elseif job.locked %}{{ 'in-progress'|message }} 64 | {% else %}{{ 'queued'|message }}{% endif %} 65 | | 66 |View log | 67 |68 | {% if job.hasDjvu %} 69 | Download DjVu 70 | {% endif %} 71 | | 72 |