diff --git a/bin/fix_license b/bin/fix_license new file mode 100755 index 0000000000..e5f16ba4a0 --- /dev/null +++ b/bin/fix_license @@ -0,0 +1,94 @@ +#!/bin/php + +. + */ +', '// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/soci +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} +', '/* + * This file is part of GNU social - https://www.gnu.org/software/social + * + * GNU social is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GNU social is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with GNU social. If not, see . + */']; + +$new_license = "// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} +"; + +foreach ($old_licenses as $old) { + $files = str_replace("$old", "$new_license", $files); +} + +F\map(F\zip($files, $filenames), + function ($arg) + { + list($file, $filename) = $arg; + file_put_contents($filename, $file); + } +); diff --git a/src/Command/ListEventsCommand.php b/src/Command/ListEventsCommand.php index 2aa9132c3c..77bbb6d696 100644 --- a/src/Command/ListEventsCommand.php +++ b/src/Command/ListEventsCommand.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Command to search for event by pattern diff --git a/src/Controller/NetworkPublic.php b/src/Controller/NetworkPublic.php index 1ccabe34bf..9da7ff2ed7 100644 --- a/src/Controller/NetworkPublic.php +++ b/src/Controller/NetworkPublic.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Handle network public feed diff --git a/src/Core/DB.php b/src/Core/DB.php index c1505ca3e2..47258b54e0 100644 --- a/src/Core/DB.php +++ b/src/Core/DB.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Doctrine entity manager static wrapper diff --git a/src/Core/DefaultSettings.php b/src/Core/DefaultSettings.php index a7a451d44e..e509557a89 100644 --- a/src/Core/DefaultSettings.php +++ b/src/Core/DefaultSettings.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Write the default settings to the database diff --git a/src/Core/GNUsocial.php b/src/Core/GNUsocial.php index 7b80a1d47b..254447fa10 100644 --- a/src/Core/GNUsocial.php +++ b/src/Core/GNUsocial.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Main GNU social entry point diff --git a/src/Core/GSEvent.php b/src/Core/GSEvent.php index 0a349e1f23..1336abcaff 100644 --- a/src/Core/GSEvent.php +++ b/src/Core/GSEvent.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * GNU social's event handler wrapper around Symfony's, diff --git a/src/Core/I18n.php b/src/Core/I18n.php index d896888043..d455105372 100644 --- a/src/Core/I18n.php +++ b/src/Core/I18n.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Utility functions for i18n diff --git a/src/Core/Log.php b/src/Core/Log.php index 88bd04cfaf..58dcb36d3e 100644 --- a/src/Core/Log.php +++ b/src/Core/Log.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * GNU social's logger wrapper around Symfony's, diff --git a/src/Core/ModulesManager.php b/src/Core/ModulesManager.php index ef6a3efb15..a08ca2c902 100644 --- a/src/Core/ModulesManager.php +++ b/src/Core/ModulesManager.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Module and plugin loader code, one of the main features of GNU social diff --git a/src/Core/RouteLoader.php b/src/Core/RouteLoader.php index 3e82986044..a9e8344ec6 100644 --- a/src/Core/RouteLoader.php +++ b/src/Core/RouteLoader.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Dynamic router loader and URLMapper interface atop Symfony's router diff --git a/src/Core/SchemaDefDriver.php b/src/Core/SchemaDefDriver.php index 0b3e80a881..8e71260b0f 100644 --- a/src/Core/SchemaDefDriver.php +++ b/src/Core/SchemaDefDriver.php @@ -1,21 +1,22 @@ . - */ +// {{{ License +// This file is part of GNU social - https://www.gnu.org/software/social +// +// GNU social is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// GNU social is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with GNU social. If not, see . +// }}} + /** * Doctrine metadata driver which implements our old `schemaDef` interface diff --git a/src/Entity/Attention.php b/src/Entity/Attention.php index bd7b06347d..8d856f1d5c 100644 --- a/src/Entity/Attention.php +++ b/src/Entity/Attention.php @@ -1,7 +1,7 @@