Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase #2

Open
wants to merge 202 commits into
base: stats_demographic_rework_rebase
Choose a base branch
from
Open

rebase #2

wants to merge 202 commits into from

Conversation

ZainVirani
Copy link
Owner

No description provided.

driusan and others added 30 commits November 23, 2017 15:11
* Remove unused variable in main.php

* Fix PHPMD error
Remove help content from the default schema, which is now stored
in markdown files alongside the module.

All that were left were help content that said "Under construction"
and had no content, so they were removed as well.

(The module itself still remains in order to add help content
for instruments.)
create_function was deprecated in PHP 7.2. This removes one instance of it in the LorisForm logic that is used (as far as I can tell) for instruments with conditional requirements. It should be backwards compatible and have no functional change.
…ction" (aces#3341)

This removes a reference to the PHP function "create_function", which was
deprecated in PHP 7.2 in XIN rule evaluation. (create_function was essentially
an `eval`).

Unfortunately, it was used in XIN rules to create a function which can take
an arbitrary operator for comparison, but there is no way to know which operators
instruments are actually using. This adds the known operators after talking
to a couple projects, but throws an exception requesting a bug report for
anyone who was not covered by these cases.
…es#2763)

If no issue tracker is specified, the patch file will add /issue_tracker as the default issue tracker.

On install, /issue_tracker will be made the default issue tracker.
…ces#3340)

This removes a call to create_function from the User::isPasswordStrong
function, which was deprecated in PHP 7.2. (create_function is effectively
an eval, and strongly discouraged even without being deprecated.)
This updates phpunit to 6.5.5 in order to make it possible to support PHP 7.2.
…ces#3428)

This adds 2 new functions to the database.class.inc that build on the pselect() and pselectCol() in order to return an array indexed by a selected primary key. These functions are meant to replace the multitude of places in the code where the pselect() and pselectCol() result is ran through a foreach loop in order to extract and re-index the array using its primary keys.

The necessary Exceptions are thrown to avoid data being overwritten in the built array and misuse of the function in general.
… out users (aces#3463)

This should allow us to make better use of PHP's type system when dealing with users.
This runs the LORIS test suite under docker to fixes Travis failures out of our control.
It appears that whether or not the path is required before the file
for the router or whether it implicitly looks in the htdocs folder
has sporadically changed.. again.

This reverts the change to docker compose and instead adds the
path so that it can find the file.
This adds PSR15 based page decoration middleware for both
anonymous, and logged in users. The middleware takes an undecorated
request and adds all the "chrome" (headers, footers, etc) that
are required to make the requests look consistent and will be
required by an upcoming PSR15-based router.

This is an attempt to split the router PR into smaller, more manageable
chunks. Note that it implements the handler for NDB_Page, but
isn't currently used.

This also begins using the directory "src/" as a location for properly
namespaced PSR4-based autoloaded classes rather than the
current php/libraries jumble of code used in LORIS.
This defines the interfaces for a new LORIS data framework, which is
intended to provide a better separation of concerns than the current 
page framework in which display, data retrieval, data conversion 
(ie. to JSON) and sometimes other concerns are mixed into a single "page"
object which often leaks its abstractions (ie most of the "NDB_Menu_Filter"
class simply builds an SQL query.) The framework
lives in a LORIS\Data namespace, and as the name implies, is only
concerned with managing data, not with displaying it.

The new LORIS data framework is concerned with the retrieval, filtering,
and mapping of data. Unlike the existing "NDB_Page framework" (for lack of
a better name), the new data framework takes more inspiration for its design from
functional than object oriented programming and makes the assumption
that the data to be sent to the user is a pure function of the data itself, and
the user trying to access the data. The interfaces it defines are implemented 
in terms of immutable data structures.

The end result is (hopefully) a cleaner, more maintainable and
debuggable data access framework which makes it easier to implement
features such as subproject or site based permissions consistently across
LORIS modules.

The framework itself takes a fairly high level view of what "data" is
in its interfaces and leaves the specifics of internal representations
to its implementors (ie. module writers) who are closer to the data
itself.

In rough terms, \LORIS\Data\Provisioners get data from somewhere
(such as the LORIS SQL or CouchDB databases) and return \LORIS\Data\DataInstances.
\LORIS\Data\Filters filter the data (ie. for things like permission
checks) before sending it to the user, and \LORIS\Data\Mappers map the data
(ie. for things like anonyization.) See the documentation in the code
for more details.
The dicom_archive is updated as an example/demonstration of how to use this
framework.
…comments (aces#2913)

- Delete functions marked as unused in the function comments (and confirmed by a Github search).
- Update function comments to reflect some locations where they are used
…3481)

This inserts explicit column names into the testing data table.
This builds on aces#3477 to add the classes which implement (but not yet use) a PSR15 request handler based router for LORIS, as well as adding authentication middleware. 

A PrefixRouter is a type of Router which, based on the prefix of the request, strips off the prefix and delegates to another router.

A BaseRouter serves the root of a LORIS install and, effectively, replaces .htaccess. It annotates the PSR7 request with common properties like the user accessing LORIS and the BaseURL being served, but otherwise acts like a PrefixRouter to strip part of the URL and delegate to another router.

A ModuleRouter is a type of router which adds authentication middleware based on whether or not the module being loaded is public, and delegate's to the module's handler. This is done outside of the module itself's handler to ensure the authentication middleware can't be accidentally removed by a module without setting the public flag.

A ModuleFileRouter is a type of PrefixRouter which handles serving the /css, /js, and /static files of a module off the filesystem.
…_to_19_take2_FIXES

[19.0 Release] Fixing merge issues
This builds on aces#3502 in order to provide an implementation of the interfaces defined therein for common use cases in LORIS.

In particular, it defines a UserSiteMatch filter, and a DBRowProvisioner, which can be used to either get data from a database in accordance with the framework, or filter out DataInstances where the data model being retrieved does not match the User's site (if the data model includes a getCenterID or getCenterIDs function.)
This fixes some typos that resulted in changes to the
new Data framework, due to splitting the PR into multiple
PRs, and one of them requiring changes which weren't
properly updated in following PRs.
This adds the index.php entrypoint for the new PSR15 based LORIS router, building on aces#3480. The router mostly defers to the changes in aces#3480, but also adds the handler for Modules, and a Content-Length middleware which adds an HTTP Content-Length header to any response.

This doesn't update any existing modules to use it, as some modules that use PHP super-globals will require changes. (The next PR in this series will finally switch over to the new router, and update any existing modules that require changes.)
This randomly fixes some classes of issues detected by phan and updates the phan config to ensure no regressions.
Until now, the exclusion of localizers were hardcoded in the tarchiveLoader in the variable $exclude.

This PR allows the possibility to configure the sequences that a user might want to exclude from the dcm2mnc command (localizers, scouts and other). In the "Imaging Pipeline" section of the Config module, it is now possible to specify the different series descriptions to be excluded from the insertion pipeline. Two default example have been set in LORIS: is localizer and scout (see screenshot below)

The imaging script will then used the values stored in the Config modules for the excluded_series_description config setting and create a regular expression out of those values to use afterwards when calling dcm2mnc via the find command which will exclude the files matching the created regular expression pattern.

See also:
Related PR on the LORIS-MRI side: aces/Loris-MRI#264
nnadeau and others added 30 commits August 7, 2018 12:25
This fixes various spelling typos in documentation in LORIS.
There is no such thing as a PCSID.
this should prevent a user to grant or remove permissions that he do not already own
[POST RELEASE] PULL FORWARD OF 20.0.0 INTO BUGFIX
The HelpFile class has been changed to use the safe update function from the database class instead of the explicitly unsafe version.

unsafeupdate is to be used with caution, only when you know you need to insert HTML and know that you can trust it.  This change fixes a security issue while preserving the markup functionality of the help editor. HTML will not directly render but Markdown will.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.