* When adding URLs, new HTML rows should have unique HTML IDs.
* Fix newly added assertions in Format_General::test_string2htmlid()
Co-authored-by: ྅༻ Ǭɀħ ༄༆ཉ <ozh@ozh.org>
This commit's changelog
- less encode/decode
- update jQuery & remove old ones
- No encoding in JS
- Also, 4 spaces in JS too, duh
- IDN domain functions
- Use mb_ functions to preverse IDN domains
- Support for UTF8MB4
- update install procedure
- update upgrade procedure. Note: The log table will be left untouched by the upgrade, it's impossible to make a convenient upgrade script for thousands of rows. The only problem will be if someone uses UTF8 short URLs (eg `http://sho.rt/éé💩`)
- Handle normalization of IDN domains & tests
- Fix warning on 7.2 and 7.3
- Deal with encoding in bookmarklets
- Enclose upgrade queries in a transaction
- Force no caching upon install or upgrade. Note: Strange behavior: if YOURLS hosted on an IDN domain, browser (FF at least) caches the redirection from admin/index.php to admin/install.php
- Support for IDN YOURLS hosting
- Tests for IDN YOURLS hosting
- Fix code (that will never get run again)
- Don't cache ajax requests
- Remove unnecessary function call
- Add comment doc block
- More IDN sanitizing tests
- IDN : Screw the "open dots". Who's going to type domain。com instead of domain.com anyway? Seriously. (although these do pass on my dev box)
- Deprecate yourls_lowercase_scheme_domain()
- Update doc to reflect DB change
Correction in `edit_link_save`:
Plugging in `data.url.title` as (untrimmed) `title` attribute (instead of plugging in `data.url.url`) when setting the variable `display_link`.
Removes an ineffective line of code in `edit_link_save()` with an undefined variable `data.url.date` (this is because `data.url.date` is not set in the function invoked via ajax, i.e. in `yourls_edit_link()` in functions.php).
Fixes a flaw in `edit_link_save()` in insert.js:
On exit, `edit_link_save()` re-enables all buttons of the action column, regardless of the value of `status` as returned by the ajax call (`action=edit_save`), i.e. also if the `status` is `fail` which means that the edit row remains visible. Because of that, it is then possible to open another edit row for the same keyword/long URL row. It is even possible to repeat this, introducing an arbitrary number of open edit rows with the same content.
Fixes a flaw in `edit_link_save()` in insert.js:
On exit, `edit_link_save()` correctly ends the loading state of the cancel button (i.e. the element with id `edit-close-y...`), but leaves the element disabled. This gets evident if and only if the ajax call (`action=edit_save`) returns with a `status` of `fail`, since only then the edit row with the disabled cancel button will not be faded out.
Added a function `decrease_total_clicks( id )` in js/insert.js which decreases the element containing the number of total clicks on the admin page by the value contained in the element `$('#clicks-' + id)` (i.e. by the value picked from the 'Clicks' column of the respective deleted row). Now called this method at the appropriate place in function `remove_link(id)`, thereby passing on `id` as parameter.
- renamed index_ajax.php to admin-ajax.php: name more accurate, no underscore to avoid error with htaccess RewriteCond (wtf?)
- renamed all parameters "mode" to "action"
- added nonces to Add, Edit, Save, Delete buttons. Fixes issue 425.
- changed behavior & args of yourls_verify_nonce()
- cosmetic tweak in CSS (edit row bg color)
- new function: yourls_site_url() to return YOURLS_SITE with http(s) preference
- comply to SSL pref when loading ressources. Fixes issue 512.
- Ajax URL now echoed in head, complying to SSL pref
git-svn-id: http://yourls.googlecode.com/svn/trunk@511 12232710-3e20-11de-b438-597f59cd7555
Added: Sharebox when shortening from within the admin page. Fixes issue 365.
git-svn-id: http://yourls.googlecode.com/svn/trunk@403 12232710-3e20-11de-b438-597f59cd7555
- fixed width layout
- icons for action buttons
- link to stats from main admin page
- trim too long urls in the admin page
git-svn-id: http://yourls.googlecode.com/svn/trunk@136 12232710-3e20-11de-b438-597f59cd7555
- now using a global object $ydb for everything related to DB and other globally needed stuff
- change in DB schema: now storing URLs with their keyword as used in shorturl, allowing for any keyword length
- change in DB schema: new table for storing various options including next_id, dropping table of the same name
- change in DB schema: new table for storing hits (for stats)
- added an upgrader from 1.3 to 1.4
- improved the installer, with .htaccess file creation
git-svn-id: http://yourls.googlecode.com/svn/trunk@103 12232710-3e20-11de-b438-597f59cd7555