From 1703cd9caa05d30540f43de61ae128b9f94a7fca Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 13 Mar 2015 09:49:25 +0000 Subject: [PATCH 001/137] bump --- core/sys_config.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sys_config.inc.php b/core/sys_config.inc.php index 83111af5..63fa169a 100644 --- a/core/sys_config.inc.php +++ b/core/sys_config.inc.php @@ -33,7 +33,7 @@ _d("SPEED_HAX", false); // boolean do some questionable things in the name _d("COMPILE_ELS", false); // boolean pre-build the list of event listeners _d("NICE_URLS", false); // boolean force niceurl mode _d("WH_SPLITS", 1); // int how many levels of subfolders to put in the warehouse -_d("VERSION", '2.5.4'); // string shimmie version +_d("VERSION", '2.5.4+'); // string shimmie version _d("TIMEZONE", null); // string timezone _d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable _d("EXTRA_EXTS", ""); // optional extra extensions From 97a0aa7e4cb8b8aef2bc0e883ea7c676f3473fbb Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 18 Apr 2015 10:30:08 +0100 Subject: [PATCH 002/137] give unread PM count a class, so custom themes can make it red if they wish --- ext/pm/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pm/main.php b/ext/pm/main.php index e07d44a4..4c002444 100644 --- a/ext/pm/main.php +++ b/ext/pm/main.php @@ -85,7 +85,7 @@ class PrivMsg extends Extension { global $user; if(!$user->is_anonymous()) { $count = $this->count_pms($user); - $h_count = $count > 0 ? " ($count)" : ""; + $h_count = $count > 0 ? " ($count)" : ""; $event->add_link("Private Messages$h_count", make_link("user#private-messages")); } } From 926e3ff5c08148b2172ad21f6547aa8343c1917c Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 18 Apr 2015 10:30:51 +0100 Subject: [PATCH 003/137] turn off auto-select-first-item in autocomplete, apparently power users find it annoying? o.o --- lib/shimmie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shimmie.js b/lib/shimmie.js index 79419237..5f18651f 100644 --- a/lib/shimmie.js +++ b/lib/shimmie.js @@ -16,7 +16,7 @@ $(document).ready(function() { useCache: true, maxCacheLength: 10, matchInside: false, - selectFirst: true, + selectFirst: false, selectOnly: false, preventDefaultReturn: 1, preventDefaultTab: 1, From 55c3fd8f387c7b2bc9caa8cf40980ba304cbff15 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 18 Apr 2015 10:31:15 +0100 Subject: [PATCH 004/137] show PHP version (particularly useful when debugging php vs hhvm) --- core/util.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index bed0794f..c05d8097 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -1537,7 +1537,7 @@ function _fatal_error(Exception $e) {

Internal Error

Message: '.$message.' -

Version: '.$version.' +

Version: '.$version.' (on '.phpversion().') '; From b81d457bf7550f6dc3371f1cff73d77b365a22a0 Mon Sep 17 00:00:00 2001 From: Daku Date: Fri, 20 Mar 2015 22:12:16 +0000 Subject: [PATCH 005/137] DEBUG_SQL isn't defined during install, use quotes to avoid errors --- core/util.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index c05d8097..04c23078 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -674,7 +674,7 @@ $_execs = 0; */ function _count_execs($db, $sql, $inputarray) { global $_execs; - if ((defined(DEBUG_SQL) && DEBUG_SQL === true) || (!defined(DEBUG_SQL) && @$_GET['DEBUG_SQL'])) { + if ((defined('DEBUG_SQL') && DEBUG_SQL === true) || (!defined('DEBUG_SQL') && @$_GET['DEBUG_SQL'])) { $fp = @fopen("data/sql.log", "a"); if($fp) { if(isset($inputarray) && is_array($inputarray)) { From 6289402f2e9a31681b75e6e7cef1ddb0526942d2 Mon Sep 17 00:00:00 2001 From: Daku Date: Fri, 20 Mar 2015 22:16:20 +0000 Subject: [PATCH 006/137] make sure aliases.csv is downloaded, and not opened in browser SEE: http://stackoverflow.com/questions/6468517 --- ext/alias_editor/main.php | 3 ++- ext/alias_editor/theme.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/alias_editor/main.php b/ext/alias_editor/main.php index a216f573..71add3fb 100644 --- a/ext/alias_editor/main.php +++ b/ext/alias_editor/main.php @@ -84,7 +84,8 @@ class AliasEditor extends Extension { } else if($event->get_arg(0) == "export") { $page->set_mode("data"); - $page->set_type("text/plain"); + $page->set_type("text/csv"); + $page->set_filename("aliases.csv"); $page->set_data($this->get_alias_csv($database)); } else if($event->get_arg(0) == "import") { diff --git a/ext/alias_editor/theme.php b/ext/alias_editor/theme.php index 4dc2d2b1..45ab0674 100644 --- a/ext/alias_editor/theme.php +++ b/ext/alias_editor/theme.php @@ -55,7 +55,7 @@ class AliasEditorTheme extends Themelet { $h_aliases $h_add -

Download as CSV

+

Download as CSV

"; $bulk_html = " From 845543b2ba917f48a9a7df731c00a5a37275a092 Mon Sep 17 00:00:00 2001 From: Daku Date: Fri, 20 Mar 2015 22:45:33 +0000 Subject: [PATCH 007/137] fixes #478 - import now uses AddAliasEvent rather than manually adding itself --- ext/alias_editor/main.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ext/alias_editor/main.php b/ext/alias_editor/main.php index 71add3fb..d6923693 100644 --- a/ext/alias_editor/main.php +++ b/ext/alias_editor/main.php @@ -153,11 +153,12 @@ class AliasEditor extends Extension { foreach(explode("\n", $csv) as $line) { $parts = str_getcsv($line); if(count($parts) == 2) { - $pair = array("oldtag" => $parts[0], "newtag" => $parts[1]); - if(!$database->get_row("SELECT * FROM aliases WHERE oldtag=:oldtag AND lower(newtag)=lower(:newtag)", $pair)){ - if(!$database->get_row("SELECT * FROM aliases WHERE oldtag=:newtag", array("newtag" => $pair['newtag']))){ - $database->execute("INSERT INTO aliases(oldtag, newtag) VALUES(:oldtag, :newtag)", $pair); - } + try { + $aae = new AddAliasEvent($parts[0], $parts[1]); + send_event($aae); + } + catch(AddAliasException $ex) { + $this->theme->display_error(500, "Error adding alias", $ex->getMessage()); } } } From 7166259cc5023911b659a67dd624549f2b720200 Mon Sep 17 00:00:00 2001 From: Daku Date: Tue, 6 Jan 2015 12:37:12 +0000 Subject: [PATCH 008/137] autocomplete='off' for tag input this disables autocomplete/captilize on "most" mobile keyboards autocompletejs still works with this off --- ext/home/theme.php | 2 +- ext/index/theme.php | 2 +- ext/tag_edit/theme.php | 2 +- ext/upload/theme.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/home/theme.php b/ext/home/theme.php index 16e1a5d3..8cf95d8f 100644 --- a/ext/home/theme.php +++ b/ext/home/theme.php @@ -38,7 +38,7 @@ EOD $search_html = "