Move planet feed reader to Feed class
Details
- Reviewers
bcooksley aacid - Maniphest Tasks
- T11299: Move Capacity websites and kde.org to PHP7
Not tested yet
Diff Detail
- Branch
- /trunk/www/sites/www
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 16108 Build 16126: arc lint + arc unit
Aside from the comments above, this looks fine.
Are all other parts of the codebase good to go from the perspective of PHP7? (including the Paypal donations stuff?)
aetherlibs/DB.php | ||
---|---|---|
22 | Just curious, what is this trying to do? We already make sure that the path containing the files with the credentials is in the PHP include_path (as part of the general server setup) so no explicit code for that is needed. | |
25 | We should probably use UTC for this. |
@bcooksley Can you send me the content of fundraisers/yearend2016/donations_auth.inc with the password removed? Same probably for other directory in fundraisers.
aetherlibs/DB.php | ||
---|---|---|
22 | This was in the original code of the DB class, I will remove it. |
One of the current outstanding issues with the KDE.org site is that it uses not one or two, but three different configuration files for the same database details.
These probably need to be unified.
The current content of donations_auth.inc is as follows:
<?php $host = "localhost"; $db = "kdeorg"; $user = "kdeorg"; $pass = "<removed>"; $sq = mysql_connect($host,$user,$pass); mysql_select_db($db); mysql_set_charset('utf8', $sq); ?>
The contents of db_auth.inc is as follows:
<?php $db_username = "kdeorg"; $db_password = "<removed>"; $db_database = "kdeorg"; ?>
and finally, the contents of config.php is as follows:
<?php $currency = 'EUR'; $kdeEvMail = "kde-ev-board@kde.org"; $dbhost = '<removed'; $dbuser = 'kdeorg'; $dbpass = '<removed>'; $dbname = 'kdeorg'; $dbConnection = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname) or die (mysqli_connect_error()); ?>
There was so many error/warning in community/donations/graph.php that I decided to rewrite it using graph.js
I tested the paypal code using the sandbox and it works :)
TODO:
- remove all the notify.php
- Unify the database access to the following config.php located in capacity/includes:
<?php $currency = 'EUR'; $kdeEvMail = "kde-ev-board@kde.org"; $dbhost = 'localhost'; $dbuser = 'kdeorg'; $dbpass = ''; $dbname = 'kdeorg'; $dbConnection = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass);
- Write fixtures for all the donation compaign for testing purpose disabled by default (see setup-db.php)
- Fix the error I just found ;)
fundraisers/yearend2016/index.php | ||
---|---|---|
26–27 | query not used | |
64–65 | I forgot execute() |
aetherlibs/DB.php | ||
---|---|---|
6 | Affero isn't really one of our "approved" licenses https://community.kde.org/Policies/Licensing_Policy | |
community/donations/index.php | ||
59 ↗ | (On Diff #66509) | you left the sandbox here |
69 ↗ | (On Diff #66509) | and here |
community/donations/notify.php | ||
41 | and here |
@aacid I see in the licensing policies that the AGPL is recommended for stuff running on a server and some part of capacity (where the first version of this file was copied) are licensed under AGPL. I deleted this file since it is not needed anymore.
aetherlibs/DB.php | ||
---|---|---|
6 | Actually it is, the thing only says AGPL and no Affero so my search failed ^_^ |
Thanks for your continue work on this Carl! Just one thing I spotted while having a look through...
community/donations/graph.php | ||
---|---|---|
6 | Given we're in 2019 maybe we should increase the limit to something like 2030? |
is there anything this is waiting on? otherwise i'd just commit it and be aware thing changed in case something breaks and fix it fast
community/donations/notify.php | ||
---|---|---|
33 | do we need this? | |
57 | i think we're always running in debug (double check with ben, so no need to have these error_log calls?) | |
64 | this doesn't seem like an error |
- Remove useless logging
- Fix community/donations/statistics/index.php
- Fix some divisions by zero
There is still a know bug in community/donations/previousdonation.php and then it's ready to go ;)
@bcooksley Ok I think this patch is now ready. Ping me in IRCC, when you have the time to change the server configuration, so that the homepage is not down to long