Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( b34a1c...06de54 )
by Sebastian
03:26 queued 50s
created
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/Response.php 1 patch
Indentation   +183 added lines, -183 removed lines patch added patch discarded remove patch
@@ -43,213 +43,213 @@
 block discarded – undo
43 43
  */
44 44
 class Apache_Solr_HttpTransport_Response
45 45
 {
46
-	/**
47
-	 * Status Messages indexed by Status Code
48
-	 * Obtained from: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
49
-	 *
50
-	 * @var array
51
-	 */
52
-	static private $_defaultStatusMessages = array(
53
-		// Specific to PHP Solr Client
54
-		0 => "Communication Error",
46
+    /**
47
+     * Status Messages indexed by Status Code
48
+     * Obtained from: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
49
+     *
50
+     * @var array
51
+     */
52
+    static private $_defaultStatusMessages = array(
53
+        // Specific to PHP Solr Client
54
+        0 => "Communication Error",
55 55
 		
56
-		// Informational 1XX
57
-		100 => "Continue",
58
-		101 => "Switching Protocols",
56
+        // Informational 1XX
57
+        100 => "Continue",
58
+        101 => "Switching Protocols",
59 59
 		
60
-		// Successful 2XX
61
-		200 => "OK",
62
-		201 => "Created",
63
-		202 => "Accepted",
64
-		203 => "Non-Authoritative Information",
65
-		204 => "No Content",
66
-		205 => "Reset Content",
67
-		206 => "Partial Content",
60
+        // Successful 2XX
61
+        200 => "OK",
62
+        201 => "Created",
63
+        202 => "Accepted",
64
+        203 => "Non-Authoritative Information",
65
+        204 => "No Content",
66
+        205 => "Reset Content",
67
+        206 => "Partial Content",
68 68
 		
69
-		// Redirection 3XX
70
-		300 => "Multiple Choices",
71
-		301 => "Moved Permanently",
72
-		302 => "Found",
73
-		303 => "See Other",
74
-		304 => "Not Modified",
75
-		305 => "Use Proxy",
76
-		307 => "Temporary Redirect",
69
+        // Redirection 3XX
70
+        300 => "Multiple Choices",
71
+        301 => "Moved Permanently",
72
+        302 => "Found",
73
+        303 => "See Other",
74
+        304 => "Not Modified",
75
+        305 => "Use Proxy",
76
+        307 => "Temporary Redirect",
77 77
 		
78
-		// Client Error 4XX
79
-		400 => "Bad Request",
80
-		401 => "Unauthorized",
81
-		402 => "Payment Required",
82
-		403 => "Forbidden",
83
-		404 => "Not Found",
84
-		405 => "Method Not Allowed",
85
-		406 => "Not Acceptable",
86
-		407 => "Proxy Authentication Required",
87
-		408 => "Request Timeout",
88
-		409 => "Conflict",
89
-		410 => "Gone",
90
-		411 => "Length Required",
91
-		412 => "Precondition Failed",
92
-		413 => "Request Entity Too Large",
93
-		414 => "Request-URI Too Long",
94
-		415 => "Unsupported Media Type",
95
-		416 => "Request Range Not Satisfiable",
96
-		417 => "Expectation Failed",
78
+        // Client Error 4XX
79
+        400 => "Bad Request",
80
+        401 => "Unauthorized",
81
+        402 => "Payment Required",
82
+        403 => "Forbidden",
83
+        404 => "Not Found",
84
+        405 => "Method Not Allowed",
85
+        406 => "Not Acceptable",
86
+        407 => "Proxy Authentication Required",
87
+        408 => "Request Timeout",
88
+        409 => "Conflict",
89
+        410 => "Gone",
90
+        411 => "Length Required",
91
+        412 => "Precondition Failed",
92
+        413 => "Request Entity Too Large",
93
+        414 => "Request-URI Too Long",
94
+        415 => "Unsupported Media Type",
95
+        416 => "Request Range Not Satisfiable",
96
+        417 => "Expectation Failed",
97 97
 		
98
-		// Server Error 5XX
99
-		500 => "Internal Server Error",
100
-		501 => "Not Implemented",
101
-		502 => "Bad Gateway",
102
-		503 => "Service Unavailable",
103
-		504 => "Gateway Timeout",
104
-		505 => "HTTP Version Not Supported"
105
-	);
98
+        // Server Error 5XX
99
+        500 => "Internal Server Error",
100
+        501 => "Not Implemented",
101
+        502 => "Bad Gateway",
102
+        503 => "Service Unavailable",
103
+        504 => "Gateway Timeout",
104
+        505 => "HTTP Version Not Supported"
105
+    );
106 106
 	
107
-	/**
108
-	 * Get the HTTP status message based on status code
109
-	 *
110
-	 * @return string
111
-	 */
112
-	public static function getDefaultStatusMessage($statusCode)
113
-	{
114
-		$statusCode = (int) $statusCode;
107
+    /**
108
+     * Get the HTTP status message based on status code
109
+     *
110
+     * @return string
111
+     */
112
+    public static function getDefaultStatusMessage($statusCode)
113
+    {
114
+        $statusCode = (int) $statusCode;
115 115
 		
116
-		if (isset(self::$_defaultStatusMessages[$statusCode]))
117
-		{
118
-			return self::$_defaultStatusMessages[$statusCode];
119
-		}
116
+        if (isset(self::$_defaultStatusMessages[$statusCode]))
117
+        {
118
+            return self::$_defaultStatusMessages[$statusCode];
119
+        }
120 120
 		
121
-		return "Unknown Status";
122
-	}
121
+        return "Unknown Status";
122
+    }
123 123
 	
124
-	/**
125
-	 * The response's HTTP status code
126
-	 *
127
-	 * @var integer
128
-	 */
129
-	private $_statusCode;
124
+    /**
125
+     * The response's HTTP status code
126
+     *
127
+     * @var integer
128
+     */
129
+    private $_statusCode;
130 130
 	
131
-	/**
132
-	 * The response's HTTP status message
133
-	 *
134
-	 * @var string
135
-	 */
136
-	private $_statusMessage;
131
+    /**
132
+     * The response's HTTP status message
133
+     *
134
+     * @var string
135
+     */
136
+    private $_statusMessage;
137 137
 	
138
-	/**
139
-	 * The response's mime type
140
-	 *
141
-	 * @var string
142
-	 */
143
-	private $_mimeType;
138
+    /**
139
+     * The response's mime type
140
+     *
141
+     * @var string
142
+     */
143
+    private $_mimeType;
144 144
 	
145
-	/**
146
-	 * The response's character encoding
147
-	 *
148
-	 * @var string
149
-	 */
150
-	private $_encoding;
145
+    /**
146
+     * The response's character encoding
147
+     *
148
+     * @var string
149
+     */
150
+    private $_encoding;
151 151
 	
152
-	/**
153
-	 * The response's data
154
-	 *
155
-	 * @var string
156
-	 */
157
-	private $_responseBody;
152
+    /**
153
+     * The response's data
154
+     *
155
+     * @var string
156
+     */
157
+    private $_responseBody;
158 158
 	
159
-	/**
160
-	 * Construct a HTTP transport response
161
-	 * 
162
-	 * @param integer $statusCode The HTTP status code
163
-	 * @param string $contentType The VALUE of the Content-Type HTTP header
164
-	 * @param string $responseBody The body of the HTTP response
165
-	 */
166
-	public function __construct($statusCode, $contentType, $responseBody)
167
-	{
168
-		// set the status code, make sure its an integer
169
-		$this->_statusCode = (int) $statusCode;
159
+    /**
160
+     * Construct a HTTP transport response
161
+     * 
162
+     * @param integer $statusCode The HTTP status code
163
+     * @param string $contentType The VALUE of the Content-Type HTTP header
164
+     * @param string $responseBody The body of the HTTP response
165
+     */
166
+    public function __construct($statusCode, $contentType, $responseBody)
167
+    {
168
+        // set the status code, make sure its an integer
169
+        $this->_statusCode = (int) $statusCode;
170 170
 		
171
-		// lookup up status message based on code
172
-		$this->_statusMessage = self::getDefaultStatusMessage($this->_statusCode);
171
+        // lookup up status message based on code
172
+        $this->_statusMessage = self::getDefaultStatusMessage($this->_statusCode);
173 173
 		
174
-		// set the response body, it should always be a string
175
-		$this->_responseBody = (string) $responseBody;
174
+        // set the response body, it should always be a string
175
+        $this->_responseBody = (string) $responseBody;
176 176
 		
177
-		// parse the content type header value for mimetype and encoding
178
-		// first set default values that will remain if we can't find
179
-		// what we're looking for in the content type
180
-		$this->_mimeType = "text/plain";
181
-		$this->_encoding = "UTF-8";
177
+        // parse the content type header value for mimetype and encoding
178
+        // first set default values that will remain if we can't find
179
+        // what we're looking for in the content type
180
+        $this->_mimeType = "text/plain";
181
+        $this->_encoding = "UTF-8";
182 182
 		
183
-		if ($contentType)
184
-		{
185
-			// now break apart the header to see if there's character encoding
186
-			$contentTypeParts = explode(';', $contentType, 2);
183
+        if ($contentType)
184
+        {
185
+            // now break apart the header to see if there's character encoding
186
+            $contentTypeParts = explode(';', $contentType, 2);
187 187
 
188
-			if (isset($contentTypeParts[0]))
189
-			{
190
-				$this->_mimeType = trim($contentTypeParts[0]);
191
-			}
188
+            if (isset($contentTypeParts[0]))
189
+            {
190
+                $this->_mimeType = trim($contentTypeParts[0]);
191
+            }
192 192
 
193
-			if (isset($contentTypeParts[1]))
194
-			{
195
-				// we have a second part, split it further
196
-				$contentTypeParts = explode('=', $contentTypeParts[1]);
193
+            if (isset($contentTypeParts[1]))
194
+            {
195
+                // we have a second part, split it further
196
+                $contentTypeParts = explode('=', $contentTypeParts[1]);
197 197
 
198
-				if (isset($contentTypeParts[1]))
199
-				{
200
-					$this->_encoding = trim($contentTypeParts[1]);
201
-				}
202
-			}
203
-		}
204
-	}
198
+                if (isset($contentTypeParts[1]))
199
+                {
200
+                    $this->_encoding = trim($contentTypeParts[1]);
201
+                }
202
+            }
203
+        }
204
+    }
205 205
 	
206
-	/**
207
-	 * Get the status code of the response
208
-	 *
209
-	 * @return integer
210
-	 */
211
-	public function getStatusCode()
212
-	{
213
-		return $this->_statusCode;
214
-	}
206
+    /**
207
+     * Get the status code of the response
208
+     *
209
+     * @return integer
210
+     */
211
+    public function getStatusCode()
212
+    {
213
+        return $this->_statusCode;
214
+    }
215 215
 	
216
-	/**
217
-	 * Get the status message of the response
218
-	 *
219
-	 * @return string
220
-	 */
221
-	public function getStatusMessage()
222
-	{
223
-		return $this->_statusMessage;
224
-	}
216
+    /**
217
+     * Get the status message of the response
218
+     *
219
+     * @return string
220
+     */
221
+    public function getStatusMessage()
222
+    {
223
+        return $this->_statusMessage;
224
+    }
225 225
 	
226
-	/**
227
-	 * Get the mimetype of the response body
228
-	 *
229
-	 * @return string
230
-	 */
231
-	public function getMimeType()
232
-	{
233
-		return $this->_mimeType;
234
-	}
226
+    /**
227
+     * Get the mimetype of the response body
228
+     *
229
+     * @return string
230
+     */
231
+    public function getMimeType()
232
+    {
233
+        return $this->_mimeType;
234
+    }
235 235
 	
236
-	/**
237
-	 * Get the charset encoding of the response body.
238
-	 *
239
-	 * @return string
240
-	 */
241
-	public function getEncoding()
242
-	{
243
-		return $this->_encoding;
244
-	}
236
+    /**
237
+     * Get the charset encoding of the response body.
238
+     *
239
+     * @return string
240
+     */
241
+    public function getEncoding()
242
+    {
243
+        return $this->_encoding;
244
+    }
245 245
 	
246
-	/**
247
-	 * Get the raw response body
248
-	 *
249
-	 * @return string
250
-	 */
251
-	public function getBody()
252
-	{
253
-		return $this->_responseBody;
254
-	}
246
+    /**
247
+     * Get the raw response body
248
+     *
249
+     * @return string
250
+     */
251
+    public function getBody()
252
+    {
253
+        return $this->_responseBody;
254
+    }
255 255
 }
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/Curl.php 1 patch
Indentation   +151 added lines, -151 removed lines patch added patch discarded remove patch
@@ -44,155 +44,155 @@
 block discarded – undo
44 44
  */
45 45
 class Apache_Solr_HttpTransport_Curl extends Apache_Solr_HttpTransport_Abstract
46 46
 {
47
-	/**
48
-	 * SVN Revision meta data for this class
49
-	 */
50
-	const SVN_REVISION = '$Revision:$';
51
-
52
-	/**
53
-	 * SVN ID meta data for this class
54
-	 */
55
-	const SVN_ID = '$Id:$';
56
-
57
-	/**
58
-	 * Curl Session Handle
59
-	 *
60
-	 * @var resource
61
-	 */
62
-	private $_curl;
63
-
64
-	/**
65
-	 * Initializes a curl session
66
-	 */
67
-	public function __construct()
68
-	{
69
-		// initialize a CURL session
70
-		$this->_curl = curl_init();
71
-
72
-		// set common options that will not be changed during the session
73
-		curl_setopt_array($this->_curl, array(
74
-			// return the response body from curl_exec
75
-			CURLOPT_RETURNTRANSFER => true,
76
-
77
-			// get the output as binary data
78
-			CURLOPT_BINARYTRANSFER => true,
79
-
80
-			// we do not need the headers in the output, we get everything we need from curl_getinfo
81
-			CURLOPT_HEADER => false
82
-		));
83
-	}
84
-
85
-	/**
86
-	 * Closes a curl session
87
-	 */
88
-	function __destruct()
89
-	{
90
-		// close our curl session
91
-		curl_close($this->_curl);
92
-	}
93
-
94
-	public function performGetRequest($url, $timeout = false)
95
-	{
96
-		// check the timeout value
97
-		if ($timeout === false || $timeout <= 0.0)
98
-		{
99
-			// use the default timeout
100
-			$timeout = $this->getDefaultTimeout();
101
-		}
102
-
103
-		// set curl GET options
104
-		curl_setopt_array($this->_curl, array(
105
-			// make sure we're returning the body
106
-			CURLOPT_NOBODY => false,
107
-
108
-			// make sure we're GET
109
-			CURLOPT_HTTPGET => true,
110
-
111
-			// set the URL
112
-			CURLOPT_URL => $url,
113
-
114
-			// set the timeout
115
-			CURLOPT_TIMEOUT => $timeout
116
-		));
117
-
118
-		// make the request
119
-		$responseBody = curl_exec($this->_curl);
120
-
121
-		// get info from the transfer
122
-		$statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
123
-		$contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
124
-
125
-		return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
126
-	}
127
-
128
-	public function performHeadRequest($url, $timeout = false)
129
-	{
130
-		// check the timeout value
131
-		if ($timeout === false || $timeout <= 0.0)
132
-		{
133
-			// use the default timeout
134
-			$timeout = $this->getDefaultTimeout();
135
-		}
136
-
137
-		// set curl HEAD options
138
-		curl_setopt_array($this->_curl, array(
139
-			// this both sets the method to HEAD and says not to return a body
140
-			CURLOPT_NOBODY => true,
141
-
142
-			// set the URL
143
-			CURLOPT_URL => $url,
144
-
145
-			// set the timeout
146
-			CURLOPT_TIMEOUT => $timeout
147
-		));
148
-
149
-		// make the request
150
-		$responseBody = curl_exec($this->_curl);
151
-
152
-		// get info from the transfer
153
-		$statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
154
-		$contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
155
-
156
-		return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
157
-	}
158
-
159
-	public function performPostRequest($url, $postData, $contentType, $timeout = false)
160
-	{
161
-		// check the timeout value
162
-		if ($timeout === false || $timeout <= 0.0)
163
-		{
164
-			// use the default timeout
165
-			$timeout = $this->getDefaultTimeout();
166
-		}
167
-
168
-		// set curl POST options
169
-		curl_setopt_array($this->_curl, array(
170
-			// make sure we're returning the body
171
-			CURLOPT_NOBODY => false,
172
-
173
-			// make sure we're POST
174
-			CURLOPT_POST => true,
175
-
176
-			// set the URL
177
-			CURLOPT_URL => $url,
178
-
179
-			// set the post data
180
-			CURLOPT_POSTFIELDS => $postData,
181
-
182
-			// set the content type
183
-			CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"),
184
-
185
-			// set the timeout
186
-			CURLOPT_TIMEOUT => $timeout
187
-		));
188
-
189
-		// make the request
190
-		$responseBody = curl_exec($this->_curl);
191
-
192
-		// get info from the transfer
193
-		$statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
194
-		$contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
195
-
196
-		return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
197
-	}
47
+    /**
48
+     * SVN Revision meta data for this class
49
+     */
50
+    const SVN_REVISION = '$Revision:$';
51
+
52
+    /**
53
+     * SVN ID meta data for this class
54
+     */
55
+    const SVN_ID = '$Id:$';
56
+
57
+    /**
58
+     * Curl Session Handle
59
+     *
60
+     * @var resource
61
+     */
62
+    private $_curl;
63
+
64
+    /**
65
+     * Initializes a curl session
66
+     */
67
+    public function __construct()
68
+    {
69
+        // initialize a CURL session
70
+        $this->_curl = curl_init();
71
+
72
+        // set common options that will not be changed during the session
73
+        curl_setopt_array($this->_curl, array(
74
+            // return the response body from curl_exec
75
+            CURLOPT_RETURNTRANSFER => true,
76
+
77
+            // get the output as binary data
78
+            CURLOPT_BINARYTRANSFER => true,
79
+
80
+            // we do not need the headers in the output, we get everything we need from curl_getinfo
81
+            CURLOPT_HEADER => false
82
+        ));
83
+    }
84
+
85
+    /**
86
+     * Closes a curl session
87
+     */
88
+    function __destruct()
89
+    {
90
+        // close our curl session
91
+        curl_close($this->_curl);
92
+    }
93
+
94
+    public function performGetRequest($url, $timeout = false)
95
+    {
96
+        // check the timeout value
97
+        if ($timeout === false || $timeout <= 0.0)
98
+        {
99
+            // use the default timeout
100
+            $timeout = $this->getDefaultTimeout();
101
+        }
102
+
103
+        // set curl GET options
104
+        curl_setopt_array($this->_curl, array(
105
+            // make sure we're returning the body
106
+            CURLOPT_NOBODY => false,
107
+
108
+            // make sure we're GET
109
+            CURLOPT_HTTPGET => true,
110
+
111
+            // set the URL
112
+            CURLOPT_URL => $url,
113
+
114
+            // set the timeout
115
+            CURLOPT_TIMEOUT => $timeout
116
+        ));
117
+
118
+        // make the request
119
+        $responseBody = curl_exec($this->_curl);
120
+
121
+        // get info from the transfer
122
+        $statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
123
+        $contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
124
+
125
+        return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
126
+    }
127
+
128
+    public function performHeadRequest($url, $timeout = false)
129
+    {
130
+        // check the timeout value
131
+        if ($timeout === false || $timeout <= 0.0)
132
+        {
133
+            // use the default timeout
134
+            $timeout = $this->getDefaultTimeout();
135
+        }
136
+
137
+        // set curl HEAD options
138
+        curl_setopt_array($this->_curl, array(
139
+            // this both sets the method to HEAD and says not to return a body
140
+            CURLOPT_NOBODY => true,
141
+
142
+            // set the URL
143
+            CURLOPT_URL => $url,
144
+
145
+            // set the timeout
146
+            CURLOPT_TIMEOUT => $timeout
147
+        ));
148
+
149
+        // make the request
150
+        $responseBody = curl_exec($this->_curl);
151
+
152
+        // get info from the transfer
153
+        $statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
154
+        $contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
155
+
156
+        return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
157
+    }
158
+
159
+    public function performPostRequest($url, $postData, $contentType, $timeout = false)
160
+    {
161
+        // check the timeout value
162
+        if ($timeout === false || $timeout <= 0.0)
163
+        {
164
+            // use the default timeout
165
+            $timeout = $this->getDefaultTimeout();
166
+        }
167
+
168
+        // set curl POST options
169
+        curl_setopt_array($this->_curl, array(
170
+            // make sure we're returning the body
171
+            CURLOPT_NOBODY => false,
172
+
173
+            // make sure we're POST
174
+            CURLOPT_POST => true,
175
+
176
+            // set the URL
177
+            CURLOPT_URL => $url,
178
+
179
+            // set the post data
180
+            CURLOPT_POSTFIELDS => $postData,
181
+
182
+            // set the content type
183
+            CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"),
184
+
185
+            // set the timeout
186
+            CURLOPT_TIMEOUT => $timeout
187
+        ));
188
+
189
+        // make the request
190
+        $responseBody = curl_exec($this->_curl);
191
+
192
+        // get info from the transfer
193
+        $statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
194
+        $contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
195
+
196
+        return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
197
+    }
198 198
 }
199 199
\ No newline at end of file
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/CurlNoReuse.php 1 patch
Indentation   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -46,151 +46,151 @@
 block discarded – undo
46 46
  */
47 47
 class Apache_Solr_HttpTransport_CurlNoReuse extends Apache_Solr_HttpTransport_Abstract
48 48
 {
49
-	/**
50
-	 * SVN Revision meta data for this class
51
-	 */
52
-	const SVN_REVISION = '$Revision:$';
53
-
54
-	/**
55
-	 * SVN ID meta data for this class
56
-	 */
57
-	const SVN_ID = '$Id:$';
58
-
59
-	public function performGetRequest($url, $timeout = false)
60
-	{
61
-		// check the timeout value
62
-		if ($timeout === false || $timeout <= 0.0)
63
-		{
64
-			// use the default timeout
65
-			$timeout = $this->getDefaultTimeout();
66
-		}
49
+    /**
50
+     * SVN Revision meta data for this class
51
+     */
52
+    const SVN_REVISION = '$Revision:$';
53
+
54
+    /**
55
+     * SVN ID meta data for this class
56
+     */
57
+    const SVN_ID = '$Id:$';
58
+
59
+    public function performGetRequest($url, $timeout = false)
60
+    {
61
+        // check the timeout value
62
+        if ($timeout === false || $timeout <= 0.0)
63
+        {
64
+            // use the default timeout
65
+            $timeout = $this->getDefaultTimeout();
66
+        }
67 67
 		
68
-		$curl = curl_init();
68
+        $curl = curl_init();
69 69
 
70
-		// set curl GET options
71
-		curl_setopt_array($curl, array(
72
-			// return the response body from curl_exec
73
-			CURLOPT_RETURNTRANSFER => true,
70
+        // set curl GET options
71
+        curl_setopt_array($curl, array(
72
+            // return the response body from curl_exec
73
+            CURLOPT_RETURNTRANSFER => true,
74 74
 
75
-			// get the output as binary data
76
-			CURLOPT_BINARYTRANSFER => true,
75
+            // get the output as binary data
76
+            CURLOPT_BINARYTRANSFER => true,
77 77
 
78
-			// we do not need the headers in the output, we get everything we need from curl_getinfo
79
-			CURLOPT_HEADER => false,
78
+            // we do not need the headers in the output, we get everything we need from curl_getinfo
79
+            CURLOPT_HEADER => false,
80 80
 			
81
-			// set the URL
82
-			CURLOPT_URL => $url,
81
+            // set the URL
82
+            CURLOPT_URL => $url,
83 83
 
84
-			// set the timeout
85
-			CURLOPT_TIMEOUT => $timeout
86
-		));
84
+            // set the timeout
85
+            CURLOPT_TIMEOUT => $timeout
86
+        ));
87 87
 
88
-		// make the request
89
-		$responseBody = curl_exec($curl);
88
+        // make the request
89
+        $responseBody = curl_exec($curl);
90 90
 
91
-		// get info from the transfer
92
-		$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
93
-		$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
91
+        // get info from the transfer
92
+        $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
93
+        $contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
94 94
 		
95
-		// close our curl session - we're done with it
96
-		curl_close($curl);
97
-
98
-		return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
99
-	}
100
-
101
-	public function performHeadRequest($url, $timeout = false)
102
-	{
103
-		// check the timeout value
104
-		if ($timeout === false || $timeout <= 0.0)
105
-		{
106
-			// use the default timeout
107
-			$timeout = $this->getDefaultTimeout();
108
-		}
95
+        // close our curl session - we're done with it
96
+        curl_close($curl);
97
+
98
+        return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
99
+    }
100
+
101
+    public function performHeadRequest($url, $timeout = false)
102
+    {
103
+        // check the timeout value
104
+        if ($timeout === false || $timeout <= 0.0)
105
+        {
106
+            // use the default timeout
107
+            $timeout = $this->getDefaultTimeout();
108
+        }
109 109
 		
110
-		$curl = curl_init();
110
+        $curl = curl_init();
111 111
 
112
-		// set curl HEAD options
113
-		curl_setopt_array($curl, array(
114
-			// return the response body from curl_exec
115
-			CURLOPT_RETURNTRANSFER => true,
112
+        // set curl HEAD options
113
+        curl_setopt_array($curl, array(
114
+            // return the response body from curl_exec
115
+            CURLOPT_RETURNTRANSFER => true,
116 116
 
117
-			// get the output as binary data
118
-			CURLOPT_BINARYTRANSFER => true,
117
+            // get the output as binary data
118
+            CURLOPT_BINARYTRANSFER => true,
119 119
 
120
-			// we do not need the headers in the output, we get everything we need from curl_getinfo
121
-			CURLOPT_HEADER => false,
120
+            // we do not need the headers in the output, we get everything we need from curl_getinfo
121
+            CURLOPT_HEADER => false,
122 122
 			
123
-			// this both sets the method to HEAD and says not to return a body
124
-			CURLOPT_NOBODY => true,
123
+            // this both sets the method to HEAD and says not to return a body
124
+            CURLOPT_NOBODY => true,
125 125
 
126
-			// set the URL
127
-			CURLOPT_URL => $url,
126
+            // set the URL
127
+            CURLOPT_URL => $url,
128 128
 
129
-			// set the timeout
130
-			CURLOPT_TIMEOUT => $timeout
131
-		));
129
+            // set the timeout
130
+            CURLOPT_TIMEOUT => $timeout
131
+        ));
132 132
 
133
-		// make the request
134
-		$responseBody = curl_exec($curl);
133
+        // make the request
134
+        $responseBody = curl_exec($curl);
135 135
 
136
-		// get info from the transfer
137
-		$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
138
-		$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
136
+        // get info from the transfer
137
+        $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
138
+        $contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
139 139
 		
140
-		// close our curl session - we're done with it
141
-		curl_close($curl);
142
-
143
-		return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
144
-	}
145
-
146
-	public function performPostRequest($url, $postData, $contentType, $timeout = false)
147
-	{
148
-		// check the timeout value
149
-		if ($timeout === false || $timeout <= 0.0)
150
-		{
151
-			// use the default timeout
152
-			$timeout = $this->getDefaultTimeout();
153
-		}
154
-
155
-		$curl = curl_init();
140
+        // close our curl session - we're done with it
141
+        curl_close($curl);
142
+
143
+        return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
144
+    }
145
+
146
+    public function performPostRequest($url, $postData, $contentType, $timeout = false)
147
+    {
148
+        // check the timeout value
149
+        if ($timeout === false || $timeout <= 0.0)
150
+        {
151
+            // use the default timeout
152
+            $timeout = $this->getDefaultTimeout();
153
+        }
154
+
155
+        $curl = curl_init();
156 156
 		
157
-		// set curl POST options
158
-		curl_setopt_array($curl, array(
159
-			// return the response body from curl_exec
160
-			CURLOPT_RETURNTRANSFER => true,
157
+        // set curl POST options
158
+        curl_setopt_array($curl, array(
159
+            // return the response body from curl_exec
160
+            CURLOPT_RETURNTRANSFER => true,
161 161
 
162
-			// get the output as binary data
163
-			CURLOPT_BINARYTRANSFER => true,
162
+            // get the output as binary data
163
+            CURLOPT_BINARYTRANSFER => true,
164 164
 
165
-			// we do not need the headers in the output, we get everything we need from curl_getinfo
166
-			CURLOPT_HEADER => false,
165
+            // we do not need the headers in the output, we get everything we need from curl_getinfo
166
+            CURLOPT_HEADER => false,
167 167
 			
168
-			// make sure we're POST
169
-			CURLOPT_POST => true,
168
+            // make sure we're POST
169
+            CURLOPT_POST => true,
170 170
 
171
-			// set the URL
172
-			CURLOPT_URL => $url,
171
+            // set the URL
172
+            CURLOPT_URL => $url,
173 173
 
174
-			// set the post data
175
-			CURLOPT_POSTFIELDS => $postData,
174
+            // set the post data
175
+            CURLOPT_POSTFIELDS => $postData,
176 176
 
177
-			// set the content type
178
-			CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"),
177
+            // set the content type
178
+            CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"),
179 179
 
180
-			// set the timeout
181
-			CURLOPT_TIMEOUT => $timeout
182
-		));
180
+            // set the timeout
181
+            CURLOPT_TIMEOUT => $timeout
182
+        ));
183 183
 
184
-		// make the request
185
-		$responseBody = curl_exec($curl);
184
+        // make the request
185
+        $responseBody = curl_exec($curl);
186 186
 
187
-		// get info from the transfer
188
-		$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
189
-		$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
187
+        // get info from the transfer
188
+        $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
189
+        $contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
190 190
 
191
-		// close our curl session - we're done with it
192
-		curl_close($curl);
191
+        // close our curl session - we're done with it
192
+        curl_close($curl);
193 193
 
194
-		return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
195
-	}
194
+        return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
195
+    }
196 196
 }
197 197
\ No newline at end of file
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/Abstract.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -42,48 +42,48 @@
 block discarded – undo
42 42
  */
43 43
 abstract class Apache_Solr_HttpTransport_Abstract implements Apache_Solr_HttpTransport_Interface
44 44
 {	
45
-	/**
46
-	 * Our default timeout value for requests that don't specify a timeout
47
-	 *
48
-	 * @var float
49
-	 */
50
-	private $_defaultTimeout = false;
45
+    /**
46
+     * Our default timeout value for requests that don't specify a timeout
47
+     *
48
+     * @var float
49
+     */
50
+    private $_defaultTimeout = false;
51 51
 		
52
-	/**
53
-	 * Get the current default timeout setting (initially the default_socket_timeout ini setting)
54
-	 * in seconds
55
-	 *
56
-	 * @return float
57
-	 */
58
-	public function getDefaultTimeout()
59
-	{
60
-		// lazy load the default timeout from the ini settings
61
-		if ($this->_defaultTimeout === false)
62
-		{
63
-			$this->_defaultTimeout = (int) ini_get('default_socket_timeout');
52
+    /**
53
+     * Get the current default timeout setting (initially the default_socket_timeout ini setting)
54
+     * in seconds
55
+     *
56
+     * @return float
57
+     */
58
+    public function getDefaultTimeout()
59
+    {
60
+        // lazy load the default timeout from the ini settings
61
+        if ($this->_defaultTimeout === false)
62
+        {
63
+            $this->_defaultTimeout = (int) ini_get('default_socket_timeout');
64 64
 
65
-			// double check we didn't get 0 for a timeout
66
-			if ($this->_defaultTimeout <= 0)
67
-			{
68
-				$this->_defaultTimeout = 60;
69
-			}
70
-		}
65
+            // double check we didn't get 0 for a timeout
66
+            if ($this->_defaultTimeout <= 0)
67
+            {
68
+                $this->_defaultTimeout = 60;
69
+            }
70
+        }
71 71
 		
72
-		return $this->_defaultTimeout;
73
-	}
72
+        return $this->_defaultTimeout;
73
+    }
74 74
 	
75
-	/**
76
-	 * Set the current default timeout for all HTTP requests
77
-	 *
78
-	 * @param float $timeout
79
-	 */
80
-	public function setDefaultTimeout($timeout)
81
-	{
82
-		$timeout = (float) $timeout;
75
+    /**
76
+     * Set the current default timeout for all HTTP requests
77
+     *
78
+     * @param float $timeout
79
+     */
80
+    public function setDefaultTimeout($timeout)
81
+    {
82
+        $timeout = (float) $timeout;
83 83
 		
84
-		if ($timeout >= 0)
85
-		{
86
-			$this->_defaultTimeout = $timeout;
87
-		}
88
-	}	
84
+        if ($timeout >= 0)
85
+        {
86
+            $this->_defaultTimeout = $timeout;
87
+        }
88
+    }	
89 89
 }
90 90
\ No newline at end of file
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/FileGetContents.php 1 patch
Indentation   +160 added lines, -160 removed lines patch added patch discarded remove patch
@@ -44,173 +44,173 @@
 block discarded – undo
44 44
  */
45 45
 class Apache_Solr_HttpTransport_FileGetContents extends Apache_Solr_HttpTransport_Abstract
46 46
 {
47
-	/**
48
-	 * SVN Revision meta data for this class
49
-	 */
50
-	const SVN_REVISION = '$Revision:  $';
51
-
52
-	/**
53
-	 * SVN ID meta data for this class
54
-	 */
55
-	const SVN_ID = '$Id:  $';
47
+    /**
48
+     * SVN Revision meta data for this class
49
+     */
50
+    const SVN_REVISION = '$Revision:  $';
51
+
52
+    /**
53
+     * SVN ID meta data for this class
54
+     */
55
+    const SVN_ID = '$Id:  $';
56 56
 		
57
-	/**
58
-	 * Reusable stream context resources for GET and POST operations
59
-	 *
60
-	 * @var resource
61
-	 */
62
-	private $_getContext, $_headContext, $_postContext;
57
+    /**
58
+     * Reusable stream context resources for GET and POST operations
59
+     *
60
+     * @var resource
61
+     */
62
+    private $_getContext, $_headContext, $_postContext;
63 63
 	
64
-	/**
65
-	 * Initializes our reuseable get and post stream contexts
66
-	 */
67
-	public function __construct()
68
-	{
69
-		$this->_getContext = stream_context_create();
70
-		$this->_headContext = stream_context_create();
71
-		$this->_postContext = stream_context_create();
72
-	}
73
-
74
-	public function performGetRequest($url, $timeout = false)
75
-	{
76
-		// set the timeout if specified
77
-		if ($timeout !== FALSE && $timeout > 0.0)
78
-		{
79
-			// timeouts with file_get_contents seem to need
80
-			// to be halved to work as expected
81
-			$timeout = (float) $timeout / 2;
82
-
83
-			stream_context_set_option($this->_getContext, 'http', 'timeout', $timeout);
84
-		}
85
-		else
86
-		{
87
-			// use the default timeout pulled from default_socket_timeout otherwise
88
-			stream_context_set_option($this->_getContext, 'http', 'timeout', $this->getDefaultTimeout());
89
-		}
90
-
91
-		// $http_response_headers will be updated by the call to file_get_contents later
92
-		// see http://us.php.net/manual/en/wrappers.http.php for documentation
93
-		// Unfortunately, it will still create a notice in analyzers if we don't set it here
94
-		$http_response_header = null;
95
-		$responseBody = @file_get_contents($url, false, $this->_getContext);
64
+    /**
65
+     * Initializes our reuseable get and post stream contexts
66
+     */
67
+    public function __construct()
68
+    {
69
+        $this->_getContext = stream_context_create();
70
+        $this->_headContext = stream_context_create();
71
+        $this->_postContext = stream_context_create();
72
+    }
73
+
74
+    public function performGetRequest($url, $timeout = false)
75
+    {
76
+        // set the timeout if specified
77
+        if ($timeout !== FALSE && $timeout > 0.0)
78
+        {
79
+            // timeouts with file_get_contents seem to need
80
+            // to be halved to work as expected
81
+            $timeout = (float) $timeout / 2;
82
+
83
+            stream_context_set_option($this->_getContext, 'http', 'timeout', $timeout);
84
+        }
85
+        else
86
+        {
87
+            // use the default timeout pulled from default_socket_timeout otherwise
88
+            stream_context_set_option($this->_getContext, 'http', 'timeout', $this->getDefaultTimeout());
89
+        }
90
+
91
+        // $http_response_headers will be updated by the call to file_get_contents later
92
+        // see http://us.php.net/manual/en/wrappers.http.php for documentation
93
+        // Unfortunately, it will still create a notice in analyzers if we don't set it here
94
+        $http_response_header = null;
95
+        $responseBody = @file_get_contents($url, false, $this->_getContext);
96 96
 		
97
-		return $this->_getResponseFromParts($responseBody, $http_response_header);
98
-	}
99
-
100
-	public function performHeadRequest($url, $timeout = false)
101
-	{
102
-		stream_context_set_option($this->_headContext, array(
103
-				'http' => array(
104
-					// set HTTP method
105
-					'method' => 'HEAD',
106
-
107
-					// default timeout
108
-					'timeout' => $this->getDefaultTimeout()
109
-				)
110
-			)
111
-		);
112
-
113
-		// set the timeout if specified
114
-		if ($timeout !== FALSE && $timeout > 0.0)
115
-		{
116
-			// timeouts with file_get_contents seem to need
117
-			// to be halved to work as expected
118
-			$timeout = (float) $timeout / 2;
119
-
120
-			stream_context_set_option($this->_headContext, 'http', 'timeout', $timeout);
121
-		}
97
+        return $this->_getResponseFromParts($responseBody, $http_response_header);
98
+    }
99
+
100
+    public function performHeadRequest($url, $timeout = false)
101
+    {
102
+        stream_context_set_option($this->_headContext, array(
103
+                'http' => array(
104
+                    // set HTTP method
105
+                    'method' => 'HEAD',
106
+
107
+                    // default timeout
108
+                    'timeout' => $this->getDefaultTimeout()
109
+                )
110
+            )
111
+        );
112
+
113
+        // set the timeout if specified
114
+        if ($timeout !== FALSE && $timeout > 0.0)
115
+        {
116
+            // timeouts with file_get_contents seem to need
117
+            // to be halved to work as expected
118
+            $timeout = (float) $timeout / 2;
119
+
120
+            stream_context_set_option($this->_headContext, 'http', 'timeout', $timeout);
121
+        }
122 122
 		
123
-		// $http_response_headers will be updated by the call to file_get_contents later
124
-		// see http://us.php.net/manual/en/wrappers.http.php for documentation
125
-		// Unfortunately, it will still create a notice in analyzers if we don't set it here
126
-		$http_response_header = null;
127
-		$responseBody = @file_get_contents($url, false, $this->_headContext);
128
-
129
-		return $this->_getResponseFromParts($responseBody, $http_response_header);
130
-	}
123
+        // $http_response_headers will be updated by the call to file_get_contents later
124
+        // see http://us.php.net/manual/en/wrappers.http.php for documentation
125
+        // Unfortunately, it will still create a notice in analyzers if we don't set it here
126
+        $http_response_header = null;
127
+        $responseBody = @file_get_contents($url, false, $this->_headContext);
128
+
129
+        return $this->_getResponseFromParts($responseBody, $http_response_header);
130
+    }
131 131
 	
132
-	public function performPostRequest($url, $rawPost, $contentType, $timeout = false)
133
-	{
134
-		stream_context_set_option($this->_postContext, array(
135
-				'http' => array(
136
-					// set HTTP method
137
-					'method' => 'POST',
138
-
139
-					// Add our posted content type
140
-					'header' => "Content-Type: $contentType",
141
-
142
-					// the posted content
143
-					'content' => $rawPost,
144
-
145
-					// default timeout
146
-					'timeout' => $this->getDefaultTimeout()
147
-				)
148
-			)
149
-		);
150
-
151
-		// set the timeout if specified
152
-		if ($timeout !== FALSE && $timeout > 0.0)
153
-		{
154
-			// timeouts with file_get_contents seem to need
155
-			// to be halved to work as expected
156
-			$timeout = (float) $timeout / 2;
157
-
158
-			stream_context_set_option($this->_postContext, 'http', 'timeout', $timeout);
159
-		}
160
-
161
-		// $http_response_header will be updated by the call to file_get_contents later
162
-		// see http://us.php.net/manual/en/wrappers.http.php for documentation
163
-		// Unfortunately, it will still create a notice in analyzers if we don't set it here
164
-		$http_response_header = null;
165
-		$responseBody = @file_get_contents($url, false, $this->_postContext);
132
+    public function performPostRequest($url, $rawPost, $contentType, $timeout = false)
133
+    {
134
+        stream_context_set_option($this->_postContext, array(
135
+                'http' => array(
136
+                    // set HTTP method
137
+                    'method' => 'POST',
138
+
139
+                    // Add our posted content type
140
+                    'header' => "Content-Type: $contentType",
141
+
142
+                    // the posted content
143
+                    'content' => $rawPost,
144
+
145
+                    // default timeout
146
+                    'timeout' => $this->getDefaultTimeout()
147
+                )
148
+            )
149
+        );
150
+
151
+        // set the timeout if specified
152
+        if ($timeout !== FALSE && $timeout > 0.0)
153
+        {
154
+            // timeouts with file_get_contents seem to need
155
+            // to be halved to work as expected
156
+            $timeout = (float) $timeout / 2;
157
+
158
+            stream_context_set_option($this->_postContext, 'http', 'timeout', $timeout);
159
+        }
160
+
161
+        // $http_response_header will be updated by the call to file_get_contents later
162
+        // see http://us.php.net/manual/en/wrappers.http.php for documentation
163
+        // Unfortunately, it will still create a notice in analyzers if we don't set it here
164
+        $http_response_header = null;
165
+        $responseBody = @file_get_contents($url, false, $this->_postContext);
166 166
 		
167
-		// reset content of post context to reclaim memory
168
-		stream_context_set_option($this->_postContext, 'http', 'content', '');
167
+        // reset content of post context to reclaim memory
168
+        stream_context_set_option($this->_postContext, 'http', 'content', '');
169 169
 		
170
-		return $this->_getResponseFromParts($responseBody, $http_response_header);
171
-	}
170
+        return $this->_getResponseFromParts($responseBody, $http_response_header);
171
+    }
172 172
 	
173
-	private function _getResponseFromParts($rawResponse, $httpHeaders)
174
-	{
175
-		//Assume 0, false as defaults
176
-		$status = 0;
177
-		$contentType = false;
178
-
179
-		//iterate through headers for real status, type, and encoding
180
-		if (is_array($httpHeaders) && count($httpHeaders) > 0)
181
-		{
182
-			//look at the first headers for the HTTP status code
183
-			//and message (errors are usually returned this way)
184
-			//
185
-			//HTTP 100 Continue response can also be returned before
186
-			//the REAL status header, so we need look until we find
187
-			//the last header starting with HTTP
188
-			//
189
-			//the spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1
190
-			//
191
-			//Thanks to Daniel Andersson for pointing out this oversight
192
-			while (isset($httpHeaders[0]) && substr($httpHeaders[0], 0, 4) == 'HTTP')
193
-			{
194
-				// we can do a intval on status line without the "HTTP/1.X " to get the code
195
-				$status = intval(substr($httpHeaders[0], 9));
196
-
197
-				// remove this from the headers so we can check for more
198
-				array_shift($httpHeaders);
199
-			}
200
-
201
-			//Look for the Content-Type response header and determine type
202
-			//and encoding from it (if possible - such as 'Content-Type: text/plain; charset=UTF-8')
203
-			foreach ($httpHeaders as $header)
204
-			{
205
-				// look for the header that starts appropriately
206
-				if (strncasecmp($header, 'Content-Type:', 13) == 0)
207
-				{
208
-					$contentType = substr($header, 13);
209
-					break;
210
-				}
211
-			}
212
-		}
173
+    private function _getResponseFromParts($rawResponse, $httpHeaders)
174
+    {
175
+        //Assume 0, false as defaults
176
+        $status = 0;
177
+        $contentType = false;
178
+
179
+        //iterate through headers for real status, type, and encoding
180
+        if (is_array($httpHeaders) && count($httpHeaders) > 0)
181
+        {
182
+            //look at the first headers for the HTTP status code
183
+            //and message (errors are usually returned this way)
184
+            //
185
+            //HTTP 100 Continue response can also be returned before
186
+            //the REAL status header, so we need look until we find
187
+            //the last header starting with HTTP
188
+            //
189
+            //the spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1
190
+            //
191
+            //Thanks to Daniel Andersson for pointing out this oversight
192
+            while (isset($httpHeaders[0]) && substr($httpHeaders[0], 0, 4) == 'HTTP')
193
+            {
194
+                // we can do a intval on status line without the "HTTP/1.X " to get the code
195
+                $status = intval(substr($httpHeaders[0], 9));
196
+
197
+                // remove this from the headers so we can check for more
198
+                array_shift($httpHeaders);
199
+            }
200
+
201
+            //Look for the Content-Type response header and determine type
202
+            //and encoding from it (if possible - such as 'Content-Type: text/plain; charset=UTF-8')
203
+            foreach ($httpHeaders as $header)
204
+            {
205
+                // look for the header that starts appropriately
206
+                if (strncasecmp($header, 'Content-Type:', 13) == 0)
207
+                {
208
+                    $contentType = substr($header, 13);
209
+                    break;
210
+                }
211
+            }
212
+        }
213 213
 		
214
-		return new Apache_Solr_HttpTransport_Response($status, $contentType, $rawResponse);
215
-	}
214
+        return new Apache_Solr_HttpTransport_Response($status, $contentType, $rawResponse);
215
+    }
216 216
 }
217 217
\ No newline at end of file
Please login to merge, or discard this patch.
dlf/class.ext_update.php 1 patch
Indentation   +186 added lines, -186 removed lines patch added patch discarded remove patch
@@ -19,265 +19,265 @@
 block discarded – undo
19 19
  */
20 20
 class ext_update {
21 21
 
22
-	/**
23
-	 * This holds the output ready to return
24
-	 *
25
-	 * @var	string
26
-	 * @access protected
27
-	 */
28
-	protected $content = '';
22
+    /**
23
+     * This holds the output ready to return
24
+     *
25
+     * @var	string
26
+     * @access protected
27
+     */
28
+    protected $content = '';
29 29
 
30
-	/**
31
-	 * Triggers the update option in the extension manager
32
-	 *
33
-	 * @access	public
34
-	 *
35
-	 * @return	boolean		Should the update option be shown?
36
-	 */
37
-	public function access() {
30
+    /**
31
+     * Triggers the update option in the extension manager
32
+     *
33
+     * @access	public
34
+     *
35
+     * @return	boolean		Should the update option be shown?
36
+     */
37
+    public function access() {
38 38
 
39
-		if (count($this->getMetadataConfig())) {
39
+        if (count($this->getMetadataConfig())) {
40 40
 
41
-			return TRUE;
41
+            return TRUE;
42 42
 
43
-		} else if ($this->oldIndexRelatedTableNames()) {
43
+        } else if ($this->oldIndexRelatedTableNames()) {
44 44
 
45
-			return TRUE;
45
+            return TRUE;
46 46
 
47
-		}
47
+        }
48 48
 
49
-		return FALSE;
49
+        return FALSE;
50 50
 
51
-	}
51
+    }
52 52
 
53
-	/**
54
-	 * Get all outdated metadata configuration records
55
-	 *
56
-	 * @access	protected
57
-	 *
58
-	 * @return	array		Array of UIDs of outdated records
59
-	 */
60
-	protected function getMetadataConfig() {
53
+    /**
54
+     * Get all outdated metadata configuration records
55
+     *
56
+     * @access	protected
57
+     *
58
+     * @return	array		Array of UIDs of outdated records
59
+     */
60
+    protected function getMetadataConfig() {
61 61
 
62
-		$uids = array ();
62
+        $uids = array ();
63 63
 
64
-		// check if tx_dlf_metadata.xpath exists anyhow
65
-		$fieldsInDatabase = $GLOBALS['TYPO3_DB']->admin_get_fields('tx_dlf_metadata');
64
+        // check if tx_dlf_metadata.xpath exists anyhow
65
+        $fieldsInDatabase = $GLOBALS['TYPO3_DB']->admin_get_fields('tx_dlf_metadata');
66 66
 
67
-		if (! in_array('xpath', array_keys($fieldsInDatabase))) {
67
+        if (! in_array('xpath', array_keys($fieldsInDatabase))) {
68 68
 
69
-			return $uids;
69
+            return $uids;
70 70
 
71
-		}
71
+        }
72 72
 
73
-		// Get all records with outdated configuration.
74
-		$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
75
-			'tx_dlf_metadata.uid AS uid',
76
-			'tx_dlf_metadata',
77
-			'tx_dlf_metadata.format=0 AND NOT tx_dlf_metadata.xpath=\'\''.tx_dlf_helper::whereClause('tx_dlf_metadata'),
78
-			'',
79
-			'',
80
-			''
81
-		);
73
+        // Get all records with outdated configuration.
74
+        $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
75
+            'tx_dlf_metadata.uid AS uid',
76
+            'tx_dlf_metadata',
77
+            'tx_dlf_metadata.format=0 AND NOT tx_dlf_metadata.xpath=\'\''.tx_dlf_helper::whereClause('tx_dlf_metadata'),
78
+            '',
79
+            '',
80
+            ''
81
+        );
82 82
 
83
-		if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
83
+        if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
84 84
 
85
-			while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
85
+            while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
86 86
 
87
-				$uids[] = intval($resArray['uid']);
87
+                $uids[] = intval($resArray['uid']);
88 88
 
89
-			}
89
+            }
90 90
 
91
-		}
91
+        }
92 92
 
93
-		return $uids;
93
+        return $uids;
94 94
 
95
-	}
95
+    }
96 96
 
97
-	/**
98
-	 * The main method of the class
99
-	 *
100
-	 * @access	public
101
-	 *
102
-	 * @return	string		The content that is displayed on the website
103
-	 */
104
-	public function main() {
97
+    /**
98
+     * The main method of the class
99
+     *
100
+     * @access	public
101
+     *
102
+     * @return	string		The content that is displayed on the website
103
+     */
104
+    public function main() {
105 105
 
106
-		// Load localization file.
107
-		$GLOBALS['LANG']->includeLLFile('EXT:dlf/locallang.xml');
106
+        // Load localization file.
107
+        $GLOBALS['LANG']->includeLLFile('EXT:dlf/locallang.xml');
108 108
 
109
-		// Update the metadata configuration.
110
-		if (count($this->getMetadataConfig())) {
111
-			$this->updateMetadataConfig();
112
-		}
109
+        // Update the metadata configuration.
110
+        if (count($this->getMetadataConfig())) {
111
+            $this->updateMetadataConfig();
112
+        }
113 113
 
114
-		if ($this->oldIndexRelatedTableNames()) {
114
+        if ($this->oldIndexRelatedTableNames()) {
115 115
 
116
-			$this->renameIndexRelatedColumns();
116
+            $this->renameIndexRelatedColumns();
117 117
 
118
-		}
118
+        }
119 119
 
120
-		return $this->content;
120
+        return $this->content;
121 121
 
122
-	}
122
+    }
123 123
 
124
-	/**
125
-	 * Check for old index related colums
126
-	 *
127
-	 * @access	protected
128
-	 *
129
-	 * @return	boolean		true if old index related columns exist
130
-	 */
131
-	protected function oldIndexRelatedTableNames() {
124
+    /**
125
+     * Check for old index related colums
126
+     *
127
+     * @access	protected
128
+     *
129
+     * @return	boolean		true if old index related columns exist
130
+     */
131
+    protected function oldIndexRelatedTableNames() {
132 132
 
133
-		$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
134
-			'column_name',
135
-			'INFORMATION_SCHEMA.COLUMNS',
136
-			'TABLE_NAME = "tx_dlf_metadata"',
137
-			'',
138
-			'',
139
-			''
140
-			);
133
+        $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
134
+            'column_name',
135
+            'INFORMATION_SCHEMA.COLUMNS',
136
+            'TABLE_NAME = "tx_dlf_metadata"',
137
+            '',
138
+            '',
139
+            ''
140
+            );
141 141
 
142
-		while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
142
+        while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
143 143
 			
144
-			if($resArray['column_name'] == 'tokenized' 
145
-				|| $resArray['column_name'] == 'stored'
146
-				|| $resArray['column_name'] == 'indexed'
147
-				|| $resArray['column_name'] == 'boost'
148
-				|| $resArray['column_name'] == 'autocomplete') {
144
+            if($resArray['column_name'] == 'tokenized' 
145
+                || $resArray['column_name'] == 'stored'
146
+                || $resArray['column_name'] == 'indexed'
147
+                || $resArray['column_name'] == 'boost'
148
+                || $resArray['column_name'] == 'autocomplete') {
149 149
 
150
-					return TRUE;
150
+                    return TRUE;
151 151
 
152
-			}
152
+            }
153 153
 
154
-		}
154
+        }
155 155
 
156
-	}
156
+    }
157 157
 
158
-	/**
159
-	 * Copy the data of the old index related columns to the new columns
160
-	 *
161
-	 * @access	protected
162
-	 *
163
-	 * @return	void
164
-	 */
165
-	protected function renameIndexRelatedColumns() {
158
+    /**
159
+     * Copy the data of the old index related columns to the new columns
160
+     *
161
+     * @access	protected
162
+     *
163
+     * @return	void
164
+     */
165
+    protected function renameIndexRelatedColumns() {
166 166
 
167
-		$sqlQuery = "UPDATE tx_dlf_metadata SET `index_tokenized` = `tokenized`
167
+        $sqlQuery = "UPDATE tx_dlf_metadata SET `index_tokenized` = `tokenized`
168 168
 											, `index_stored` = `stored`
169 169
 											, `index_indexed` = `indexed`
170 170
 											, `index_boost` = `boost`
171 171
 											, `index_autocomplete` = `autocomplete`";
172 172
 
173
-		// Copy the content of the old tables to the new ones
174
-		$result = $GLOBALS['TYPO3_DB']->sql_query($sqlQuery);
173
+        // Copy the content of the old tables to the new ones
174
+        $result = $GLOBALS['TYPO3_DB']->sql_query($sqlQuery);
175 175
 
176
-		if($result) {
176
+        if($result) {
177 177
 
178
-			$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
179
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
180
-				$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsOkay', TRUE),
181
-				$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
182
-				\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
183
-				FALSE
184
-				);
178
+            $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
179
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
180
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsOkay', TRUE),
181
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
182
+                \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
183
+                FALSE
184
+                );
185 185
 
186
-		} else {
186
+        } else {
187 187
 
188
-			$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
189
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
190
-				$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsNotOkay', TRUE),
191
-				$GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
192
-				\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
193
-				FALSE
194
-				);
188
+            $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
189
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
190
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumnsNotOkay', TRUE),
191
+                $GLOBALS['LANG']->getLL('update.copyIndexRelatedColumns', TRUE),
192
+                \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
193
+                FALSE
194
+                );
195 195
 
196
-		}
196
+        }
197 197
 
198
-		$this->content .= $message->render();
198
+        $this->content .= $message->render();
199 199
 
200
-	}
200
+    }
201 201
 
202
-	/**
203
-	 * Update all outdated metadata configuration records
204
-	 *
205
-	 * @access	protected
206
-	 *
207
-	 * @return	void
208
-	 */
209
-	protected function updateMetadataConfig() {
202
+    /**
203
+     * Update all outdated metadata configuration records
204
+     *
205
+     * @access	protected
206
+     *
207
+     * @return	void
208
+     */
209
+    protected function updateMetadataConfig() {
210 210
 
211
-		$metadataUids = $this->getMetadataConfig();
211
+        $metadataUids = $this->getMetadataConfig();
212 212
 
213
-		if (!empty($metadataUids)) {
213
+        if (!empty($metadataUids)) {
214 214
 
215
-			$data = array ();
215
+            $data = array ();
216 216
 
217
-			// Get all old metadata configuration records.
218
-			$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
219
-				'tx_dlf_metadata.uid AS uid,tx_dlf_metadata.pid AS pid,tx_dlf_metadata.cruser_id AS cruser_id,tx_dlf_metadata.encoded AS encoded,tx_dlf_metadata.xpath AS xpath,tx_dlf_metadata.xpath_sorting AS xpath_sorting',
220
-				'tx_dlf_metadata',
221
-				'tx_dlf_metadata.uid IN ('.implode(',', $metadataUids).')'.tx_dlf_helper::whereClause('tx_dlf_metadata'),
222
-				'',
223
-				'',
224
-				''
225
-			);
217
+            // Get all old metadata configuration records.
218
+            $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
219
+                'tx_dlf_metadata.uid AS uid,tx_dlf_metadata.pid AS pid,tx_dlf_metadata.cruser_id AS cruser_id,tx_dlf_metadata.encoded AS encoded,tx_dlf_metadata.xpath AS xpath,tx_dlf_metadata.xpath_sorting AS xpath_sorting',
220
+                'tx_dlf_metadata',
221
+                'tx_dlf_metadata.uid IN ('.implode(',', $metadataUids).')'.tx_dlf_helper::whereClause('tx_dlf_metadata'),
222
+                '',
223
+                '',
224
+                ''
225
+            );
226 226
 
227
-			while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
227
+            while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
228 228
 
229
-				$newId = uniqid('NEW');
229
+                $newId = uniqid('NEW');
230 230
 
231
-				// Copy record to new table.
232
-				$data['tx_dlf_metadataformat'][$newId] = array (
233
-					'pid' => $resArray['pid'],
234
-					'cruser_id' => $resArray['cruser_id'],
235
-					'parent_id' => $resArray['uid'],
236
-					'encoded' => $resArray['encoded'],
237
-					'xpath' => $resArray['xpath'],
238
-					'xpath_sorting' => $resArray['xpath_sorting']
239
-				);
231
+                // Copy record to new table.
232
+                $data['tx_dlf_metadataformat'][$newId] = array (
233
+                    'pid' => $resArray['pid'],
234
+                    'cruser_id' => $resArray['cruser_id'],
235
+                    'parent_id' => $resArray['uid'],
236
+                    'encoded' => $resArray['encoded'],
237
+                    'xpath' => $resArray['xpath'],
238
+                    'xpath_sorting' => $resArray['xpath_sorting']
239
+                );
240 240
 
241
-				// Add reference to old table.
242
-				$data['tx_dlf_metadata'][$resArray['uid']]['format'] = $newId;
241
+                // Add reference to old table.
242
+                $data['tx_dlf_metadata'][$resArray['uid']]['format'] = $newId;
243 243
 
244
-			}
244
+            }
245 245
 
246
-			if (!empty($data)) {
246
+            if (!empty($data)) {
247 247
 
248
-				// Process datamap.
249
-				$substUids = tx_dlf_helper::processDBasAdmin($data);
248
+                // Process datamap.
249
+                $substUids = tx_dlf_helper::processDBasAdmin($data);
250 250
 
251
-				unset ($data);
251
+                unset ($data);
252 252
 
253
-				if (!empty($substUids)) {
253
+                if (!empty($substUids)) {
254 254
 
255
-					$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
256
-						'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
257
-						$GLOBALS['LANG']->getLL('update.metadataConfigOkay', TRUE),
258
-						$GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
259
-						\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
260
-						FALSE
261
-					);
255
+                    $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
256
+                        'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
257
+                        $GLOBALS['LANG']->getLL('update.metadataConfigOkay', TRUE),
258
+                        $GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
259
+                        \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
260
+                        FALSE
261
+                    );
262 262
 
263
-				} else {
263
+                } else {
264 264
 
265
-					$message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
266
-						'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
267
-						$GLOBALS['LANG']->getLL('update.metadataConfigNotOkay', TRUE),
268
-						$GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
269
-						\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
270
-						FALSE
271
-					);
265
+                    $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
266
+                        'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
267
+                        $GLOBALS['LANG']->getLL('update.metadataConfigNotOkay', TRUE),
268
+                        $GLOBALS['LANG']->getLL('update.metadataConfig', TRUE),
269
+                        \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
270
+                        FALSE
271
+                    );
272 272
 
273
-				}
273
+                }
274 274
 
275
-				$this->content .= $message->render();
275
+                $this->content .= $message->render();
276 276
 
277
-			}
277
+            }
278 278
 
279
-		}
279
+        }
280 280
 
281
-	}
281
+    }
282 282
 
283 283
 }
Please login to merge, or discard this patch.
dlf/modules/indexing/index.php 1 patch
Indentation   +245 added lines, -245 removed lines patch added patch discarded remove patch
@@ -19,368 +19,368 @@
 block discarded – undo
19 19
  */
20 20
 class tx_dlf_modIndexing extends tx_dlf_module {
21 21
 
22
-	protected $modPath = 'indexing/';
22
+    protected $modPath = 'indexing/';
23 23
 
24
-	protected $buttonArray = array (
25
-		'SHORTCUT' => '',
26
-	);
24
+    protected $buttonArray = array (
25
+        'SHORTCUT' => '',
26
+    );
27 27
 
28
-	protected $markerArray = array (
29
-		'CSH' => '',
30
-		'MOD_MENU' => '',
31
-		'CONTENT' => '',
32
-	);
28
+    protected $markerArray = array (
29
+        'CSH' => '',
30
+        'MOD_MENU' => '',
31
+        'CONTENT' => '',
32
+    );
33 33
 
34
-	/**
35
-	 * This holds a list of documents to index
36
-	 *
37
-	 * @var	tx_dlf_list
38
-	 * @access protected
39
-	 */
40
-	protected $list;
34
+    /**
35
+     * This holds a list of documents to index
36
+     *
37
+     * @var	tx_dlf_list
38
+     * @access protected
39
+     */
40
+    protected $list;
41 41
 
42
-	/**
43
-	 * Builds HTML form for selecting a collection
44
-	 *
45
-	 * @access	protected
46
-	 *
47
-	 * @return	string		The HTML output
48
-	 */
49
-	protected function getCollList() {
42
+    /**
43
+     * Builds HTML form for selecting a collection
44
+     *
45
+     * @access	protected
46
+     *
47
+     * @return	string		The HTML output
48
+     */
49
+    protected function getCollList() {
50 50
 
51
-		// Get all available Solr cores.
52
-		$_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
53
-			'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
54
-			'tx_dlf_solrcores',
55
-			'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
56
-			'',
57
-			'',
58
-			''
59
-		);
51
+        // Get all available Solr cores.
52
+        $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
53
+            'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
54
+            'tx_dlf_solrcores',
55
+            'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
56
+            '',
57
+            '',
58
+            ''
59
+        );
60 60
 
61
-		// Get all available collections.
62
-		$_collections = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
63
-			'tx_dlf_collections.label AS label,tx_dlf_collections.uid AS uid',
64
-			'tx_dlf_collections',
65
-			'tx_dlf_collections.fe_cruser_id=0 AND tx_dlf_collections.pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_collections'),
66
-			'',
67
-			'tx_dlf_collections.label ASC',
68
-			''
69
-		);
61
+        // Get all available collections.
62
+        $_collections = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
63
+            'tx_dlf_collections.label AS label,tx_dlf_collections.uid AS uid',
64
+            'tx_dlf_collections',
65
+            'tx_dlf_collections.fe_cruser_id=0 AND tx_dlf_collections.pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_collections'),
66
+            '',
67
+            'tx_dlf_collections.label ASC',
68
+            ''
69
+        );
70 70
 
71
-		// TODO: Ändern!
72
-		$form = '<label for="tx-dlf-modIndexing-id">Kollektion:</label>';
71
+        // TODO: Ändern!
72
+        $form = '<label for="tx-dlf-modIndexing-id">Kollektion:</label>';
73 73
 
74
-		$form .= '<select id="tx-dlf-modIndexing-collection" name="'.$this->prefixId.'[collection]">';
74
+        $form .= '<select id="tx-dlf-modIndexing-collection" name="'.$this->prefixId.'[collection]">';
75 75
 
76
-		$form .= '<option value="0">Alle</option>';
76
+        $form .= '<option value="0">Alle</option>';
77 77
 
78
-		while ($_collection = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_collections)) {
78
+        while ($_collection = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_collections)) {
79 79
 
80
-			$form .= '<option value="'.$_collection['uid'].'">'.htmlspecialchars($_collection['label']).'</option>';
80
+            $form .= '<option value="'.$_collection['uid'].'">'.htmlspecialchars($_collection['label']).'</option>';
81 81
 
82
-		}
82
+        }
83 83
 
84
-		$form .= '</select><br />';
84
+        $form .= '</select><br />';
85 85
 
86
-		$form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">';
86
+        $form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">';
87 87
 
88
-		$form .= '<option value="0">---</option>';
88
+        $form .= '<option value="0">---</option>';
89 89
 
90
-		while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) {
90
+        while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) {
91 91
 
92
-			$form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>';
92
+            $form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>';
93 93
 
94
-		}
94
+        }
95 95
 
96
-		$form .= '</select><br />';
96
+        $form .= '</select><br />';
97 97
 
98
-		$form .= '<input type="hidden" name="CMD" value="reindexDocs" />';
98
+        $form .= '<input type="hidden" name="CMD" value="reindexDocs" />';
99 99
 
100
-		$form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />';
100
+        $form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />';
101 101
 
102
-		return $form;
102
+        return $form;
103 103
 
104
-	}
104
+    }
105 105
 
106
-	/**
107
-	 * Builds HTML form for selecting a file
108
-	 *
109
-	 * @access	protected
110
-	 *
111
-	 * @return	string		The HTML output
112
-	 */
113
-	protected function getFileForm() {
106
+    /**
107
+     * Builds HTML form for selecting a file
108
+     *
109
+     * @access	protected
110
+     *
111
+     * @return	string		The HTML output
112
+     */
113
+    protected function getFileForm() {
114 114
 
115
-		// Get all available Solr cores.
116
-		$_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
117
-			'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
118
-			'tx_dlf_solrcores',
119
-			'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
120
-			'',
121
-			'',
122
-			''
123
-		);
115
+        // Get all available Solr cores.
116
+        $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
117
+            'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid',
118
+            'tx_dlf_solrcores',
119
+            'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'),
120
+            '',
121
+            '',
122
+            ''
123
+        );
124 124
 
125
-		// TODO: Ändern!
126
-		$form = '<label for="tx-dlf-modIndexing-id">METS-Datei:</label>';
125
+        // TODO: Ändern!
126
+        $form = '<label for="tx-dlf-modIndexing-id">METS-Datei:</label>';
127 127
 
128
-		$form .= '<input type="text" id="tx-dlf-modIndexing-id" name="'.$this->prefixId.'[id]" value="" /><br />';
128
+        $form .= '<input type="text" id="tx-dlf-modIndexing-id" name="'.$this->prefixId.'[id]" value="" /><br />';
129 129
 
130
-		$form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">';
130
+        $form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">';
131 131
 
132
-		$form .= '<option value="0">---</option>';
132
+        $form .= '<option value="0">---</option>';
133 133
 
134
-		while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) {
134
+        while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) {
135 135
 
136
-			$form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>';
136
+            $form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>';
137 137
 
138
-		}
138
+        }
139 139
 
140
-		$form .= '</select><br />';
140
+        $form .= '</select><br />';
141 141
 
142
-		$form .= '<input type="hidden" name="CMD" value="indexFile" />';
142
+        $form .= '<input type="hidden" name="CMD" value="indexFile" />';
143 143
 
144
-		$form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />';
144
+        $form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />';
145 145
 
146
-		return $form;
146
+        return $form;
147 147
 
148
-	}
148
+    }
149 149
 
150
-	/**
151
-	 * Iterates through list of documents and indexes them
152
-	 *
153
-	 * @access	protected
154
-	 *
155
-	 * @return	void
156
-	 */
157
-	protected function indexLoop() {
150
+    /**
151
+     * Iterates through list of documents and indexes them
152
+     *
153
+     * @access	protected
154
+     *
155
+     * @return	void
156
+     */
157
+    protected function indexLoop() {
158 158
 
159
-		// Get document from list.
160
-		list ($uid, $title) = $this->list->remove(0);
159
+        // Get document from list.
160
+        list ($uid, $title) = $this->list->remove(0);
161 161
 
162
-		$this->list->save();
162
+        $this->list->save();
163 163
 
164
-		// Save document to database and index.
165
-		$doc =& tx_dlf_document::getInstance($uid, 0, TRUE);
164
+        // Save document to database and index.
165
+        $doc =& tx_dlf_document::getInstance($uid, 0, TRUE);
166 166
 
167
-		if ($doc->ready) {
167
+        if ($doc->ready) {
168 168
 
169
-			$doc->save($doc->pid, $this->data['core']);
169
+            $doc->save($doc->pid, $this->data['core']);
170 170
 
171
-		}
171
+        }
172 172
 
173
-		// Give feedback about progress.
174
-		$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
175
-			'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
176
-			htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.documentsToGo'), count($this->list))),
177
-			tx_dlf_helper::getLL('flash.running', TRUE),
178
-			\TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
179
-			TRUE
180
-		);
173
+        // Give feedback about progress.
174
+        $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
175
+            'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
176
+            htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.documentsToGo'), count($this->list))),
177
+            tx_dlf_helper::getLL('flash.running', TRUE),
178
+            \TYPO3\CMS\Core\Messaging\FlashMessage::INFO,
179
+            TRUE
180
+        );
181 181
 
182
-		$this->markerArray['CONTENT'] .= $_message->render();
182
+        $this->markerArray['CONTENT'] .= $_message->render();
183 183
 
184
-		// Start next loop.
185
-		$this->markerArray['CONTENT'] .= '<script type="text/javascript">window.location.href=unescape("'.\TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeJS(\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'indexLoop', $this->prefixId => array ('core' => $this->data['core']), 'random' => uniqid())))).'");</script>';
184
+        // Start next loop.
185
+        $this->markerArray['CONTENT'] .= '<script type="text/javascript">window.location.href=unescape("'.\TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeJS(\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'indexLoop', $this->prefixId => array ('core' => $this->data['core']), 'random' => uniqid())))).'");</script>';
186 186
 
187
-		$this->printContent();
187
+        $this->printContent();
188 188
 
189
-	}
189
+    }
190 190
 
191
-	/**
192
-	 * Main function of the module
193
-	 *
194
-	 * @access	public
195
-	 *
196
-	 * @return	void
197
-	 */
198
-	public function main() {
191
+    /**
192
+     * Main function of the module
193
+     *
194
+     * @access	public
195
+     *
196
+     * @return	void
197
+     */
198
+    public function main() {
199 199
 
200
-		// Is the user allowed to access this page?
201
-		$access = is_array($this->pageInfo) || $GLOBALS['BE_USER']->isAdmin();
200
+        // Is the user allowed to access this page?
201
+        $access = is_array($this->pageInfo) || $GLOBALS['BE_USER']->isAdmin();
202 202
 
203
-		if ($this->id && $access) {
203
+        if ($this->id && $access) {
204 204
 
205
-			// Increase max_execution_time and max_input_time for large documents.
206
-			if (!ini_get('safe_mode')) {
205
+            // Increase max_execution_time and max_input_time for large documents.
206
+            if (!ini_get('safe_mode')) {
207 207
 
208
-				ini_set('max_execution_time', '0');
208
+                ini_set('max_execution_time', '0');
209 209
 
210
-				ini_set('max_input_time', '-1');
210
+                ini_set('max_input_time', '-1');
211 211
 
212
-			}
212
+            }
213 213
 
214
-			switch ($this->CMD) {
214
+            switch ($this->CMD) {
215 215
 
216
-				case 'indexFile':
216
+                case 'indexFile':
217 217
 
218
-					if (!empty($this->data['id']) && isset($this->data['core'])) {
218
+                    if (!empty($this->data['id']) && isset($this->data['core'])) {
219 219
 
220
-						// Save document to database and index.
221
-						$doc =& tx_dlf_document::getInstance($this->data['id'], $this->id, TRUE);
220
+                        // Save document to database and index.
221
+                        $doc =& tx_dlf_document::getInstance($this->data['id'], $this->id, TRUE);
222 222
 
223
-						if ($doc->ready) {
223
+                        if ($doc->ready) {
224 224
 
225
-							$doc->save($this->id, $this->data['core']);
225
+                            $doc->save($this->id, $this->data['core']);
226 226
 
227
-						} else {
227
+                        } else {
228 228
 
229
-							$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
230
-								'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
231
-								htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.fileNotLoaded'), $this->data['id'])),
232
-								tx_dlf_helper::getLL('flash.error', TRUE),
233
-								\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
234
-								TRUE
235
-							);
229
+                            $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
230
+                                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
231
+                                htmlspecialchars(sprintf(tx_dlf_helper::getLL('flash.fileNotLoaded'), $this->data['id'])),
232
+                                tx_dlf_helper::getLL('flash.error', TRUE),
233
+                                \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
234
+                                TRUE
235
+                            );
236 236
 
237
-							tx_dlf_helper::addMessage($_message);
237
+                            tx_dlf_helper::addMessage($_message);
238 238
 
239
-						}
239
+                        }
240 240
 
241
-					}
241
+                    }
242 242
 
243
-					break;
243
+                    break;
244 244
 
245
-				case 'reindexDocs':
245
+                case 'reindexDocs':
246 246
 
247
-					if (isset($this->data['core'])) {
247
+                    if (isset($this->data['core'])) {
248 248
 
249
-						if (!empty($this->data['collection'])) {
249
+                        if (!empty($this->data['collection'])) {
250 250
 
251
-							// Get all documents in this collection.
252
-							$_result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
253
-								'tx_dlf_documents.title AS title,tx_dlf_documents.uid AS uid',
254
-								'tx_dlf_documents',
255
-								'tx_dlf_relations',
256
-								'tx_dlf_collections',
257
-								'AND tx_dlf_documents.pid='.intval($this->id).' AND tx_dlf_collections.uid='.intval($this->data['collection']).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
258
-								'tx_dlf_documents.uid',
259
-								'',
260
-								''
261
-							);
251
+                            // Get all documents in this collection.
252
+                            $_result = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
253
+                                'tx_dlf_documents.title AS title,tx_dlf_documents.uid AS uid',
254
+                                'tx_dlf_documents',
255
+                                'tx_dlf_relations',
256
+                                'tx_dlf_collections',
257
+                                'AND tx_dlf_documents.pid='.intval($this->id).' AND tx_dlf_collections.uid='.intval($this->data['collection']).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'),
258
+                                'tx_dlf_documents.uid',
259
+                                '',
260
+                                ''
261
+                            );
262 262
 
263
-						} else {
263
+                        } else {
264 264
 
265
-							// Get all documents.
266
-							$_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
267
-								'tx_dlf_documents.title AS title,tx_dlf_documents.uid AS uid',
268
-								'tx_dlf_documents',
269
-								'tx_dlf_documents.pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_documents'),
270
-								'',
271
-								'',
272
-								''
273
-							);
265
+                            // Get all documents.
266
+                            $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
267
+                                'tx_dlf_documents.title AS title,tx_dlf_documents.uid AS uid',
268
+                                'tx_dlf_documents',
269
+                                'tx_dlf_documents.pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_documents'),
270
+                                '',
271
+                                '',
272
+                                ''
273
+                            );
274 274
 
275
-						}
275
+                        }
276 276
 
277
-						// Save them as a list object in user's session.
278
-						$elements = array ();
277
+                        // Save them as a list object in user's session.
278
+                        $elements = array ();
279 279
 
280
-						while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result)) {
280
+                        while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result)) {
281 281
 
282
-							$elements[] = array ($resArray['uid'], $resArray['title']);
282
+                            $elements[] = array ($resArray['uid'], $resArray['title']);
283 283
 
284
-						}
284
+                        }
285 285
 
286
-						$this->list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_dlf_list', $elements);
286
+                        $this->list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_dlf_list', $elements);
287 287
 
288
-						// Start index looping.
289
-						if (count($this->list) > 0) {
288
+                        // Start index looping.
289
+                        if (count($this->list) > 0) {
290 290
 
291
-							$this->indexLoop();
291
+                            $this->indexLoop();
292 292
 
293
-						}
293
+                        }
294 294
 
295
-					}
295
+                    }
296 296
 
297
-					break;
297
+                    break;
298 298
 
299
-				case 'indexLoop':
299
+                case 'indexLoop':
300 300
 
301
-					// Refresh user's session to prevent session timeout.
302
-					$GLOBALS['BE_USER']->fetchUserSession();
301
+                    // Refresh user's session to prevent session timeout.
302
+                    $GLOBALS['BE_USER']->fetchUserSession();
303 303
 
304
-					// Get document list from user's session.
305
-					$this->list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_dlf_list');
304
+                    // Get document list from user's session.
305
+                    $this->list = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_dlf_list');
306 306
 
307
-					// Continue index looping.
308
-					if (count($this->list) > 0 && isset($this->data['core'])) {
307
+                    // Continue index looping.
308
+                    if (count($this->list) > 0 && isset($this->data['core'])) {
309 309
 
310
-						$this->indexLoop();
310
+                        $this->indexLoop();
311 311
 
312
-					} else {
312
+                    } else {
313 313
 
314
-						$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
315
-							'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
316
-							tx_dlf_helper::getLL('flash.seeLog', TRUE),
317
-							tx_dlf_helper::getLL('flash.done', TRUE),
318
-							\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
319
-							TRUE
320
-						);
314
+                        $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
315
+                            'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
316
+                            tx_dlf_helper::getLL('flash.seeLog', TRUE),
317
+                            tx_dlf_helper::getLL('flash.done', TRUE),
318
+                            \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
319
+                            TRUE
320
+                        );
321 321
 
322
-						tx_dlf_helper::addMessage($_message);
322
+                        tx_dlf_helper::addMessage($_message);
323 323
 
324
-					}
324
+                    }
325 325
 
326
-					break;
326
+                    break;
327 327
 
328
-			}
328
+            }
329 329
 
330 330
 
331
-			$this->markerArray['CONTENT'] .= tx_dlf_helper::renderFlashMessages();
331
+            $this->markerArray['CONTENT'] .= tx_dlf_helper::renderFlashMessages();
332 332
 
333
-			switch ($this->MOD_SETTINGS['function']) {
333
+            switch ($this->MOD_SETTINGS['function']) {
334 334
 
335
-				case 'indexFile':
335
+                case 'indexFile':
336 336
 
337
-					$this->markerArray['CONTENT'] .= $this->getFileForm();
337
+                    $this->markerArray['CONTENT'] .= $this->getFileForm();
338 338
 
339
-					break;
339
+                    break;
340 340
 
341
-				case 'reindexDoc':
341
+                case 'reindexDoc':
342 342
 
343
-					$this->markerArray['CONTENT'] .= $this->getDocList();
343
+                    $this->markerArray['CONTENT'] .= $this->getDocList();
344 344
 
345
-					break;
345
+                    break;
346 346
 
347
-				case 'reindexDocs':
347
+                case 'reindexDocs':
348 348
 
349
-					$this->markerArray['CONTENT'] .= $this->getCollList();
349
+                    $this->markerArray['CONTENT'] .= $this->getCollList();
350 350
 
351
-					break;
351
+                    break;
352 352
 
353
-			}
353
+            }
354 354
 
355
-		} else {
355
+        } else {
356 356
 
357
-			// TODO: Ändern!
358
-			$this->markerArray['CONTENT'] .= 'You are not allowed to access this page or have not selected a page, yet.';
357
+            // TODO: Ändern!
358
+            $this->markerArray['CONTENT'] .= 'You are not allowed to access this page or have not selected a page, yet.';
359 359
 
360
-		}
360
+        }
361 361
 
362
-		$this->printContent();
362
+        $this->printContent();
363 363
 
364
-	}
364
+    }
365 365
 
366
-	/**
367
-	 * Sets the module's MOD_MENU configuration
368
-	 *
369
-	 * @access	protected
370
-	 *
371
-	 * @return	void
372
-	 */
373
-	protected function setMOD_MENU() {
366
+    /**
367
+     * Sets the module's MOD_MENU configuration
368
+     *
369
+     * @access	protected
370
+     *
371
+     * @return	void
372
+     */
373
+    protected function setMOD_MENU() {
374 374
 
375
-		$this->MOD_MENU = array (
376
-			'function' => array (
377
-				'indexFile' => $GLOBALS['LANG']->getLL('function.indexFile'),
378
-				//'reindexDoc' => $GLOBALS['LANG']->getLL('function.reindexDoc'),
379
-				'reindexDocs' => $GLOBALS['LANG']->getLL('function.reindexDocs'),
380
-			)
381
-		);
375
+        $this->MOD_MENU = array (
376
+            'function' => array (
377
+                'indexFile' => $GLOBALS['LANG']->getLL('function.indexFile'),
378
+                //'reindexDoc' => $GLOBALS['LANG']->getLL('function.reindexDoc'),
379
+                'reindexDocs' => $GLOBALS['LANG']->getLL('function.reindexDocs'),
380
+            )
381
+        );
382 382
 
383
-	}
383
+    }
384 384
 
385 385
 }
386 386
 
Please login to merge, or discard this patch.
dlf/modules/newclient/index.php 1 patch
Indentation   +382 added lines, -382 removed lines patch added patch discarded remove patch
@@ -19,489 +19,489 @@
 block discarded – undo
19 19
  */
20 20
 class tx_dlf_modNewclient extends tx_dlf_module {
21 21
 
22
-	protected $modPath = 'newclient/';
22
+    protected $modPath = 'newclient/';
23 23
 
24
-	protected $buttonArray = array (
25
-		'SHORTCUT' => '',
26
-	);
24
+    protected $buttonArray = array (
25
+        'SHORTCUT' => '',
26
+    );
27 27
 
28
-	protected $markerArray = array (
29
-		'CSH' => '',
30
-		'MOD_MENU' => '',
31
-		'CONTENT' => '',
32
-	);
28
+    protected $markerArray = array (
29
+        'CSH' => '',
30
+        'MOD_MENU' => '',
31
+        'CONTENT' => '',
32
+    );
33 33
 
34
-	/**
35
-	 * Add access rights
36
-	 *
37
-	 * @access	protected
38
-	 *
39
-	 * @return	void
40
-	 */
41
-	protected function cmdAddAccessRights() {
34
+    /**
35
+     * Add access rights
36
+     *
37
+     * @access	protected
38
+     *
39
+     * @return	void
40
+     */
41
+    protected function cmdAddAccessRights() {
42 42
 
43
-		// Get command line indexer's usergroup.
44
-		$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
45
-				'uid,db_mountpoints',
46
-				'be_groups',
47
-				'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').' AND '.$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'].'=0'.\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups')
48
-		);
43
+        // Get command line indexer's usergroup.
44
+        $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
45
+                'uid,db_mountpoints',
46
+                'be_groups',
47
+                'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').' AND '.$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'].'=0'.\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups')
48
+        );
49 49
 
50
-		if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
50
+        if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
51 51
 
52
-			$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
52
+            $resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
53 53
 
54
-			// Add current page to mountpoints.
55
-			if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($resArray['db_mountpoints'], $this->id)) {
54
+            // Add current page to mountpoints.
55
+            if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inList($resArray['db_mountpoints'], $this->id)) {
56 56
 
57
-				$data['be_groups'][$resArray['uid']]['db_mountpoints'] = $resArray['db_mountpoints'].','.$this->id;
57
+                $data['be_groups'][$resArray['uid']]['db_mountpoints'] = $resArray['db_mountpoints'].','.$this->id;
58 58
 
59
-				tx_dlf_helper::processDBasAdmin($data);
59
+                tx_dlf_helper::processDBasAdmin($data);
60 60
 
61
-				// Fine.
62
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
63
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
64
-					tx_dlf_helper::getLL('flash.usergroupAddedMsg'),
65
-					tx_dlf_helper::getLL('flash.usergroupAdded', TRUE),
66
-					\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
67
-					FALSE
68
-				);
61
+                // Fine.
62
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
63
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
64
+                    tx_dlf_helper::getLL('flash.usergroupAddedMsg'),
65
+                    tx_dlf_helper::getLL('flash.usergroupAdded', TRUE),
66
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
67
+                    FALSE
68
+                );
69 69
 
70
-				tx_dlf_helper::addMessage($_message);
70
+                tx_dlf_helper::addMessage($_message);
71 71
 
72
-			}
72
+            }
73 73
 
74
-		}
74
+        }
75 75
 
76
-	}
76
+    }
77 77
 
78
-	/**
79
-	 * Add metadata configuration
80
-	 *
81
-	 * @access	protected
82
-	 *
83
-	 * @return	void
84
-	 */
85
-	protected function cmdAddMetadata() {
78
+    /**
79
+     * Add metadata configuration
80
+     *
81
+     * @access	protected
82
+     *
83
+     * @return	void
84
+     */
85
+    protected function cmdAddMetadata() {
86 86
 
87
-		// Include metadata definition file.
88
-		include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'metadata.inc.php');
89
-
90
-		$i = 0;
87
+        // Include metadata definition file.
88
+        include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'metadata.inc.php');
89
+
90
+        $i = 0;
91 91
 
92
-		// Build data array.
93
-		foreach ($metadata as $index_name => $values) {
92
+        // Build data array.
93
+        foreach ($metadata as $index_name => $values) {
94 94
 
95
-			$formatIds = array ();
95
+            $formatIds = array ();
96 96
 
97
-			foreach ($values['format'] as $format) {
98
-
99
-				$formatIds[] = uniqid('NEW');
100
-
101
-				$data['tx_dlf_metadataformat'][end($formatIds)] = $format;
102
-
103
-				$data['tx_dlf_metadataformat'][end($formatIds)]['pid'] = intval($this->id);
97
+            foreach ($values['format'] as $format) {
98
+
99
+                $formatIds[] = uniqid('NEW');
100
+
101
+                $data['tx_dlf_metadataformat'][end($formatIds)] = $format;
102
+
103
+                $data['tx_dlf_metadataformat'][end($formatIds)]['pid'] = intval($this->id);
104 104
 
105
-				$i++;
105
+                $i++;
106 106
 
107
-			}
107
+            }
108 108
 
109
-			$data['tx_dlf_metadata'][uniqid('NEW')] = array (
110
-				'pid' => intval($this->id),
111
-				'label' => $GLOBALS['LANG']->getLL($index_name),
112
-				'index_name' => $index_name,
113
-				'format' => implode(',', $formatIds),
114
-				'default_value' => $values['default_value'],
115
-				'wrap' => (!empty($values['wrap']) ? $values['wrap'] : $GLOBALS['TCA']['tx_dlf_metadata']['columns']['wrap']['config']['default']),
116
-				'index_tokenized' => $values['index_tokenized'],
117
-				'index_stored' => $values['index_stored'],
118
-				'index_indexed' => $values['index_indexed'],
119
-				'index_boost' => $values['index_boost'],
120
-				'is_sortable' => $values['is_sortable'],
121
-				'is_facet' => $values['is_facet'],
122
-				'is_listed' => $values['is_listed'],
123
-				'index_autocomplete' => $values['index_autocomplete'],
124
-			);
125
-
126
-			$i++;
127
-
128
-		}
129
-
130
-		$_ids = tx_dlf_helper::processDBasAdmin($data);
131
-
132
-		// Check for failed inserts.
133
-		if (count($_ids) == $i) {
134
-
135
-			// Fine.
136
-			$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
137
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
138
-				tx_dlf_helper::getLL('flash.metadataAddedMsg'),
139
-				tx_dlf_helper::getLL('flash.metadataAdded', TRUE),
140
-				\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
141
-				FALSE
142
-			);
109
+            $data['tx_dlf_metadata'][uniqid('NEW')] = array (
110
+                'pid' => intval($this->id),
111
+                'label' => $GLOBALS['LANG']->getLL($index_name),
112
+                'index_name' => $index_name,
113
+                'format' => implode(',', $formatIds),
114
+                'default_value' => $values['default_value'],
115
+                'wrap' => (!empty($values['wrap']) ? $values['wrap'] : $GLOBALS['TCA']['tx_dlf_metadata']['columns']['wrap']['config']['default']),
116
+                'index_tokenized' => $values['index_tokenized'],
117
+                'index_stored' => $values['index_stored'],
118
+                'index_indexed' => $values['index_indexed'],
119
+                'index_boost' => $values['index_boost'],
120
+                'is_sortable' => $values['is_sortable'],
121
+                'is_facet' => $values['is_facet'],
122
+                'is_listed' => $values['is_listed'],
123
+                'index_autocomplete' => $values['index_autocomplete'],
124
+            );
125
+
126
+            $i++;
127
+
128
+        }
129
+
130
+        $_ids = tx_dlf_helper::processDBasAdmin($data);
131
+
132
+        // Check for failed inserts.
133
+        if (count($_ids) == $i) {
134
+
135
+            // Fine.
136
+            $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
137
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
138
+                tx_dlf_helper::getLL('flash.metadataAddedMsg'),
139
+                tx_dlf_helper::getLL('flash.metadataAdded', TRUE),
140
+                \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
141
+                FALSE
142
+            );
143 143
 
144
-		} else {
144
+        } else {
145 145
 
146
-			// Something went wrong.
147
-			$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
148
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
149
-				tx_dlf_helper::getLL('flash.metadataNotAddedMsg'),
150
-				tx_dlf_helper::getLL('flash.metadataNotAdded', TRUE),
151
-				\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
152
-				FALSE
153
-			);
154
-
155
-		}
156
-
157
-		tx_dlf_helper::addMessage($_message);
158
-
159
-	}
160
-
161
-	/**
162
-	 * Add Solr core
163
-	 *
164
-	 * @access	protected
165
-	 *
166
-	 * @return	void
167
-	 */
168
-	protected function cmdAddSolrCore() {
146
+            // Something went wrong.
147
+            $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
148
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
149
+                tx_dlf_helper::getLL('flash.metadataNotAddedMsg'),
150
+                tx_dlf_helper::getLL('flash.metadataNotAdded', TRUE),
151
+                \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
152
+                FALSE
153
+            );
154
+
155
+        }
156
+
157
+        tx_dlf_helper::addMessage($_message);
158
+
159
+    }
160
+
161
+    /**
162
+     * Add Solr core
163
+     *
164
+     * @access	protected
165
+     *
166
+     * @return	void
167
+     */
168
+    protected function cmdAddSolrCore() {
169 169
 
170
-		// Build data array.
171
-		$data['tx_dlf_solrcores'][uniqid('NEW')] = array (
172
-			'pid' => intval($this->id),
173
-			'label' => $GLOBALS['LANG']->getLL('solrcore').' (PID '.$this->id.')',
174
-			'index_name' => '',
175
-		);
176
-
177
-		$_ids = tx_dlf_helper::processDBasAdmin($data);
178
-
179
-		// Check for failed inserts.
180
-		if (count($_ids) == 1) {
181
-
182
-			// Fine.
183
-			$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
184
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
185
-				tx_dlf_helper::getLL('flash.solrcoreAddedMsg'),
186
-				tx_dlf_helper::getLL('flash.solrcoreAdded', TRUE),
187
-				\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
188
-				FALSE
189
-			);
190
-
191
-		} else {
192
-
193
-			// Something went wrong.
194
-			$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
195
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
196
-				tx_dlf_helper::getLL('flash.solrcoreNotAddedMsg'),
197
-				tx_dlf_helper::getLL('flash.solrcoreNotAdded', TRUE),
198
-				\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
199
-				FALSE
200
-			);
201
-
202
-		}
203
-
204
-		tx_dlf_helper::addMessage($_message);
205
-
206
-	}
207
-
208
-	/**
209
-	 * Add structure configuration
210
-	 *
211
-	 * @access	protected
212
-	 *
213
-	 * @return	void
214
-	 */
215
-	protected function cmdAddStructure() {
170
+        // Build data array.
171
+        $data['tx_dlf_solrcores'][uniqid('NEW')] = array (
172
+            'pid' => intval($this->id),
173
+            'label' => $GLOBALS['LANG']->getLL('solrcore').' (PID '.$this->id.')',
174
+            'index_name' => '',
175
+        );
176
+
177
+        $_ids = tx_dlf_helper::processDBasAdmin($data);
178
+
179
+        // Check for failed inserts.
180
+        if (count($_ids) == 1) {
181
+
182
+            // Fine.
183
+            $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
184
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
185
+                tx_dlf_helper::getLL('flash.solrcoreAddedMsg'),
186
+                tx_dlf_helper::getLL('flash.solrcoreAdded', TRUE),
187
+                \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
188
+                FALSE
189
+            );
190
+
191
+        } else {
192
+
193
+            // Something went wrong.
194
+            $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
195
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
196
+                tx_dlf_helper::getLL('flash.solrcoreNotAddedMsg'),
197
+                tx_dlf_helper::getLL('flash.solrcoreNotAdded', TRUE),
198
+                \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
199
+                FALSE
200
+            );
201
+
202
+        }
203
+
204
+        tx_dlf_helper::addMessage($_message);
205
+
206
+    }
207
+
208
+    /**
209
+     * Add structure configuration
210
+     *
211
+     * @access	protected
212
+     *
213
+     * @return	void
214
+     */
215
+    protected function cmdAddStructure() {
216 216
 
217
-		// Include structure definition file.
218
-		include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'structures.inc.php');
217
+        // Include structure definition file.
218
+        include_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($this->extKey).'modules/'.$this->modPath.'structures.inc.php');
219 219
 
220
-		// Build data array.
221
-		foreach ($structures as $index_name => $values) {
220
+        // Build data array.
221
+        foreach ($structures as $index_name => $values) {
222 222
 
223
-			$data['tx_dlf_structures'][uniqid('NEW')] = array (
224
-				'pid' => intval($this->id),
225
-				'toplevel' => $values['toplevel'],
226
-				'label' => $GLOBALS['LANG']->getLL($index_name),
227
-				'index_name' => $index_name,
228
-				'oai_name' => $values['oai_name'],
229
-				'thumbnail' => 0,
230
-			);
223
+            $data['tx_dlf_structures'][uniqid('NEW')] = array (
224
+                'pid' => intval($this->id),
225
+                'toplevel' => $values['toplevel'],
226
+                'label' => $GLOBALS['LANG']->getLL($index_name),
227
+                'index_name' => $index_name,
228
+                'oai_name' => $values['oai_name'],
229
+                'thumbnail' => 0,
230
+            );
231 231
 
232
-		}
233
-
234
-		$_ids = tx_dlf_helper::processDBasAdmin($data);
235
-
236
-		// Check for failed inserts.
237
-		if (count($_ids) == count($structures)) {
232
+        }
233
+
234
+        $_ids = tx_dlf_helper::processDBasAdmin($data);
235
+
236
+        // Check for failed inserts.
237
+        if (count($_ids) == count($structures)) {
238 238
 
239
-			// Fine.
240
-			$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
241
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
242
-				tx_dlf_helper::getLL('flash.structureAddedMsg'),
243
-				tx_dlf_helper::getLL('flash.structureAdded', TRUE),
244
-				\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
245
-				FALSE
246
-			);
239
+            // Fine.
240
+            $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
241
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
242
+                tx_dlf_helper::getLL('flash.structureAddedMsg'),
243
+                tx_dlf_helper::getLL('flash.structureAdded', TRUE),
244
+                \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
245
+                FALSE
246
+            );
247 247
 
248
-		} else {
248
+        } else {
249 249
 
250
-			// Something went wrong.
251
-			$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
252
-				'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
253
-				tx_dlf_helper::getLL('flash.structureNotAddedMsg'),
254
-				tx_dlf_helper::getLL('flash.structureNotAdded', TRUE),
255
-				\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
256
-				FALSE
257
-			);
250
+            // Something went wrong.
251
+            $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
252
+                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
253
+                tx_dlf_helper::getLL('flash.structureNotAddedMsg'),
254
+                tx_dlf_helper::getLL('flash.structureNotAdded', TRUE),
255
+                \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
256
+                FALSE
257
+            );
258 258
 
259
-		}
259
+        }
260 260
 
261
-		tx_dlf_helper::addMessage($_message);
261
+        tx_dlf_helper::addMessage($_message);
262 262
 
263
-	}
263
+    }
264 264
 
265
-	/**
266
-	 * Main function of the module
267
-	 *
268
-	 * @access	public
269
-	 *
270
-	 * @return	void
271
-	 */
272
-	public function main() {
265
+    /**
266
+     * Main function of the module
267
+     *
268
+     * @access	public
269
+     *
270
+     * @return	void
271
+     */
272
+    public function main() {
273 273
 
274
-		// Is the user allowed to access this page?
275
-		$access = is_array($this->pageInfo) && $GLOBALS['BE_USER']->isAdmin();
274
+        // Is the user allowed to access this page?
275
+        $access = is_array($this->pageInfo) && $GLOBALS['BE_USER']->isAdmin();
276 276
 
277
-		if ($this->id && $access) {
277
+        if ($this->id && $access) {
278 278
 
279
-			// Check if page is sysfolder.
280
-			if ($this->pageInfo['doktype'] != 254) {
279
+            // Check if page is sysfolder.
280
+            if ($this->pageInfo['doktype'] != 254) {
281 281
 
282
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
283
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
284
-					tx_dlf_helper::getLL('flash.wrongPageTypeMsg'),
285
-					tx_dlf_helper::getLL('flash.wrongPageType', TRUE),
286
-					\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
287
-					FALSE
288
-				);
282
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
283
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
284
+                    tx_dlf_helper::getLL('flash.wrongPageTypeMsg'),
285
+                    tx_dlf_helper::getLL('flash.wrongPageType', TRUE),
286
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
287
+                    FALSE
288
+                );
289 289
 
290
-				tx_dlf_helper::addMessage($_message);
290
+                tx_dlf_helper::addMessage($_message);
291 291
 
292
-				$this->markerArray['CONTENT'] .= tx_dlf_helper::renderFlashMessages();
292
+                $this->markerArray['CONTENT'] .= tx_dlf_helper::renderFlashMessages();
293 293
 
294
-				$this->printContent();
294
+                $this->printContent();
295 295
 
296
-				return;
296
+                return;
297 297
 
298
-			}
298
+            }
299 299
 
300
-			// Should we do something?
301
-			if (!empty($this->CMD)) {
300
+            // Should we do something?
301
+            if (!empty($this->CMD)) {
302 302
 
303
-				// Sanitize input...
304
-				$_method = 'cmd'.ucfirst($this->CMD);
303
+                // Sanitize input...
304
+                $_method = 'cmd'.ucfirst($this->CMD);
305 305
 
306
-				// ...and unset to prevent infinite looping.
307
-				unset ($this->CMD);
306
+                // ...and unset to prevent infinite looping.
307
+                unset ($this->CMD);
308 308
 
309
-				if (method_exists($this, $_method)) {
309
+                if (method_exists($this, $_method)) {
310 310
 
311
-					$this->$_method();
311
+                    $this->$_method();
312 312
 
313
-				}
313
+                }
314 314
 
315
-			}
315
+            }
316 316
 
317
-			// Check for existing structure configuration.
318
-			$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
319
-				'uid',
320
-				'tx_dlf_structures',
321
-				'pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_structures')
322
-			);
317
+            // Check for existing structure configuration.
318
+            $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
319
+                'uid',
320
+                'tx_dlf_structures',
321
+                'pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_structures')
322
+            );
323 323
 
324
-			if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
324
+            if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
325 325
 
326
-				// Fine.
327
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
328
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
329
-					tx_dlf_helper::getLL('flash.structureOkayMsg'),
330
-					tx_dlf_helper::getLL('flash.structureOkay', TRUE),
331
-					\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
332
-					FALSE
333
-				);
326
+                // Fine.
327
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
328
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
329
+                    tx_dlf_helper::getLL('flash.structureOkayMsg'),
330
+                    tx_dlf_helper::getLL('flash.structureOkay', TRUE),
331
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
332
+                    FALSE
333
+                );
334 334
 
335
-			} else {
335
+            } else {
336 336
 
337
-				// Configuration missing.
338
-				$_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addStructure')));
337
+                // Configuration missing.
338
+                $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addStructure')));
339 339
 
340
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
341
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
342
-					sprintf(tx_dlf_helper::getLL('flash.structureNotOkayMsg'), $_url),
343
-					tx_dlf_helper::getLL('flash.structureNotOkay', TRUE),
344
-					\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
345
-					FALSE
346
-				);
340
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
341
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
342
+                    sprintf(tx_dlf_helper::getLL('flash.structureNotOkayMsg'), $_url),
343
+                    tx_dlf_helper::getLL('flash.structureNotOkay', TRUE),
344
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
345
+                    FALSE
346
+                );
347 347
 
348
-			}
348
+            }
349 349
 
350
-			tx_dlf_helper::addMessage($_message);
350
+            tx_dlf_helper::addMessage($_message);
351 351
 
352
-			// Check for existing metadata configuration.
353
-			$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
354
-				'uid',
355
-				'tx_dlf_metadata',
356
-				'pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_metadata')
357
-			);
352
+            // Check for existing metadata configuration.
353
+            $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
354
+                'uid',
355
+                'tx_dlf_metadata',
356
+                'pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_metadata')
357
+            );
358 358
 
359
-			if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
359
+            if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
360 360
 
361
-				// Fine.
362
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
363
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
364
-					tx_dlf_helper::getLL('flash.metadataOkayMsg'),
365
-					tx_dlf_helper::getLL('flash.metadataOkay', TRUE),
366
-					\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
367
-					FALSE
368
-				);
361
+                // Fine.
362
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
363
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
364
+                    tx_dlf_helper::getLL('flash.metadataOkayMsg'),
365
+                    tx_dlf_helper::getLL('flash.metadataOkay', TRUE),
366
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
367
+                    FALSE
368
+                );
369 369
 
370
-			} else {
370
+            } else {
371 371
 
372
-				// Configuration missing.
373
-				$_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addMetadata')));
372
+                // Configuration missing.
373
+                $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addMetadata')));
374 374
 
375
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
376
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
377
-					sprintf(tx_dlf_helper::getLL('flash.metadataNotOkayMsg'), $_url),
378
-					tx_dlf_helper::getLL('flash.metadataNotOkay', TRUE),
379
-					\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
380
-					FALSE
381
-				);
375
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
376
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
377
+                    sprintf(tx_dlf_helper::getLL('flash.metadataNotOkayMsg'), $_url),
378
+                    tx_dlf_helper::getLL('flash.metadataNotOkay', TRUE),
379
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
380
+                    FALSE
381
+                );
382 382
 
383
-			}
383
+            }
384 384
 
385
-			tx_dlf_helper::addMessage($_message);
385
+            tx_dlf_helper::addMessage($_message);
386 386
 
387
-			// Check the access conditions for the command line indexer's user.
388
-			$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
389
-				'uid,db_mountpoints',
390
-				'be_groups',
391
-				'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').' AND '.$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'].'=0'.\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups')
392
-			);
387
+            // Check the access conditions for the command line indexer's user.
388
+            $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
389
+                'uid,db_mountpoints',
390
+                'be_groups',
391
+                'title='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_groups').' AND '.$GLOBALS['TCA']['be_groups']['ctrl']['enablecolumns']['disabled'].'=0'.\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_groups')
392
+            );
393 393
 
394
-			if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
394
+            if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
395 395
 
396
-				$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
396
+                $resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
397 397
 
398
-				if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($resArray['db_mountpoints'], $this->id)) {
398
+                if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($resArray['db_mountpoints'], $this->id)) {
399 399
 
400
-					// Fine.
401
-					$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
402
-						'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
403
-						tx_dlf_helper::getLL('flash.usergroupOkayMsg'),
404
-						tx_dlf_helper::getLL('flash.usergroupOkay', TRUE),
405
-						\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
406
-						FALSE
407
-					);
400
+                    // Fine.
401
+                    $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
402
+                        'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
403
+                        tx_dlf_helper::getLL('flash.usergroupOkayMsg'),
404
+                        tx_dlf_helper::getLL('flash.usergroupOkay', TRUE),
405
+                        \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
406
+                        FALSE
407
+                    );
408 408
 
409
-				} else {
409
+                } else {
410 410
 
411
-					// Configuration missing.
412
-					$_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addAccessRights')));
411
+                    // Configuration missing.
412
+                    $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addAccessRights')));
413 413
 
414
-					$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
415
-						'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
416
-						sprintf(tx_dlf_helper::getLL('flash.usergroupNotOkayMsg'), $_url),
417
-						tx_dlf_helper::getLL('flash.usergroupNotOkay', TRUE),
418
-						\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
419
-						FALSE
420
-					);
414
+                    $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
415
+                        'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
416
+                        sprintf(tx_dlf_helper::getLL('flash.usergroupNotOkayMsg'), $_url),
417
+                        tx_dlf_helper::getLL('flash.usergroupNotOkay', TRUE),
418
+                        \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
419
+                        FALSE
420
+                    );
421 421
 
422
-				}
422
+                }
423 423
 
424
-			} else {
424
+            } else {
425 425
 
426
-				// Usergoup missing.
427
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
428
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
429
-					tx_dlf_helper::getLL('flash.usergroupMissingMsg'),
430
-					tx_dlf_helper::getLL('flash.usergroupMissing', TRUE),
431
-					\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
432
-					FALSE
433
-				);
426
+                // Usergoup missing.
427
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
428
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
429
+                    tx_dlf_helper::getLL('flash.usergroupMissingMsg'),
430
+                    tx_dlf_helper::getLL('flash.usergroupMissing', TRUE),
431
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR,
432
+                    FALSE
433
+                );
434 434
 
435
-			}
435
+            }
436 436
 
437
-			tx_dlf_helper::addMessage($_message);
437
+            tx_dlf_helper::addMessage($_message);
438 438
 
439
-			// Check for existing Solr core.
440
-			$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
441
-				'uid,pid',
442
-				'tx_dlf_solrcores',
443
-				'pid IN ('.intval($this->id).',0)'.tx_dlf_helper::whereClause('tx_dlf_solrcores')
444
-			);
439
+            // Check for existing Solr core.
440
+            $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
441
+                'uid,pid',
442
+                'tx_dlf_solrcores',
443
+                'pid IN ('.intval($this->id).',0)'.tx_dlf_helper::whereClause('tx_dlf_solrcores')
444
+            );
445 445
 
446
-			if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
446
+            if ($GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
447 447
 
448
-				$resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
448
+                $resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
449 449
 
450
-				if ($resArray['pid']) {
450
+                if ($resArray['pid']) {
451 451
 
452
-					// Fine.
453
-					$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
454
-						'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
455
-						tx_dlf_helper::getLL('flash.solrcoreOkayMsg'),
456
-						tx_dlf_helper::getLL('flash.solrcoreOkay', TRUE),
457
-						\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
458
-						FALSE
459
-					);
452
+                    // Fine.
453
+                    $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
454
+                        'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
455
+                        tx_dlf_helper::getLL('flash.solrcoreOkayMsg'),
456
+                        tx_dlf_helper::getLL('flash.solrcoreOkay', TRUE),
457
+                        \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
458
+                        FALSE
459
+                    );
460 460
 
461
-				} else {
461
+                } else {
462 462
 
463
-					// Default core available, but this is deprecated.
464
-					$_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addSolrcore')));
463
+                    // Default core available, but this is deprecated.
464
+                    $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addSolrcore')));
465 465
 
466
-					$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
467
-						'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
468
-						sprintf(tx_dlf_helper::getLL('flash.solrcoreDeprecatedMsg'), $_url),
469
-						tx_dlf_helper::getLL('flash.solrcoreDeprecatedOkay', TRUE),
470
-						\TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE,
471
-						FALSE
472
-					);
466
+                    $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
467
+                        'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
468
+                        sprintf(tx_dlf_helper::getLL('flash.solrcoreDeprecatedMsg'), $_url),
469
+                        tx_dlf_helper::getLL('flash.solrcoreDeprecatedOkay', TRUE),
470
+                        \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE,
471
+                        FALSE
472
+                    );
473 473
 
474
-				}
474
+                }
475 475
 
476
-			} else {
476
+            } else {
477 477
 
478
-				// Solr core missing.
479
-				$_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addSolrcore')));
478
+                // Solr core missing.
479
+                $_url = \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'addSolrcore')));
480 480
 
481
-				$_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
482
-					'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
483
-					sprintf(tx_dlf_helper::getLL('flash.solrcoreMissingMsg'), $_url),
484
-					tx_dlf_helper::getLL('flash.solrcoreMissing', TRUE),
485
-					\TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
486
-					FALSE
487
-				);
481
+                $_message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
482
+                    'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
483
+                    sprintf(tx_dlf_helper::getLL('flash.solrcoreMissingMsg'), $_url),
484
+                    tx_dlf_helper::getLL('flash.solrcoreMissing', TRUE),
485
+                    \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING,
486
+                    FALSE
487
+                );
488 488
 
489
-			}
489
+            }
490 490
 
491
-			tx_dlf_helper::addMessage($_message);
491
+            tx_dlf_helper::addMessage($_message);
492 492
 
493
-			$this->markerArray['CONTENT'] .= tx_dlf_helper::renderFlashMessages();
493
+            $this->markerArray['CONTENT'] .= tx_dlf_helper::renderFlashMessages();
494 494
 
495
-		} else {
495
+        } else {
496 496
 
497
-			// TODO: Ändern!
498
-			$this->markerArray['CONTENT'] .= 'You are not allowed to access this page or have not selected a page, yet.';
497
+            // TODO: Ändern!
498
+            $this->markerArray['CONTENT'] .= 'You are not allowed to access this page or have not selected a page, yet.';
499 499
 
500
-		}
500
+        }
501 501
 
502
-		$this->printContent();
502
+        $this->printContent();
503 503
 
504
-	}
504
+    }
505 505
 
506 506
 }
507 507
 
Please login to merge, or discard this patch.
dlf/modules/newclient/structures.inc.php 1 patch
Indentation   +348 added lines, -348 removed lines patch added patch discarded remove patch
@@ -12,352 +12,352 @@
 block discarded – undo
12 12
 // Define structure elements.
13 13
 // @see http://dfg-viewer.de/en/structural-data-set/
14 14
 $structures = array (
15
-	'act' => array (
16
-		'toplevel' => 1,
17
-		'oai_name' => '',
18
-	),
19
-	'additional' => array (
20
-		'toplevel' => 0,
21
-		'oai_name' => ''
22
-	),
23
-	'address' => array (
24
-		'toplevel' => 0,
25
-		'oai_name' => ''
26
-	),
27
-	'album' => array (
28
-		'toplevel' => 1,
29
-		'oai_name' => '',
30
-	),
31
-	'annotation' => array (
32
-		'toplevel' => 0,
33
-		'oai_name' => ''
34
-	),
35
-	'article' => array (
36
-		'toplevel' => 0,
37
-		'oai_name' => ''
38
-	),
39
-	'atlas' => array (
40
-		'toplevel' => 1,
41
-		'oai_name' => '',
42
-	),
43
-	'bachelor_thesis' => array (
44
-		'toplevel' => 1,
45
-		'oai_name' => '',
46
-	),
47
-	'binding' => array (
48
-		'toplevel' => 0,
49
-		'oai_name' => ''
50
-	),
51
-	'bookplate' => array (
52
-		'toplevel' => 0,
53
-		'oai_name' => ''
54
-	),
55
-	'cartulary' => array (
56
-		'toplevel' => 1,
57
-		'oai_name' => '',
58
-	),
59
-	'chapter' => array (
60
-		'toplevel' => 0,
61
-		'oai_name' => ''
62
-	),
63
-	'collation' => array (
64
-		'toplevel' => 0,
65
-		'oai_name' => ''
66
-	),
67
-	'colophon' => array (
68
-		'toplevel' => 0,
69
-		'oai_name' => ''
70
-	),
71
-	'contained_work' => array (
72
-		'toplevel' => 0,
73
-		'oai_name' => ''
74
-	),
75
-	'contents' => array (
76
-		'toplevel' => 0,
77
-		'oai_name' => ''
78
-	),
79
-	'corrigenda' => array (
80
-		'toplevel' => 0,
81
-		'oai_name' => ''
82
-	),
83
-	'cover' => array (
84
-		'toplevel' => 0,
85
-		'oai_name' => ''
86
-	),
87
-	'cover_front' => array (
88
-		'toplevel' => 0,
89
-		'oai_name' => ''
90
-	),
91
-	'cover_back' => array (
92
-		'toplevel' => 0,
93
-		'oai_name' => ''
94
-	),
95
-	'day' => array (
96
-		'toplevel' => 0,
97
-		'oai_name' => ''
98
-	),
99
-	'dedication' => array (
100
-		'toplevel' => 0,
101
-		'oai_name' => ''
102
-	),
103
-	'diploma_thesis' => array (
104
-		'toplevel' => 1,
105
-		'oai_name' => '',
106
-	),
107
-	'doctoral_thesis' => array (
108
-		'toplevel' => 1,
109
-		'oai_name' => '',
110
-	),
111
-	'document' => array (
112
-		'toplevel' => 1,
113
-		'oai_name' => '',
114
-	),
115
-	'dossier' => array (
116
-		'toplevel' => 1,
117
-		'oai_name' => '',
118
-	),
119
-	'edge' => array (
120
-		'toplevel' => 0,
121
-		'oai_name' => ''
122
-	),
123
-	'endsheet' => array (
124
-		'toplevel' => 0,
125
-		'oai_name' => ''
126
-	),
127
-	'engraved_titlepage' => array (
128
-		'toplevel' => 0,
129
-		'oai_name' => ''
130
-	),
131
-	'entry' => array (
132
-		'toplevel' => 0,
133
-		'oai_name' => ''
134
-	),
135
-	'fascicle' => array (
136
-		'toplevel' => 0,
137
-		'oai_name' => ''
138
-	),
139
-	'file' => array (
140
-		'toplevel' => 1,
141
-		'oai_name' => '',
142
-	),
143
-	'folder' => array (
144
-		'toplevel' => 1,
145
-		'oai_name' => '',
146
-	),
147
-	'fragment' => array (
148
-		'toplevel' => 1,
149
-		'oai_name' => ''
150
-	),
151
-	'ground_plan' => array (
152
-		'toplevel' => 1,
153
-		'oai_name' => '',
154
-	),
155
-	'habilitation_thesis' => array (
156
-		'toplevel' => 1,
157
-		'oai_name' => '',
158
-	),
159
-	'illustration' => array (
160
-		'toplevel' => 0,
161
-		'oai_name' => ''
162
-	),
163
-	'image' => array (
164
-		'toplevel' => 1,
165
-		'oai_name' => '',
166
-	),
167
-	'imprint' => array (
168
-		'toplevel' => 0,
169
-		'oai_name' => ''
170
-	),
171
-	'index' => array (
172
-		'toplevel' => 0,
173
-		'oai_name' => ''
174
-	),
175
-	'initial_decoration' => array (
176
-		'toplevel' => 0,
177
-		'oai_name' => ''
178
-	),
179
-	'issue' => array (
180
-		'toplevel' => 0,
181
-		'oai_name' => ''
182
-	),
183
-	'judgement' => array (
184
-		'toplevel' => 1,
185
-		'oai_name' => '',
186
-	),
187
-	'land_register' => array (
188
-		'toplevel' => 1,
189
-		'oai_name' => '',
190
-	),
191
-	'leaflet' => array (
192
-		'toplevel' => 1,
193
-		'oai_name' => '',
194
-	),
195
-	'lecture' => array (
196
-		'toplevel' => 1,
197
-		'oai_name' => '',
198
-	),
199
-	'letter' => array (
200
-		'toplevel' => 0,
201
-		'oai_name' => '',
202
-	),
203
-	'magister_thesis' => array (
204
-		'toplevel' => 1,
205
-		'oai_name' => '',
206
-	),
207
-	'master_thesis' => array (
208
-		'toplevel' => 1,
209
-		'oai_name' => '',
210
-	),
211
-	'manuscript' => array (
212
-		'toplevel' => 1,
213
-		'oai_name' => ''
214
-	),
215
-	'map' => array (
216
-		'toplevel' => 0,
217
-		'oai_name' => ''
218
-	),
219
-	'monograph' => array (
220
-		'toplevel' => 1,
221
-		'oai_name' => ''
222
-	),
223
-	'month' => array (
224
-		'toplevel' => 0,
225
-		'oai_name' => ''
226
-	),
227
-	'multivolume_work' => array (
228
-		'toplevel' => 1,
229
-		'oai_name' => ''
230
-	),
231
-	'musical_notation' => array (
232
-		'toplevel' => 0,
233
-		'oai_name' => ''
234
-	),
235
-	'newspaper' => array (
236
-		'toplevel' => 1,
237
-		'oai_name' => ''
238
-	),
239
-	'note' => array (
240
-		'toplevel' => 0,
241
-		'oai_name' => '',
242
-	),
243
-	'official_notification' => array (
244
-		'toplevel' => 1,
245
-		'oai_name' => '',
246
-	),
247
-	'ornament' => array (
248
-		'toplevel' => 0,
249
-		'oai_name' => ''
250
-	),
251
-	'paper' => array (
252
-		'toplevel' => 1,
253
-		'oai_name' => '',
254
-	),
255
-	'paste_down' => array (
256
-		'toplevel' => 0,
257
-		'oai_name' => ''
258
-	),
259
-	'periodical' => array (
260
-		'toplevel' => 1,
261
-		'oai_name' => ''
262
-	),
263
-	'photograph' => array (
264
-		'toplevel' => 1,
265
-		'oai_name' => '',
266
-	),
267
-	'plan' => array (
268
-		'toplevel' => 1,
269
-		'oai_name' => '',
270
-	),
271
-	'poster' => array (
272
-		'toplevel' => 1,
273
-		'oai_name' => '',
274
-	),
275
-	'preface' => array (
276
-		'toplevel' => 0,
277
-		'oai_name' => ''
278
-	),
279
-	'preprint' => array (
280
-		'toplevel' => 1,
281
-		'oai_name' => '',
282
-	),
283
-	'printed_archives' => array (
284
-		'toplevel' => 1,
285
-		'oai_name' => '',
286
-	),
287
-	'printers_mark' => array (
288
-		'toplevel' => 0,
289
-		'oai_name' => ''
290
-	),
291
-	'privileges' => array (
292
-		'toplevel' => 0,
293
-		'oai_name' => ''
294
-	),
295
-	'proceeding' => array (
296
-		'toplevel' => 1,
297
-		'oai_name' => '',
298
-	),
299
-	'provenance' => array (
300
-		'toplevel' => 0,
301
-		'oai_name' => ''
302
-	),
303
-	'register' => array (
304
-		'toplevel' => 1,
305
-		'oai_name' => '',
306
-	),
307
-	'report' => array (
308
-		'toplevel' => 1,
309
-		'oai_name' => '',
310
-	),
311
-	'research_paper' => array (
312
-		'toplevel' => 1,
313
-		'oai_name' => '',
314
-	),
315
-	'scheme' => array (
316
-		'toplevel' => 0,
317
-		'oai_name' => ''
318
-	),
319
-	'seal' => array (
320
-		'toplevel' => 0,
321
-		'oai_name' => '',
322
-	),
323
-	'section' => array (
324
-		'toplevel' => 0,
325
-		'oai_name' => ''
326
-	),
327
-	'spine' => array (
328
-		'toplevel' => 0,
329
-		'oai_name' => ''
330
-	),
331
-	'stamp' => array (
332
-		'toplevel' => 0,
333
-		'oai_name' => ''
334
-	),
335
-	'study' => array (
336
-		'toplevel' => 1,
337
-		'oai_name' => '',
338
-	),
339
-	'table' => array (
340
-		'toplevel' => 0,
341
-		'oai_name' => ''
342
-	),
343
-	'text' => array (
344
-		'toplevel' => 0,
345
-		'oai_name' => ''
346
-	),
347
-	'title_page' => array (
348
-		'toplevel' => 0,
349
-		'oai_name' => ''
350
-	),
351
-	'verse' => array (
352
-		'toplevel' => 0,
353
-		'oai_name' => ''
354
-	),
355
-	'volume' => array (
356
-		'toplevel' => 1,
357
-		'oai_name' => ''
358
-	),
359
-	'year' => array (
360
-		'toplevel' => 1,
361
-		'oai_name' => ''
362
-	)
15
+    'act' => array (
16
+        'toplevel' => 1,
17
+        'oai_name' => '',
18
+    ),
19
+    'additional' => array (
20
+        'toplevel' => 0,
21
+        'oai_name' => ''
22
+    ),
23
+    'address' => array (
24
+        'toplevel' => 0,
25
+        'oai_name' => ''
26
+    ),
27
+    'album' => array (
28
+        'toplevel' => 1,
29
+        'oai_name' => '',
30
+    ),
31
+    'annotation' => array (
32
+        'toplevel' => 0,
33
+        'oai_name' => ''
34
+    ),
35
+    'article' => array (
36
+        'toplevel' => 0,
37
+        'oai_name' => ''
38
+    ),
39
+    'atlas' => array (
40
+        'toplevel' => 1,
41
+        'oai_name' => '',
42
+    ),
43
+    'bachelor_thesis' => array (
44
+        'toplevel' => 1,
45
+        'oai_name' => '',
46
+    ),
47
+    'binding' => array (
48
+        'toplevel' => 0,
49
+        'oai_name' => ''
50
+    ),
51
+    'bookplate' => array (
52
+        'toplevel' => 0,
53
+        'oai_name' => ''
54
+    ),
55
+    'cartulary' => array (
56
+        'toplevel' => 1,
57
+        'oai_name' => '',
58
+    ),
59
+    'chapter' => array (
60
+        'toplevel' => 0,
61
+        'oai_name' => ''
62
+    ),
63
+    'collation' => array (
64
+        'toplevel' => 0,
65
+        'oai_name' => ''
66
+    ),
67
+    'colophon' => array (
68
+        'toplevel' => 0,
69
+        'oai_name' => ''
70
+    ),
71
+    'contained_work' => array (
72
+        'toplevel' => 0,
73
+        'oai_name' => ''
74
+    ),
75
+    'contents' => array (
76
+        'toplevel' => 0,
77
+        'oai_name' => ''
78
+    ),
79
+    'corrigenda' => array (
80
+        'toplevel' => 0,
81
+        'oai_name' => ''
82
+    ),
83
+    'cover' => array (
84
+        'toplevel' => 0,
85
+        'oai_name' => ''
86
+    ),
87
+    'cover_front' => array (
88
+        'toplevel' => 0,
89
+        'oai_name' => ''
90
+    ),
91
+    'cover_back' => array (
92
+        'toplevel' => 0,
93
+        'oai_name' => ''
94
+    ),
95
+    'day' => array (
96
+        'toplevel' => 0,
97
+        'oai_name' => ''
98
+    ),
99
+    'dedication' => array (
100
+        'toplevel' => 0,
101
+        'oai_name' => ''
102
+    ),
103
+    'diploma_thesis' => array (
104
+        'toplevel' => 1,
105
+        'oai_name' => '',
106
+    ),
107
+    'doctoral_thesis' => array (
108
+        'toplevel' => 1,
109
+        'oai_name' => '',
110
+    ),
111
+    'document' => array (
112
+        'toplevel' => 1,
113
+        'oai_name' => '',
114
+    ),
115
+    'dossier' => array (
116
+        'toplevel' => 1,
117
+        'oai_name' => '',
118
+    ),
119
+    'edge' => array (
120
+        'toplevel' => 0,
121
+        'oai_name' => ''
122
+    ),
123
+    'endsheet' => array (
124
+        'toplevel' => 0,
125
+        'oai_name' => ''
126
+    ),
127
+    'engraved_titlepage' => array (
128
+        'toplevel' => 0,
129
+        'oai_name' => ''
130
+    ),
131
+    'entry' => array (
132
+        'toplevel' => 0,
133
+        'oai_name' => ''
134
+    ),
135
+    'fascicle' => array (
136
+        'toplevel' => 0,
137
+        'oai_name' => ''
138
+    ),
139
+    'file' => array (
140
+        'toplevel' => 1,
141
+        'oai_name' => '',
142
+    ),
143
+    'folder' => array (
144
+        'toplevel' => 1,
145
+        'oai_name' => '',
146
+    ),
147
+    'fragment' => array (
148
+        'toplevel' => 1,
149
+        'oai_name' => ''
150
+    ),
151
+    'ground_plan' => array (
152
+        'toplevel' => 1,
153
+        'oai_name' => '',
154
+    ),
155
+    'habilitation_thesis' => array (
156
+        'toplevel' => 1,
157
+        'oai_name' => '',
158
+    ),
159
+    'illustration' => array (
160
+        'toplevel' => 0,
161
+        'oai_name' => ''
162
+    ),
163
+    'image' => array (
164
+        'toplevel' => 1,
165
+        'oai_name' => '',
166
+    ),
167
+    'imprint' => array (
168
+        'toplevel' => 0,
169
+        'oai_name' => ''
170
+    ),
171
+    'index' => array (
172
+        'toplevel' => 0,
173
+        'oai_name' => ''
174
+    ),
175
+    'initial_decoration' => array (
176
+        'toplevel' => 0,
177
+        'oai_name' => ''
178
+    ),
179
+    'issue' => array (
180
+        'toplevel' => 0,
181
+        'oai_name' => ''
182
+    ),
183
+    'judgement' => array (
184
+        'toplevel' => 1,
185
+        'oai_name' => '',
186
+    ),
187
+    'land_register' => array (
188
+        'toplevel' => 1,
189
+        'oai_name' => '',
190
+    ),
191
+    'leaflet' => array (
192
+        'toplevel' => 1,
193
+        'oai_name' => '',
194
+    ),
195
+    'lecture' => array (
196
+        'toplevel' => 1,
197
+        'oai_name' => '',
198
+    ),
199
+    'letter' => array (
200
+        'toplevel' => 0,
201
+        'oai_name' => '',
202
+    ),
203
+    'magister_thesis' => array (
204
+        'toplevel' => 1,
205
+        'oai_name' => '',
206
+    ),
207
+    'master_thesis' => array (
208
+        'toplevel' => 1,
209
+        'oai_name' => '',
210
+    ),
211
+    'manuscript' => array (
212
+        'toplevel' => 1,
213
+        'oai_name' => ''
214
+    ),
215
+    'map' => array (
216
+        'toplevel' => 0,
217
+        'oai_name' => ''
218
+    ),
219
+    'monograph' => array (
220
+        'toplevel' => 1,
221
+        'oai_name' => ''
222
+    ),
223
+    'month' => array (
224
+        'toplevel' => 0,
225
+        'oai_name' => ''
226
+    ),
227
+    'multivolume_work' => array (
228
+        'toplevel' => 1,
229
+        'oai_name' => ''
230
+    ),
231
+    'musical_notation' => array (
232
+        'toplevel' => 0,
233
+        'oai_name' => ''
234
+    ),
235
+    'newspaper' => array (
236
+        'toplevel' => 1,
237
+        'oai_name' => ''
238
+    ),
239
+    'note' => array (
240
+        'toplevel' => 0,
241
+        'oai_name' => '',
242
+    ),
243
+    'official_notification' => array (
244
+        'toplevel' => 1,
245
+        'oai_name' => '',
246
+    ),
247
+    'ornament' => array (
248
+        'toplevel' => 0,
249
+        'oai_name' => ''
250
+    ),
251
+    'paper' => array (
252
+        'toplevel' => 1,
253
+        'oai_name' => '',
254
+    ),
255
+    'paste_down' => array (
256
+        'toplevel' => 0,
257
+        'oai_name' => ''
258
+    ),
259
+    'periodical' => array (
260
+        'toplevel' => 1,
261
+        'oai_name' => ''
262
+    ),
263
+    'photograph' => array (
264
+        'toplevel' => 1,
265
+        'oai_name' => '',
266
+    ),
267
+    'plan' => array (
268
+        'toplevel' => 1,
269
+        'oai_name' => '',
270
+    ),
271
+    'poster' => array (
272
+        'toplevel' => 1,
273
+        'oai_name' => '',
274
+    ),
275
+    'preface' => array (
276
+        'toplevel' => 0,
277
+        'oai_name' => ''
278
+    ),
279
+    'preprint' => array (
280
+        'toplevel' => 1,
281
+        'oai_name' => '',
282
+    ),
283
+    'printed_archives' => array (
284
+        'toplevel' => 1,
285
+        'oai_name' => '',
286
+    ),
287
+    'printers_mark' => array (
288
+        'toplevel' => 0,
289
+        'oai_name' => ''
290
+    ),
291
+    'privileges' => array (
292
+        'toplevel' => 0,
293
+        'oai_name' => ''
294
+    ),
295
+    'proceeding' => array (
296
+        'toplevel' => 1,
297
+        'oai_name' => '',
298
+    ),
299
+    'provenance' => array (
300
+        'toplevel' => 0,
301
+        'oai_name' => ''
302
+    ),
303
+    'register' => array (
304
+        'toplevel' => 1,
305
+        'oai_name' => '',
306
+    ),
307
+    'report' => array (
308
+        'toplevel' => 1,
309
+        'oai_name' => '',
310
+    ),
311
+    'research_paper' => array (
312
+        'toplevel' => 1,
313
+        'oai_name' => '',
314
+    ),
315
+    'scheme' => array (
316
+        'toplevel' => 0,
317
+        'oai_name' => ''
318
+    ),
319
+    'seal' => array (
320
+        'toplevel' => 0,
321
+        'oai_name' => '',
322
+    ),
323
+    'section' => array (
324
+        'toplevel' => 0,
325
+        'oai_name' => ''
326
+    ),
327
+    'spine' => array (
328
+        'toplevel' => 0,
329
+        'oai_name' => ''
330
+    ),
331
+    'stamp' => array (
332
+        'toplevel' => 0,
333
+        'oai_name' => ''
334
+    ),
335
+    'study' => array (
336
+        'toplevel' => 1,
337
+        'oai_name' => '',
338
+    ),
339
+    'table' => array (
340
+        'toplevel' => 0,
341
+        'oai_name' => ''
342
+    ),
343
+    'text' => array (
344
+        'toplevel' => 0,
345
+        'oai_name' => ''
346
+    ),
347
+    'title_page' => array (
348
+        'toplevel' => 0,
349
+        'oai_name' => ''
350
+    ),
351
+    'verse' => array (
352
+        'toplevel' => 0,
353
+        'oai_name' => ''
354
+    ),
355
+    'volume' => array (
356
+        'toplevel' => 1,
357
+        'oai_name' => ''
358
+    ),
359
+    'year' => array (
360
+        'toplevel' => 1,
361
+        'oai_name' => ''
362
+    )
363 363
 );
Please login to merge, or discard this patch.