diff --git a/.github/RELEASE.md b/.github/RELEASE.md index eb0aa11ff..b3080c5b3 100644 --- a/.github/RELEASE.md +++ b/.github/RELEASE.md @@ -107,7 +107,7 @@ The UI works best if you don't use it in an opinionated fashion and change just If you want a secure environment you should work through the preparing the server docs (up until the dragons) and be prepared to fix some of the issues the installer gets wrong manually by hacking the config file after the fact. -If you want to skip the installer GUI completely you can configure LibreTime using airtime_mvc/build/airtime.example.conf as an template. Due to some python/PHP differences you must remove all comments from the example to use it 😞. You'll also have to create some folder structures manually and check if the music dir got properly created directly in the database. Referencing a second `install -fiap` install on a non productive system for reference can help with this type of bootstrap. +If you want to skip the installer GUI completely you can configure LibreTime using legacy/build/airtime.example.conf as an template. Due to some python/PHP differences you must remove all comments from the example to use it 😞. You'll also have to create some folder structures manually and check if the music dir got properly created directly in the database. Referencing a second `install -fiap` install on a non productive system for reference can help with this type of bootstrap. ### Media-Monitor config needs manual removing diff --git a/.github/scripts/release.sh b/.github/scripts/release.sh index 95f6f7e60..cdeae8f39 100755 --- a/.github/scripts/release.sh +++ b/.github/scripts/release.sh @@ -28,7 +28,7 @@ echo -n "${suffix}" > ./VERSION echo " Done" echo -n "Running composer install..." -pushd airtime_mvc || (echo "could not cd in airtime_mvc!" && exit 1) +pushd legacy || (echo "could not cd in legacy!" && exit 1) composer install --quiet --no-dev --ignore-platform-reqs popd || exit echo " Done" @@ -36,8 +36,8 @@ echo " Done" # Adding back; may be useful later... #echo "Minimizing LibreTime Javascript files..." #cd $dir -#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \; -#find $target/airtime_mvc/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \; +#find $target/legacy/public/js/airtime/ -iname "*.js" -exec bash -c 'echo {}; jsmin/jsmin < {} > {}.min' \; +#find $target/legacy/public/js/airtime/ -iname "*.js" -exec mv {}.min {} \; #echo "Done" cd .. @@ -52,7 +52,7 @@ tar -czf "libretime-${suffix}.tar.gz" \ --exclude .travis.yml \ --exclude travis \ --exclude dev_tools \ - --exclude airtime_mvc/vendor/phing \ - --exclude airtime_mvc/vendor/simplepie/simplepie/tests \ + --exclude legacy/vendor/phing \ + --exclude legacy/vendor/simplepie/simplepie/tests \ libretime echo " Done" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c511ee8c0..5962d1aed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,7 +89,7 @@ jobs: sudo mkdir -p "$LIBRETIME_LOG_DIR" sudo chown runner:runner "$LIBRETIME_LOG_DIR" make test - working-directory: airtime_mvc + working-directory: legacy # Start lint the code without failing the entire workflow, should be merged # into 'test' when the entire matrix succeeds. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 39836899e..78c5ee7a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks -exclude: ^(airtime_mvc.*)$ +exclude: ^(legacy.*)$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.0.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a17b59ec5..154e8f484 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -115,9 +115,9 @@ API uses Django to interact with the same database. If you are a developer seeking to add new columns to the database here are the steps. -1. Modify `airtime_mvc/build/schema.xml` with any changes. +1. Modify `legacy/build/schema.xml` with any changes. 2. Run `dev_tools/propel_generate.sh` -3. Update the upgrade.sql under `airtime_mvc/application/controllers/upgrade_sql/VERSION` for example +3. Update the upgrade.sql under `legacy/application/controllers/upgrade_sql/VERSION` for example `ALTER TABLE imported_podcast ADD COLUMN album_override boolean default 'f' NOT NULL;` 4. Update the models under `api/libretimeapi/models/` to reflect the new changes. diff --git a/api/README.md b/api/README.md index d3fcc84c1..e2cf1f378 100644 --- a/api/README.md +++ b/api/README.md @@ -1,7 +1,7 @@ # LibreTime API This API provides access to LibreTime's database via a Django application. This -API supersedes the [PHP API](../airtime_mvc/application/controllers/ApiController.php). +API supersedes the [PHP API](../legacy/application/controllers/ApiController.php). ## Deploying diff --git a/dev_tools/propel_regenerate.sh b/dev_tools/propel_regenerate.sh index 3c3f82815..c1686c302 100755 --- a/dev_tools/propel_regenerate.sh +++ b/dev_tools/propel_regenerate.sh @@ -7,7 +7,7 @@ SCRIPT=$(readlink -f "$0") # Absolute directory this script is in SCRIPTPATH=$(dirname "$SCRIPT") -cd "$SCRIPTPATH/../airtime_mvc/" || (echo "could not cd in $SCRIPTPATH/../airtime_mvc/" && exit 1) +cd "$SCRIPTPATH/../legacy/" || (echo "could not cd in $SCRIPTPATH/../legacy/" && exit 1) path=$(pwd) cd build sed -i "s|\"project\.home =.*$\"|\"project.home = $path\"|g" build.properties diff --git a/dev_tools/update_po_files.sh b/dev_tools/update_po_files.sh index ecdb86177..3c85a7df6 100755 --- a/dev_tools/update_po_files.sh +++ b/dev_tools/update_po_files.sh @@ -4,16 +4,16 @@ cd .. #generate a new .po file #this will generate a file called messages.po -find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -find airtime_mvc -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po +find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 +find legacy -print0 -iname "*.phtml" -o -name "*.php" | xargs xgettext -L php --from-code=UTF-8 -k --keyword=_pro:1 -d pro --force-po #merge the new messages from messages.po into each existing .po file #this will generate new .po files -find ./airtime_mvc/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \; -find ./airtime_mvc/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \; +find ./legacy/locale/ -name "airtime.po" -exec msgmerge -N -U --no-wrap "{}" messages.po \; +find ./legacy/locale/ -name "pro.po" -exec msgmerge -N -U --no-wrap "{}" pro.po \; #delete the old .po files -find ./airtime_mvc/locale/ -name "*.po~" -delete +find ./legacy/locale/ -name "*.po~" -delete #delete the temporary po files we create in the root directory rm ./*.po diff --git a/docs/_docs/interface-localization.md b/docs/_docs/interface-localization.md index cd68f4186..70665a269 100644 --- a/docs/_docs/interface-localization.md +++ b/docs/_docs/interface-localization.md @@ -12,7 +12,7 @@ First, you should check if a localization is already under way for your locale o GNU **gettext** means using a .po file for each language or dialect, a specially formatted plain text file with groups of three or more lines, like this example from LibreTime's Korean localization: - #: airtime_mvc/application/configs/navigation.php:57 + #: legacy/application/configs/navigation.php:57 msgid "Media Folders" msgstr "λ―Έλ””μ–΄ 폴더" @@ -32,17 +32,17 @@ After forking the LibreTime git repository, make sure you're in the **master** b devel * master -Create a new locale directory (e.g. _airtime_mvc/locale/de_CH/LC_MESSAGES/_ for German as spoken in Switzerland): +Create a new locale directory (e.g. _legacy/locale/de_CH/LC_MESSAGES/_ for German as spoken in Switzerland): - mkdir -p airtime_mvc/locale/de_CH/LC_MESSAGES/ + mkdir -p legacy/locale/de_CH/LC_MESSAGES/ Copy the template _airtime.po_ file into the directory you just created: - cp airtime_mvc_locale/template/airtime.po airtime_mvc/locale/de_CH/LC_MESSAGES + cp legacy_locale/template/airtime.po legacy/locale/de_CH/LC_MESSAGES and update the header information in the new copy of the _airtime.po_ file using the **nano** editor: - nano airtime_mvc/locale/de_CH/LC_MESSAGES/airtime.po + nano legacy/locale/de_CH/LC_MESSAGES/airtime.po For the example of Swiss German, the header of the file should now look like this: diff --git a/docs/_docs/microsite.md b/docs/_docs/microsite.md index 7acbabbc8..f7f766f72 100644 --- a/docs/_docs/microsite.md +++ b/docs/_docs/microsite.md @@ -12,7 +12,7 @@ podcast tabs, and a live feed of your station with information on the the curren ## Modifying the LibreTime Radio Page -The background of the mini-site that appears when you visit the server's domain in your web browser can be changed by modifying the page's CSS file, located at _/usr/share/airtime/php/airtime_mvc/public/css/radio-page/radio-page.css_. +The background of the mini-site that appears when you visit the server's domain in your web browser can be changed by modifying the page's CSS file, located at _/usr/share/airtime/php/legacy/public/css/radio-page/radio-page.css_. ``` html { @@ -25,4 +25,4 @@ html { } ``` -Place the new background image in the `/usr/share/airtime/php/airtime_mvc/public/css/radio-page/img/` folder and change the `background:` entry's URL to point to the new image. The new image should be at least 1280 x 720 in pixel size to avoid being blurry. +Place the new background image in the `/usr/share/airtime/php/legacy/public/css/radio-page/img/` folder and change the `background:` entry's URL to point to the new image. The new image should be at least 1280 x 720 in pixel size to avoid being blurry. diff --git a/docs/_docs/ssl.md b/docs/_docs/ssl.md index a0e336547..936a96920 100644 --- a/docs/_docs/ssl.md +++ b/docs/_docs/ssl.md @@ -88,10 +88,10 @@ On port 80, Apache's _alias_ module is used to set a _Redirect permanent_ for th ServerAdmin admin@example.com - DocumentRoot /usr/share/airtime/php/airtime_mvc/public + DocumentRoot /usr/share/airtime/php/legacy/public DirectoryIndex index.php - + Options -Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny @@ -104,12 +104,12 @@ On port 80, Apache's _alias_ module is used to set a _Redirect permanent_ for th ServerAdmin admin@example.com - DocumentRoot /usr/share/airtime/php/airtime_mvc/public + DocumentRoot /usr/share/airtime/php/legacy/public Redirect permanent /login https://airtime.example.com/login SetEnv APPLICATION_ENV "production" - + Options -Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny diff --git a/install b/install index 06ca8bf60..bc73d5388 100755 --- a/install +++ b/install @@ -757,7 +757,7 @@ if [ "$ignore_dependencies" = "f" ]; then packages_files=( "${SCRIPT_DIR}/" - "${SCRIPT_DIR}/airtime_mvc" + "${SCRIPT_DIR}/legacy" "${SCRIPT_DIR}/api" "${SCRIPT_DIR}/python_apps/airtime_analyzer" "${SCRIPT_DIR}/python_apps/pypo" @@ -799,7 +799,7 @@ if [[ ! ${commandFound} -eq 0 ]]; then fi make VERSION # Create a VERSION file -make -C airtime_mvc build # Install php dependencies with composer +make -C legacy build # Install php dependencies with composer if [ -f /etc/airtime/airtime.conf ]; then # TODO use VERSION or some other way to check for updates and handle @@ -863,19 +863,19 @@ fi if [ "$in_place" = "t" ]; then verbose "\n * Setting current Airtime directory as web root..." - web_root=${AIRTIMEROOT}/airtime_mvc/public + web_root=${AIRTIMEROOT}/legacy/public elif [ -n "$web_root" ]; then verbose "\n * Creating Apache web root directory..." - cp -R ${AIRTIMEROOT}/airtime_mvc ${web_root} + cp -R ${AIRTIMEROOT}/legacy ${web_root} cp ${AIRTIMEROOT}/VERSION ${web_root} - web_root=${web_root}/airtime_mvc/public/ + web_root=${web_root}/legacy/public/ else verbose "\n * Creating default Apache web root directory /usr/share/airtime/php..." web_root="/usr/share/airtime/php" mkdir -p ${web_root} - cp -R ${AIRTIMEROOT}/airtime_mvc ${web_root} + cp -R ${AIRTIMEROOT}/legacy ${web_root} cp ${AIRTIMEROOT}/VERSION ${web_root} - web_root=${web_root}/airtime_mvc/public/ + web_root=${web_root}/legacy/public/ fi verbose "...Done" @@ -1014,7 +1014,7 @@ if [ ! -d /var/log/airtime ]; then loudCmd "mkdir -p /var/log/airtime" verbose "\n * Copying logrotate files..." - loudCmd "cp ${AIRTIMEROOT}/airtime_mvc/build/airtime-php.logrotate /etc/logrotate.d/airtime-php" + loudCmd "cp ${AIRTIMEROOT}/legacy/build/airtime-php.logrotate /etc/logrotate.d/airtime-php" loudCmd "cp ${AIRTIMEROOT}/python_apps/pypo/liquidsoap/airtime-liquidsoap.logrotate /etc/logrotate.d/airtime-liquidsoap" fi diff --git a/legacy/application/configs/airtime-conf-production.php b/legacy/application/configs/airtime-conf-production.php index 429dfa9e0..f3da664e1 100644 --- a/legacy/application/configs/airtime-conf-production.php +++ b/legacy/application/configs/airtime-conf-production.php @@ -1,6 +1,6 @@ array ( diff --git a/legacy/application/configs/conf.php b/legacy/application/configs/conf.php index ea42e33f5..d9c07ed48 100644 --- a/legacy/application/configs/conf.php +++ b/legacy/application/configs/conf.php @@ -17,7 +17,7 @@ class Config { "rootDir" => self::$rootDir ); - //In the unit testing environment, LIBRETIME_CONF_DIR will our local airtime.conf in airtime_mvc/application/test/conf: + //In the unit testing environment, LIBRETIME_CONF_DIR will our local airtime.conf in legacy/application/test/conf: $filename = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : LIBRETIME_CONF_DIR . "/airtime.conf"; $values = parse_ini_file($filename, true); diff --git a/legacy/build/build.properties b/legacy/build/build.properties index 35878010c..9704258b5 100644 --- a/legacy/build/build.properties +++ b/legacy/build/build.properties @@ -1,6 +1,6 @@ #Note: project.home is automatically generated by the propel-install script. #Any manual changes to this value will be overwritten. -project.home = /vagrant/airtime_mvc +project.home = /vagrant/legacy project.build = ${project.home}/build #Database driver diff --git a/legacy/public/js/airtime/dashboard/versiontooltip.js b/legacy/public/js/airtime/dashboard/versiontooltip.js index a5e75a37c..c9ab7720c 100644 --- a/legacy/public/js/airtime/dashboard/versiontooltip.js +++ b/legacy/public/js/airtime/dashboard/versiontooltip.js @@ -10,7 +10,7 @@ function getContent() { var isPreRelease = getIsPreRelease(); var msg = ""; - // See file airtime_mvc/application/views/helpers/VersionNotify.php for more info + // See file legacy/application/views/helpers/VersionNotify.php for more info if(isUpToDate()) { msg = $.i18n._("You are running the latest version"); } else { diff --git a/legacy/public/js/contextmenu/AIRTIME_DEV_README b/legacy/public/js/contextmenu/AIRTIME_DEV_README index d10d53c7b..9cafde959 100644 --- a/legacy/public/js/contextmenu/AIRTIME_DEV_README +++ b/legacy/public/js/contextmenu/AIRTIME_DEV_README @@ -1,7 +1,7 @@ Before you overwrite jquery.contextMenu.js, note that we have changed a few lines in this file. -denise@denise-DX4860:~/airtime/airtime_mvc/public/js/contextmenu$ diff -u jquery.contextMenu_orig.js jquery.contextMenu.js +denise@denise-DX4860:~/airtime/legacy/public/js/contextmenu$ diff -u jquery.contextMenu_orig.js jquery.contextMenu.js --- jquery.contextMenu_orig.js 2012-04-20 10:15:59.943215571 -0400 +++ jquery.contextMenu.js 2012-04-20 10:00:18.911178927 -0400 @@ -306,6 +306,15 @@ diff --git a/legacy/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER b/legacy/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER index d62d5ecb1..bb451f1f9 100644 --- a/legacy/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER +++ b/legacy/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER @@ -4,7 +4,7 @@ in this file. Running a diff between the original column filter plugin (dataTables.columnFilter_orig.js) and our modified one (dataTables.columnFilter.js): -denise@denise-DX4860:~/airtime/airtime_mvc/public/js/datatables/plugin$ diff -u dataTables.columnFilter_orig.js dataTables.columnFilter.js +denise@denise-DX4860:~/airtime/legacy/public/js/datatables/plugin$ diff -u dataTables.columnFilter_orig.js dataTables.columnFilter.js --- dataTables.columnFilter_orig.js 2012-10-17 11:41:05.000000000 -0400 +++ dataTables.columnFilter.js 2012-11-22 12:20:03.997107451 -0500 @@ -103,7 +103,8 @@ diff --git a/legacy/public/js/fullcalendar/AIRTIME_DEV_README b/legacy/public/js/fullcalendar/AIRTIME_DEV_README index b78d7242c..1459cddfd 100644 --- a/legacy/public/js/fullcalendar/AIRTIME_DEV_README +++ b/legacy/public/js/fullcalendar/AIRTIME_DEV_README @@ -3,7 +3,7 @@ in this file. Running a diff between the original fullcalendar.js and our modified one: -denise@denise-DX4860:~/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js +denise@denise-DX4860:~/airtime/legacy/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js --- fullcalendar_orig.js 2013-10-08 16:03:35.442375219 -0400 +++ fullcalendar.js 2013-10-08 16:53:02.586338519 -0400 @@ -227,7 +227,7 @@ diff --git a/legacy/public/js/serverbrowse/AIRTIME_DEV_README b/legacy/public/js/serverbrowse/AIRTIME_DEV_README index 2597624a7..1c0e5957f 100644 --- a/legacy/public/js/serverbrowse/AIRTIME_DEV_README +++ b/legacy/public/js/serverbrowse/AIRTIME_DEV_README @@ -3,7 +3,7 @@ in this file. Running a diff between the original serverbrowser.js and our modified one: -denise@denise-DX4860:~/airtime/airtime_mvc/public/js/serverbrowse$ diff -u serverbrowser_orig.js serverbrowser.js +denise@denise-DX4860:~/airtime/legacy/public/js/serverbrowse$ diff -u serverbrowser_orig.js serverbrowser.js --- serverbrowser_orig.js 2012-11-28 11:42:43.250237696 -0500 +++ serverbrowser.js 2012-11-28 11:44:57.738242930 -0500 @@ -65,14 +65,14 @@ diff --git a/legacy/public/js/tipsy/AIRTIME_DEV_README b/legacy/public/js/tipsy/AIRTIME_DEV_README index 72ec196c4..86e671f7c 100644 --- a/legacy/public/js/tipsy/AIRTIME_DEV_README +++ b/legacy/public/js/tipsy/AIRTIME_DEV_README @@ -2,7 +2,7 @@ Before overwriting jquery.tipsy.js, please note we have changed a few lines to support manual triggering with live tipsy tooltips -denise@denise-DX4860:~/airtime/airtime_mvc/public/js/tipsy$ diff -u jquery.tipsy_orig.js jquery.tipsy.js +denise@denise-DX4860:~/airtime/legacy/public/js/tipsy$ diff -u jquery.tipsy_orig.js jquery.tipsy.js --- jquery.tipsy_orig.js 2012-12-13 12:03:48.780751104 -0500 +++ jquery.tipsy.js 2012-12-13 12:08:15.564761493 -0500 @@ -173,12 +173,10 @@ diff --git a/legacy/tests/application/helpers/AirtimeInstall.php b/legacy/tests/application/helpers/AirtimeInstall.php index c532e2ad1..286e204f2 100644 --- a/legacy/tests/application/helpers/AirtimeInstall.php +++ b/legacy/tests/application/helpers/AirtimeInstall.php @@ -1,5 +1,5 @@