From d261a537a22d7583da28b34d0f5fac59dc3b1e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 4 Apr 2012 13:26:51 +0300 Subject: [PATCH 1/5] Replace the date with the current date during build. --- build.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build.php b/build.php index 9f0c717..35f0e2d 100755 --- a/build.php +++ b/build.php @@ -13,6 +13,10 @@ ----------- EOT; + if (file_exists('package.xml.old')) { + file_put_contents('package.xml', file_get_contents('package.xml.old')); + unlink('package.xml.old'); + } if (file_exists('file.tar')) unlink('file.tar'); if (file_exists('template.tar')) unlink('template.tar'); if (file_exists('acptemplate.tar')) unlink('acptemplate.tar'); @@ -70,7 +74,13 @@ ----------------- EOT; - passthru('tar cvf ../file.tar * --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code); + file_put_contents('package.xml.old', file_get_contents('package.xml')); + file_put_contents('package.xml', preg_replace('~\d{4}-\d{2}-\d{2}~', ''.date('Y-m-d').'', file_get_contents('package.xml'))); + passthru('tar cvf ../file.tar * --exclude=*.old --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code); + if (file_exists('package.xml.old')) { + file_put_contents('package.xml', file_get_contents('package.xml.old')); + unlink('package.xml.old'); + } if ($code != 0) exit($code); echo << Date: Wed, 4 Apr 2012 13:29:22 +0300 Subject: [PATCH 2/5] Fixing date replacing. I fail. --- build.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.php b/build.php index 35f0e2d..78936f2 100755 --- a/build.php +++ b/build.php @@ -74,13 +74,7 @@ ----------------- EOT; - file_put_contents('package.xml.old', file_get_contents('package.xml')); - file_put_contents('package.xml', preg_replace('~\d{4}-\d{2}-\d{2}~', ''.date('Y-m-d').'', file_get_contents('package.xml'))); passthru('tar cvf ../file.tar * --exclude=*.old --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code); - if (file_exists('package.xml.old')) { - file_put_contents('package.xml', file_get_contents('package.xml.old')); - unlink('package.xml.old'); - } if ($code != 0) exit($code); echo <<\d{4}-\d{2}-\d{2}~', ''.date('Y-m-d').'', file_get_contents('package.xml'))); passthru('tar cvf be.bastelstu.wcf.chat.tar * --exclude=file --exclude=template --exclude=acptemplate --exclude=build.php', $code); + if (file_exists('package.xml.old')) { + file_put_contents('package.xml', file_get_contents('package.xml.old')); + unlink('package.xml.old'); + } if ($code != 0) exit($code); if (file_exists('file.tar')) unlink('file.tar'); From 9d80fcb6e2579e7c3e8e04b8a219b84c473f80b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 4 Apr 2012 13:31:27 +0300 Subject: [PATCH 3/5] Properly exclude package.xml.old Untested changes ftw! --- build.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.php b/build.php index 78936f2..99fa249 100755 --- a/build.php +++ b/build.php @@ -74,7 +74,7 @@ ----------------- EOT; - passthru('tar cvf ../file.tar * --exclude=*.old --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code); + passthru('tar cvf ../file.tar * --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code); if ($code != 0) exit($code); echo <<\d{4}-\d{2}-\d{2}~', ''.date('Y-m-d').'', file_get_contents('package.xml'))); - passthru('tar cvf be.bastelstu.wcf.chat.tar * --exclude=file --exclude=template --exclude=acptemplate --exclude=build.php', $code); + passthru('tar cvf be.bastelstu.wcf.chat.tar * --exclude=*.old --exclude=file --exclude=template --exclude=acptemplate --exclude=build.php', $code); if (file_exists('package.xml.old')) { file_put_contents('package.xml', file_get_contents('package.xml.old')); unlink('package.xml.old'); From 2c4c816b24deb99bfd562e0727f9c26e78428db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 5 Apr 2012 16:50:08 +0300 Subject: [PATCH 4/5] Commands can now be written in any case. --- file/lib/system/chat/command/CommandHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file/lib/system/chat/command/CommandHandler.class.php b/file/lib/system/chat/command/CommandHandler.class.php index 4dda64a..270f703 100644 --- a/file/lib/system/chat/command/CommandHandler.class.php +++ b/file/lib/system/chat/command/CommandHandler.class.php @@ -63,7 +63,7 @@ public function loadCommand() { return new commands\Plain($this); } - $class = '\wcf\system\chat\command\commands\\'.ucfirst($parts[0]); + $class = '\wcf\system\chat\command\commands\\'.ucfirst(strtolower($parts[0])); if (!class_exists($class)) { throw new NotFoundException(); } From 83dcbe9014e3e85ba886ea43e0669d3de1a3752a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 9 Apr 2012 18:50:07 +0300 Subject: [PATCH 5/5] Adding 3 missing hyphens. --- build.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.php b/build.php index 99fa249..18933f2 100755 --- a/build.php +++ b/build.php @@ -88,7 +88,7 @@ echo <<