diff --git a/.travis.yml b/.travis.yml index 7c83238f..9edb54f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ env: - DB=mysql - DB=pgsql - DB=sqlite + allow_failures: + - DB=sqlite cache: directories: @@ -41,13 +43,15 @@ script: after_failure: - head -n 100 data/config/* - ls /var/run/mysql* - - ls /var/log/*mysql* - - cat /var/log/mysql.err - - cat /var/log/mysql.log - - cat /var/log/mysql/error.log - - cat /var/log/mysql/slow.log - - ls /var/log/postgresql - - cat /var/log/postgresql/postgresql* + # All of the below commands require sudo, which we can't use without losing some speed & caching. + # SEE: https://docs.travis-ci.com/user/workers/container-based-infrastructure/ + # - ls /var/log/*mysql* + # - cat /var/log/mysql.err + # - cat /var/log/mysql.log + # - cat /var/log/mysql/error.log + # - cat /var/log/mysql/slow.log + # - ls /var/log/postgresql + # - cat /var/log/postgresql/postgresql* after_script: - wget https://scrutinizer-ci.com/ocular.phar diff --git a/README.markdown b/README.markdown index c9125d9d..3fa7052d 100644 --- a/README.markdown +++ b/README.markdown @@ -11,6 +11,8 @@ # Shimmie [](https://travis-ci.org/shish/shimmie2) +[](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=master) +[](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=master) This is the main branch of Shimmie, if you know anything at all about running websites, this is the version to use. @@ -26,21 +28,22 @@ check out one of the versioned branches. # Installation -0. Download the latest release under [Releases](https://github.com/shish/shimmie2/releases). -1. Create a blank database -2. Unzip shimmie into a folder on the web host -3. Visit the folder with a web browser -4. Enter the location of the database -5. Click "install". Hopefully you'll end up at the welcome screen; if +1. Download the latest release under [Releases](https://github.com/shish/shimmie2/releases). +2. Create a blank database +3. Unzip shimmie into a folder on the web host +4. Visit the folder with a web browser +5. Enter the location of the database +6. Click "install". Hopefully you'll end up at the welcome screen; if not, you should be given instructions on how to fix any errors~ # Installation (Development) -0. Download the shimmie via the "Download Zip" button. -1. Install [Composer](https://getcomposer.org/). (If you don't already have it) -2. Run `composer global require "fxp/composer-asset-plugin:~1.1" --no-plugins`. (This is installed globally due to a known composer bug) -3. Run `composer install` -4. Follow instructions noted in "Installation" (Excluding 0). +1. Download shimmie via the "Download Zip" button on the [develop](https://github.com/shish/shimmie2/tree/develop) branch. +2. Unzip shimmie into a folder on the web host +3. Install [Composer](https://getcomposer.org/). (If you don't already have it) +4. Run `composer global require "fxp/composer-asset-plugin:~1.1" --no-plugins`. (This is installed globally due to a known composer bug) +5. Run `composer install` in the shimmie folder. +6. Follow instructions noted in "Installation" (Excluding 1 & 3). ## Upgrade from 2.3.X diff --git a/ext/artists/main.php b/ext/artists/main.php index a2380120..5276881f 100644 --- a/ext/artists/main.php +++ b/ext/artists/main.php @@ -837,7 +837,7 @@ class Artists extends Extension { INSERT INTO artists (user_id, name, notes, created, updated) VALUES (?, ?, ?, now(), now()) ", array($user->id, $name, $notes)); - return $database->get_last_insert_id(); + return $database->get_last_insert_id('artists_id_seq'); } /** diff --git a/ext/autocomplete/script.js b/ext/autocomplete/script.js index 301878ea..8fda1cf9 100644 --- a/ext/autocomplete/script.js +++ b/ext/autocomplete/script.js @@ -1,16 +1,36 @@ $(function(){ + var metatags = ['order:id', 'order:width', 'order:height', 'order:filesize', 'order:filename']; + $('[name=search]').tagit({ singleFieldDelimiter: ' ', beforeTagAdded: function(event, ui) { - // give special class to negative tags - if(ui.tagLabel[0] === '-') { - ui.tag.addClass('tag-negative'); - }else{ - ui.tag.addClass('tag-positive'); + if(metatags.indexOf(ui.tagLabel) !== -1) { + ui.tag.addClass('tag-metatag'); + } else { + console.log(ui.tagLabel); + // give special class to negative tags + if(ui.tagLabel[0] === '-') { + ui.tag.addClass('tag-negative'); + }else{ + ui.tag.addClass('tag-positive'); + } } }, autocomplete : ({ source: function (request, response) { + var ac_metatags = $.map( + $.grep(metatags, function(s) { + // Only show metatags for strings longer than one character + return (request.term.length > 1 && s.indexOf(request.term) === 0); + }), + function(item) { + return { + label : item + ' [metatag]', + value : item + }; + } + ); + var isNegative = (request.term[0] === '-'); $.ajax({ url: base_href + '/api/internal/autocomplete', @@ -18,13 +38,17 @@ $(function(){ dataType : 'json', type : 'GET', success : function (data) { - response($.map(data, function (count, item) { - item = (isNegative ? '-'+item : item); - return { - label : item + ' ('+count+')', - value : item - }; - })); + response( + $.merge(ac_metatags, + $.map(data, function (count, item) { + item = (isNegative ? '-'+item : item); + return { + label : item + ' ('+count+')', + value : item + }; + }) + ) + ); }, error : function (request, status, error) { alert(error); @@ -47,10 +71,9 @@ $(function(){ } else if (keyCode == 9) { e.preventDefault(); - var tag = $('.tagit-autocomplete[style*=\"display: block\"] > li:first').text(); - if(tag){ - $('[name=search]').tagit('createTag', tag); - $('.ui-autocomplete-input').autocomplete('close'); + var tag = $('.tagit-autocomplete[style*=\"display: block\"] > li:focus, .tagit-autocomplete[style*=\"display: block\"] > li:first').first(); + if(tag.length){ + $(tag).click(); $('.ui-autocomplete-input').val(''); //If tag already exists, make sure to remove duplicate. } } diff --git a/ext/autocomplete/style.css b/ext/autocomplete/style.css index 019bb7fd..7ff0f69b 100644 --- a/ext/autocomplete/style.css +++ b/ext/autocomplete/style.css @@ -5,4 +5,5 @@ input[name=search] ~ input[type=submit] { display: inline-block !important; } .tag-negative { background: #ff8080 !important; } -.tag-positive { background: #40bf40 !important; } \ No newline at end of file +.tag-positive { background: #40bf40 !important; } +.tag-metatag { background: #eaa338 !important; } diff --git a/ext/ext_manager/theme.php b/ext/ext_manager/theme.php index 7d6bd436..de939f65 100644 --- a/ext/ext_manager/theme.php +++ b/ext/ext_manager/theme.php @@ -7,26 +7,31 @@ class ExtManagerTheme extends Themelet { ".make_form(make_link("ext_manager/set"))."
Name | Description | |||
---|---|---|---|---|
Name | +Docs | +Description | +" : ""; + $h_docs = ($extension->documentation ? "■" : ""); //TODO: A proper "docs" symbol would be preferred here. - $h_en = $editable ? " | " : ""; $html .= " - |
$h_name | -$h_description | +|||
{$h_name} | +{$h_docs} | +{$h_description} | ||
- | + |