Skip to content

Commit fbd86d1

Browse files
authored
Merge pull request #266 from ostepu/version_0.5.0
Version 0.5.0
2 parents 44a70a2 + f765b06 commit fbd86d1

File tree

238 files changed

+4281
-550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+4281
-550
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ install/vendor/
1717
vendor/
1818
install/segments/ext_*
1919
Assistants/QEPGenerator/config.json
20+
install/config*

Assistants/CConfig.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,9 @@ public static function getLinks(
546546
$name
547547
)
548548
{
549+
// wenn NULL übergeben wird, soll es keinen Absturz geben
550+
if (!isset($linkList)) $linkList = array();
551+
549552
$result = array( );
550553
foreach ( $linkList as $link ){
551554

Assistants/Language.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,13 @@ public static function loadLanguage($lang, $name='default', $type='json', $path=
144144
*/
145145
public static function Get($area, $cell, $name='default', $params=array())
146146
{
147-
if (self::$selectedLanguage != null && isset(self::$language[$name]) && isset(self::$language[$name][$area]) && isset(self::$language[$name][$area][$cell])){
147+
if (self::$selectedLanguage !== null && isset(self::$language[$name]) && isset(self::$language[$name][$area]) && isset(self::$language[$name][$area][$cell])){
148148
$res = self::$language[$name][$area][$cell];
149-
} elseif (self::$selectedDefaultLanguage != null && isset(self::$defaultLanguage[$name]) && isset(self::$defaultLanguage[$name][$area]) && isset(self::$defaultLanguage[$name][$area][$cell])){
149+
} elseif (self::$selectedDefaultLanguage !== null && isset(self::$defaultLanguage[$name]) && isset(self::$defaultLanguage[$name][$area]) && isset(self::$defaultLanguage[$name][$area][$cell])){
150150
$res = self::$defaultLanguage[$name][$area][$cell];
151-
} else
151+
} else {
152152
$res = self::$errorValue;
153+
}
153154

154155
$matches = array();
155156
preg_match_all('/[^\\\\]\$\[([\w,]+)\]/', $res, $matches);

Assistants/Logger.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,16 @@ public static function Log($message,
140140
// or overwriting each other
141141
//do{} while(!flock($fp, LOCK_EX);
142142

143-
if (flock($fp, LOCK_EX)) {
143+
/// if (flock($fp, LOCK_EX)) {
144144
// print the message to the file
145145
fwrite($fp, $infoString);
146146

147147
// unlock and close the file
148-
flock($fp, LOCK_UN);
148+
/// flock($fp, LOCK_UN);
149149

150-
} else {
150+
/// } else {
151151
//die("Getting lock on " . $logFile . " failed!\n");
152-
}
152+
/// }
153153

154154
fclose($fp);
155155
return true;

Assistants/Model.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ public function run()
182182
$placeholder[$holder['name']] = $holder['regex'];
183183
}
184184

185+
// hier werden die eigentlichen Bedingungen der Platzhalter geprüft
186+
// todo: muss wieder genutzt werden
185187
/*foreach ($params as $key => $value){
186188
if (isset($placeholder[$key])){
187189
if (is_array($value)){

Assistants/Request.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ public static function http_parse_headers( $header )
4040
$fields = explode("\r\n", preg_replace('/\x0D\x0A[\x09\x20]+/', ' ', $header));
4141
foreach( $fields as $field ) {
4242
if( preg_match('/([^:]+): (.+)/m', $field, $match) ) {
43-
$match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1])));
43+
//$match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1])));
44+
$match[1] = preg_replace_callback(
45+
'/(?<=^|[\x09\x20\x2D])./',
46+
function ($treffer) {
47+
return strtoupper($treffer[0]);
48+
},
49+
strtolower(trim($match[1]))
50+
);
51+
4452
if( isset($retVal[$match[1]]) ) {
4553
if (!is_array($retVal[$match[1]])) {
4654
$retVal[$match[1]] = array($retVal[$match[1]]);
@@ -59,7 +67,15 @@ public static function http_parse_headers_short( $fields )
5967
$retVal = array();
6068
foreach( $fields as $field ) {
6169
if( preg_match('/([^:]+): (.+)/m', $field, $match) ) {
62-
$match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1])));
70+
///$match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(trim($match[1])));
71+
$match[1] = preg_replace_callback(
72+
'/(?<=^|[\x09\x20\x2D])./',
73+
function ($treffer) {
74+
return strtoupper($treffer[0]);
75+
},
76+
strtolower(trim($match[1]))
77+
);
78+
6379
if( isset($retVal[$match[1]]) ) {
6480
if (!is_array($retVal[$match[1]])) {
6581
$retVal[$match[1]] = array($retVal[$match[1]]);

Assistants/Structures.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
include_once ( dirname( __FILE__ ) . '/Structures/Plugin.php' );
4242
include_once ( dirname( __FILE__ ) . '/Structures/Process.php' );
4343
include_once ( dirname( __FILE__ ) . '/Structures/Query.php' );
44+
include_once ( dirname( __FILE__ ) . '/Structures/Redirect.php' );
4445
include_once ( dirname( __FILE__ ) . '/Structures/Reference.php' );
4546
include_once ( dirname( __FILE__ ) . '/Structures/SelectedSubmission.php' );
4647
include_once ( dirname( __FILE__ ) . '/Structures/Session.php' );

0 commit comments

Comments
 (0)