53 Commits

Author SHA1 Message Date
Peter Kokot
956d298c91 Move Release service class to container 2019-01-25 23:46:21 +01:00
Peter Kokot
e98cb34ebc Move Rest generator service to container and resolve circular reference 2019-01-25 22:18:39 +01:00
Peter Kokot
95fe965bf3 Implement dependency injection container globally
This patch implements dependency injection container in the bootstrap file.
2019-01-25 20:28:48 +01:00
Peter Kokot
5ed911a14f Bump copyrights and license year range to 2019 2019-01-25 00:22:14 +01:00
Peter Kokot
aabb5a0145 Use template engine on news page 2019-01-05 13:03:15 +01:00
Peter Kokot
27a34868ea Refactor docs pages to use template engine 2019-01-05 00:50:52 +01:00
Peter Kokot
f7168d8348 Refactor Auth dependencies and add initSession() method
This patch moves some dependencies to constructor instead of separate
setters and adds an Auth::iniSession() method.
2018-12-13 00:05:27 +01:00
Peter Kokot
71e1df293c Remove karma functionality from the rest generator
Karma is not needed for the Rest generator service because current pecl
application uses only two user levels (admins and maintainers).

Additional change in this context:
- Partioal dependencies injected via class constructor.
2018-12-12 22:26:40 +01:00
Peter Kokot
d9a602e2b5 Add Extractor utility
This patch adds extractor service class for retrieving file contents
from the tar gzip archives (tgz). Instead of a pure PHP implementation
Archive_Tar PEAR package it uses Phar and zlib extensions to retrieve
contents from the phar stream.
2018-12-06 15:52:22 +01:00
Peter Kokot
7be4f4dbc9 Refactor files uploading
This patch removes dependency of the deprecated HTTP_Upload PEAR package
and replaces it with a lighter version of a dedicated uploader service
class instead.
2018-12-02 13:06:35 +01:00
Peter Kokot
8cf39c47be Remove deprecated PEAR_Common usage 2018-11-25 01:07:28 +01:00
Peter Kokot
788b92f59b Remove Pager dependency
This patch simplifies the Pager dependency and adds a new Pagination
class for this purpose.
2018-11-22 23:19:59 +01:00
Peter Kokot
9269da80ad Remove Net_URL2 dependency
This patch simplifies handling page redirections.
2018-11-22 02:22:46 +01:00
Peter Kokot
e18f0b4ab7 Migrate user to PDO
This patch now concludes migration to PDO.
2018-11-20 03:44:03 +01:00
Peter Kokot
31632f2b82 Migrate package to PDO 2018-11-19 22:11:38 +01:00
Peter Kokot
74c96922c9 Refactor fetching users 2018-11-19 01:41:30 +01:00
Peter Kokot
2e0dc85ec4 Migrate more files to PDO 2018-11-18 21:37:55 +01:00
Peter Kokot
f6d5cf52e7 Move listing all categories to repository 2018-11-18 18:24:13 +01:00
Peter Kokot
5fcf096a90 Migrate Rest generator to PDO 2018-11-17 21:34:08 +01:00
Peter Kokot
661c4d3aa7 Enable PDO for all files 2018-11-17 20:38:50 +01:00
Peter Kokot
50a0182d07 Refactor bootstrap initializations 2018-11-17 20:25:28 +01:00
Peter Kokot
6215e0157e Migrate accounts.php to PDO 2018-11-17 14:02:03 +01:00
Peter Kokot
5697cdef1d Migrate account-request.php to PDO 2018-11-17 10:54:26 +01:00
Peter Kokot
ce410385e5 Add agregated package stats repository 2018-11-17 05:48:11 +01:00
Peter Kokot
597f217f64 Refactor Release repository to use PDO 2018-11-17 03:58:25 +01:00
Peter Kokot
61d696cc6b Enable PDO in CLI scripts 2018-11-17 01:56:25 +01:00
Peter Kokot
2810c64eb2 Migrate json.php to PDO 2018-11-17 00:26:48 +01:00
Peter Kokot
10e95b4602 Migrate wishlist to PDO 2018-11-17 00:01:20 +01:00
Peter Kokot
74dc512c55 Add categoires repository 2018-11-16 23:19:46 +01:00
Peter Kokot
d4f485c129 Add users repository 2018-11-16 22:10:12 +01:00
Peter Kokot
1da9b3e980 Refactor package stats repository to use PDO 2018-11-16 20:17:02 +01:00
Peter Kokot
1d085278d2 Refactor error_reporting()
This moves all error reporting configuration currently applied in a
single place in the bootstrap based on the environment this app is
running. Additionally the approach of displaying errors has been
defined to display errors in development environment and not in
production. In production these should be logged in a file or similar.
2018-11-16 18:52:03 +01:00
Peter Kokot
a90f1d4d0c Move use statement to proper place 2018-11-16 06:35:49 +01:00
Peter Kokot
cc7ba6f0fc Refactor display_user_notes() to repository
This patch adds a simple database adapter using PDO and migrates the
display_user_notes() function into a repository class.
2018-11-16 03:51:06 +01:00
Peter Kokot
7b932a76f6 Add more credits to empty and missing authors headers 2018-11-15 22:24:31 +01:00
Peter Kokot
c54484935e Enable autoloader for all pages 2018-11-15 18:35:43 +01:00
Peter Kokot
e15a51007d Add dual autoloading mechanism
This patch adds a dual autoloading mechanism for classes until further
refactorings will be possible using Composer's autoloader and full
PSR-4 support.
2018-11-15 17:49:22 +01:00
Peter Kokot
fcaa99b697 Move HTTP/Upload.php require to bootstrap 2018-11-15 06:50:17 +01:00
Peter Kokot
4ff904a475 Add initial autoloading 2018-11-15 05:54:01 +01:00
Peter Kokot
26f22e60b1 Add use statements and namespaces 2018-11-15 04:25:08 +01:00
Peter Kokot
4df83eb5fd Refactor database configuration
This patch moves database configuration from constants into a
configuration level values for dev and prod environments.
2018-11-15 02:29:43 +01:00
Peter Kokot
edf11ec836 Add DSN converter
This patch adds a DSN string converter that can convert the already set
DSN database setting into an array and populates proper configuration
values. This is done to sync things with the production settings and to
gradually migrate the mysql_* mysqli_* elements to PDO.
2018-11-15 00:47:33 +01:00
Peter Kokot
86ff37eb69 Testing database changes 2018-11-14 21:36:28 +01:00
Peter Kokot
2013d3f6b6 Revert "Refactor database configutation"
This reverts commit fdad830303.
2018-11-14 06:06:11 +01:00
Peter Kokot
fdad830303 Refactor database configutation
This patch moves database configuration from constants into a
configuration level values for dev and prod environments.
2018-11-14 05:47:22 +01:00
Peter Kokot
62c2f892ec Refactor posttohost function to API client
This patch refactors the posttohost() function into a dedicated more
OOP-alike approach of using a new PhpMasterClient class with added unit
test.

For testing it uses a simple CLI server written and runnable via php
file.
2018-11-14 00:48:07 +01:00
Peter Kokot
2ba3386ef2 Move require_once for classes to bootstrap.php
This patch moves several require_once items to bootstrap.
2018-11-13 21:42:46 +01:00
Peter Kokot
b820f674d6 Refactor pear-prepend and including app classes
This patch moves several classes from multiple files into a single place
dedicated for loading classes.
2018-11-13 20:42:57 +01:00
Peter Kokot
04eced2696 Refactor pear-database.php and renumber_visitations()
This patch moves leftovers from pear-database into a bit more proper
places.
2018-11-13 19:16:17 +01:00
Peter Kokot
8371f395a9 Refactor bootstrap
This patch refactors bootstrap file to include more PEAR things so
other files don't need to do this. It's also done as a partial migrtion
to better classes autoloading in the future.
2018-11-13 18:12:33 +01:00