Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
Fix end of line
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColomb committed Apr 7, 2013
1 parent 37d0d35 commit 3daf659
Show file tree
Hide file tree
Showing 67 changed files with 13,806 additions and 13,804 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
190 changes: 95 additions & 95 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
YOURLS Changelog
================

This file attempts to list the main changes through all versions of YOURLS. For a much more detailed
list, simply refer to the commit messages: http://code.google.com/p/yourls/source/list

1.0
---
- initial release

1.0.1
-----
- don't remember. Trivial stuff probably.

1.1
---
- don't remember. Some little bugs I guess.

1.2
---
- don't remember. A few tiny stuff for sure.

1.3-RC1
-------
- added bookmarklet and tools page
- improved XSS filter when adding new URL
- code cleanup in admin/index.php to separate code and display
- added favicon
- stricter coding to prevent notices with undefined indexes
- hide PHP notices & SQL errors & warnings, unless YOURLS_DEBUG constant set to true

1.4
---
- added an upgrader from 1.3 to 1.4
- change in logic: now using a global object $ydb for everything related to DB and other globally needed stuff
- change in logic: include "load-yourls.php" instead of "config.php" to start engine
- 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)
- improved the installer, with .htaccess file creation
- layout tweak: now prettier, isn't it?
- stats! OMG stats!

1.4.1
-----
- fixed base 62 URLs (keywords with MiXeD CaSe)
- new & secure auth method for API calls, with no need to use login & password combo
- allow SSL enforcement for admin pages
- new API method: stats for individual URL.
- prevent internal redirection loops
- filter and search URLs & short URLs by date

1.4.2
-----
- fixed bug in auth function
- added sample public API file
- added check in API requests for WordPress plugin when adding a new short URL
- prettier sample public interface

1.4.3
-----
- fixed bug no-stats-showing-ffs due to inconsistency in DB schema
- improve error reporting with API method url-stat

1.5
---
- added: plugin architecture! OMG plugins!!1!!1!
- added: directory /user, config.php can be moved there
- added: new "instant bookmarklets"
- added: 1 click copy-to-clipboard a la bitly
- change in logic: now all request are handled by PHP and don't rely on .htaccess
- added: saving URL titles
- added: support for prefix-n-shorten: sho.rt/http://example.com/
- added: core plugin to allow hyphens in URLs
- added: core sample plugin to wrap redirected URLs in a social toolbar
- added: core sample plugin to show how to create administration page in plugins
- added: core plugin to display a random pretty background
- changed: layout now using a more consistent palette, see http://yourls.org/palette
- added: anti XSS and anti CSRF measures
- added: interactive map if possible in stat traffic by countries
- fixed: lots of bugs

1.5.1
-----
- added: full jsonp support
- added: ability to use encrypted passwords in the config file
- fixed: support for http://www.sho.rt/bleh and http://sho.rt/bleh
- added: support for any favicon dropped in the /user directory
- updated: Google Visualization API instead of deprecated Google Charts
- fixed: bugs, bugs, bugs
- added: hooks, hooks, hooks
- improved: things, things, things

1.6
---
YOURLS Changelog
================

This file attempts to list the main changes through all versions of YOURLS. For a much more detailed
list, simply refer to the commit messages: http://code.google.com/p/yourls/source/list

1.0
---
- initial release

1.0.1
-----
- don't remember. Trivial stuff probably.

1.1
---
- don't remember. Some little bugs I guess.

1.2
---
- don't remember. A few tiny stuff for sure.

1.3-RC1
-------
- added bookmarklet and tools page
- improved XSS filter when adding new URL
- code cleanup in admin/index.php to separate code and display
- added favicon
- stricter coding to prevent notices with undefined indexes
- hide PHP notices & SQL errors & warnings, unless YOURLS_DEBUG constant set to true

1.4
---
- added an upgrader from 1.3 to 1.4
- change in logic: now using a global object $ydb for everything related to DB and other globally needed stuff
- change in logic: include "load-yourls.php" instead of "config.php" to start engine
- 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)
- improved the installer, with .htaccess file creation
- layout tweak: now prettier, isn't it?
- stats! OMG stats!

1.4.1
-----
- fixed base 62 URLs (keywords with MiXeD CaSe)
- new & secure auth method for API calls, with no need to use login & password combo
- allow SSL enforcement for admin pages
- new API method: stats for individual URL.
- prevent internal redirection loops
- filter and search URLs & short URLs by date

1.4.2
-----
- fixed bug in auth function
- added sample public API file
- added check in API requests for WordPress plugin when adding a new short URL
- prettier sample public interface

1.4.3
-----
- fixed bug no-stats-showing-ffs due to inconsistency in DB schema
- improve error reporting with API method url-stat

1.5
---
- added: plugin architecture! OMG plugins!!1!!1!
- added: directory /user, config.php can be moved there
- added: new "instant bookmarklets"
- added: 1 click copy-to-clipboard a la bitly
- change in logic: now all request are handled by PHP and don't rely on .htaccess
- added: saving URL titles
- added: support for prefix-n-shorten: sho.rt/http://example.com/
- added: core plugin to allow hyphens in URLs
- added: core sample plugin to wrap redirected URLs in a social toolbar
- added: core sample plugin to show how to create administration page in plugins
- added: core plugin to display a random pretty background
- changed: layout now using a more consistent palette, see http://yourls.org/palette
- added: anti XSS and anti CSRF measures
- added: interactive map if possible in stat traffic by countries
- fixed: lots of bugs

1.5.1
-----
- added: full jsonp support
- added: ability to use encrypted passwords in the config file
- fixed: support for http://www.sho.rt/bleh and http://sho.rt/bleh
- added: support for any favicon dropped in the /user directory
- updated: Google Visualization API instead of deprecated Google Charts
- fixed: bugs, bugs, bugs
- added: hooks, hooks, hooks
- improved: things, things, things

1.6
---
- added: custom API actions
52 changes: 26 additions & 26 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
__ ______ _ _ _____ _ _____
\ \ / / __ \| | | | __ \| | / ____|
\ \_/ / | | | | | | |__) | | | (___
\ /| | | | | | | _ /| | \___ \
| | | |__| | |__| | | \ \| |____ ____) |
|_| \____/ \____/|_| \_\______|_____/

YOURLS - Your Own URL Shortener - A URL shortening script

---------------------------------------------------------------

This program is free software. Do whatever the hell you want with it.

This program is distributed in the hope that it will be useful and/or
fun to use. There is absolutely no guarantee of any kind about anything.

For more text, have a look at http://www.gnu.org/licenses/gpl.txt

---------------------------------------------------------------

This software incorporates code stolen from WordPress, as shown by
comments in source where applicable.

---------------------------------------------------------------

By Lester CHAN (initial idea), Ozh RICHARD (development) and contributors.
__ ______ _ _ _____ _ _____
\ \ / / __ \| | | | __ \| | / ____|
\ \_/ / | | | | | | |__) | | | (___
\ /| | | | | | | _ /| | \___ \
| | | |__| | |__| | | \ \| |____ ____) |
|_| \____/ \____/|_| \_\______|_____/

YOURLS - Your Own URL Shortener - A URL shortening script

---------------------------------------------------------------

This program is free software. Do whatever the hell you want with it.

This program is distributed in the hope that it will be useful and/or
fun to use. There is absolutely no guarantee of any kind about anything.

For more text, have a look at http://www.gnu.org/licenses/gpl.txt

---------------------------------------------------------------

This software incorporates code stolen from WordPress, as shown by
comments in source where applicable.

---------------------------------------------------------------

By Lester CHAN (initial idea), Ozh RICHARD (development) and contributors.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
![yourls](http://yourls.org/images/yourls-logo.png)
[YOURLS](http://yourls.org)
======
**YOURLS** is a set of PHP script that will allow you to run your own URL shortener. You'll have full control over your data, detailed stats and analytics, plugins, and more. It's free.

Useful links
------------
* [Project home & doc](http://yourls.org)
* [Official blog](http://blog.yourls.org)
* [Wiki documentation](https://github.com/YOURLS/YOURLS/wiki/)
* [Issue tracker](https://github.com/YOURLS/YOURLS/issues)
* [Release archive](https://github.com/YOURLS/YOURLS/tags)

License
-------
![yourls](http://yourls.org/images/yourls-logo.png)
[YOURLS](http://yourls.org)
======
**YOURLS** is a set of PHP script that will allow you to run your own URL shortener. You'll have full control over your data, detailed stats and analytics, plugins, and more. It's free.

Useful links
------------
* [Project home & doc](http://yourls.org)
* [Official blog](http://blog.yourls.org)
* [Wiki documentation](https://github.com/YOURLS/YOURLS/wiki/)
* [Issue tracker](https://github.com/YOURLS/YOURLS/issues)
* [Release archive](https://github.com/YOURLS/YOURLS/tags)

License
-------
Free software. Do whatever the hell you want with it.
102 changes: 51 additions & 51 deletions admin/admin-ajax.php
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
<?php
define( 'YOURLS_ADMIN', true );
define( 'YOURLS_AJAX', true );
require_once( dirname( dirname( __FILE__ ) ) .'/includes/load-yourls.php' );
yourls_maybe_require_auth();

// This file will output a JSON string
header( 'Content-type: application/json' );

if( !isset( $_REQUEST['action'] ) )
die();

// Pick action
$action = $_REQUEST['action'];
switch( $action ) {

case 'add':
yourls_verify_nonce( 'add_url', $_REQUEST['nonce'], false, 'omg error' );
$return = yourls_add_new_link( $_REQUEST['url'], $_REQUEST['keyword'] );
echo json_encode($return);
break;

case 'edit_display':
yourls_verify_nonce( 'edit-link_'.$_REQUEST['id'], $_REQUEST['nonce'], false, 'omg error' );
$row = yourls_table_edit_row ( $_REQUEST['keyword'] );
echo json_encode( array('html' => $row) );
break;

case 'edit_save':
yourls_verify_nonce( 'edit-save_'.$_REQUEST['id'], $_REQUEST['nonce'], false, 'omg error' );
$return = yourls_edit_link( $_REQUEST['url'], $_REQUEST['keyword'], $_REQUEST['newkeyword'], $_REQUEST['title'] );
echo json_encode($return);
break;

case 'delete':
yourls_verify_nonce( 'delete-link_'.$_REQUEST['id'], $_REQUEST['nonce'], false, 'omg error' );
$query = yourls_delete_link_by_keyword( $_REQUEST['keyword'] );
echo json_encode(array('success'=>$query));
break;

case 'logout':
// unused for the moment
yourls_logout();
break;

default:
yourls_do_action( 'yourls_ajax_'.$action );

}

die();
<?php
define( 'YOURLS_ADMIN', true );
define( 'YOURLS_AJAX', true );
require_once( dirname( dirname( __FILE__ ) ) .'/includes/load-yourls.php' );
yourls_maybe_require_auth();

// This file will output a JSON string
header( 'Content-type: application/json' );

if( !isset( $_REQUEST['action'] ) )
die();

// Pick action
$action = $_REQUEST['action'];
switch( $action ) {

case 'add':
yourls_verify_nonce( 'add_url', $_REQUEST['nonce'], false, 'omg error' );
$return = yourls_add_new_link( $_REQUEST['url'], $_REQUEST['keyword'] );
echo json_encode($return);
break;

case 'edit_display':
yourls_verify_nonce( 'edit-link_'.$_REQUEST['id'], $_REQUEST['nonce'], false, 'omg error' );
$row = yourls_table_edit_row ( $_REQUEST['keyword'] );
echo json_encode( array('html' => $row) );
break;

case 'edit_save':
yourls_verify_nonce( 'edit-save_'.$_REQUEST['id'], $_REQUEST['nonce'], false, 'omg error' );
$return = yourls_edit_link( $_REQUEST['url'], $_REQUEST['keyword'], $_REQUEST['newkeyword'], $_REQUEST['title'] );
echo json_encode($return);
break;

case 'delete':
yourls_verify_nonce( 'delete-link_'.$_REQUEST['id'], $_REQUEST['nonce'], false, 'omg error' );
$query = yourls_delete_link_by_keyword( $_REQUEST['keyword'] );
echo json_encode(array('success'=>$query));
break;

case 'logout':
// unused for the moment
yourls_logout();
break;

default:
yourls_do_action( 'yourls_ajax_'.$action );

}

die();
Loading

0 comments on commit 3daf659

Please sign in to comment.