Open Journal Systems
3.3.0
|
Public Member Functions | |
_checkBaseUrl ($baseUrl, $url) | |
_getBaseUrlAndPath ($url) | |
removeBaseUrl ($url) | |
Static Public Member Functions | |
static | _botFileListCacheMiss ($cache) |
static | checkGeneralPHPModule ($moduleName) |
static | cleanFileVar ($var) |
static | getArgs ($urlInfo, $isPathInfo, $userVars=array()) |
static | getBaseDir () |
static | getContextPaths ($urlInfo, $isPathInfo, $contextList=null, $contextDepth=null, $userVars=array()) |
static | getCurrentDate ($ts=null) |
static | getOp ($urlInfo, $isPathInfo, $userVars=array()) |
static | getPage ($urlInfo, $isPathInfo, $userVars=array()) |
static | isUserAgentBot ($userAgent, $botRegexpsFile=COUNTER_USER_AGENTS_FILE) |
static | isWindows () |
static | microtime () |
Static Public Attributes | |
static | $botRegexps = array() |
Class containing system-wide functions.
Definition at line 25 of file Core.inc.php.
|
static |
Bot list file cache miss fallback.
$cache | FileCache |
Definition at line 391 of file Core.inc.php.
References $botRegexps, and Registry\get().
Core::_checkBaseUrl | ( | $baseUrl, | |
$url | |||
) |
Check if the passed base url is part of the passed url, based on the context base url configuration. Both parameters can represent full url (host plus path) or just the path, but they have to be consistent.
$baseUrl | string Full base url or just it's path info. |
$url | string Full url or just it's path info. |
Definition at line 350 of file Core.inc.php.
References Config\getContextBaseUrls().
Referenced by _getBaseUrlAndPath().
Core::_getBaseUrlAndPath | ( | $url | ) |
Try to get the base url and, if configuration is set to use base url override, context path for the passed url.
$url | string |
Definition at line 286 of file Core.inc.php.
References _checkBaseUrl(), Config\getContextBaseUrls(), and Config\getVar().
Referenced by removeBaseUrl().
|
static |
Checks to see if a PHP module is enabled.
$moduleName | string |
Definition at line 89 of file Core.inc.php.
|
static |
Sanitize a value to be used in a file path. Removes any characters except alphanumeric characters, underscores, and dashes.
$var | string |
Definition at line 54 of file Core.inc.php.
References PKPString\regexp_replace().
Referenced by customAutoload(), getContextPaths(), APIRouter\getEntity(), getOp(), getPage(), and APIRouter\getVersion().
|
static |
Get the arguments present into the passed url information (not GET/POST arguments, only arguments appended to the URL separated by "/"). It expects that urls were built using the system.
$urlInfo | string Full url or just path info. |
$isPathInfo | boolean Tell if the passed url info string is a path info or not. |
$userVars | array (optional) Pass GET variables if needed (for testing only). |
Definition at line 221 of file Core.inc.php.
|
static |
Get the path to the base installation directory.
Definition at line 37 of file Core.inc.php.
References INDEX_FILE_LOCATION.
Referenced by PKPTemplateManager\__construct(), ThemePlugin\_getBaseDir(), PluginGridHandler\deletePlugin(), PKPPageRouter\getCacheFilename(), GalleryPlugin\getCurrentStatus(), CacheManager\getFileCachePath(), OrcidProfilePlugin\getIcon(), MarkupPlugin\getJsPath(), PluginHelper\installPlugin(), PKPTestCase\setUp(), PKPPageRouterTest\testGetCacheFilenameWithoutPathinfo(), PKPPageRouterTest\testGetCacheFilenameWithPathinfo(), ConfigTest\testGetDefaultConfigFileName(), PluginHelper\upgradePlugin(), and PKPUploadPublicFileHandler\uploadFile().
|
static |
Get context paths present into the passed url information.
$urlInfo | string Full url or just path info. |
$isPathInfo | boolean Whether the passed url info string is a path info or not. |
$contextList | array (optional) |
$contextDepth | int (optional) |
$userVars | array (optional) Pass GET variables if needed (for testing only). |
Definition at line 137 of file Core.inc.php.
References $application, cleanFileVar(), and PKPApplication\get().
Referenced by PKPRouter\getRequestedContextPaths().
|
static |
Return the current date in ISO (YYYY-MM-DD HH:MM:SS) format.
$ts | int optional, use specified timestamp instead of current time |
Definition at line 63 of file Core.inc.php.
Referenced by APP\components\forms\publication\PublishForm\__construct(), QueryNoteForm\__construct(), QueryForm\__construct(), MarkupConversionHelper\_addDependentImageToXmlDocument(), TextureHandler\_createDependentFile(), SubmissionFileManager\_instantiateSubmissionFile(), PKP\Services\PKPSiteService\_saveFileParam(), PKP\Services\PKPContextService\_saveFileParam(), PKP\Services\PKPPublicationService\_saveFileParam(), TextureHandler\_updateManuscriptFile(), RegistrationHandler\activateUser(), PKP\Services\PKPAnnouncementService\add(), PKP\Services\PKPSubmissionService\add(), ScheduledTask\addExecutionLogEntry(), MarkupConversionHelper\addFileToSubmissionGalley(), Installer\addPluginVersions(), EditorAction\addReviewer(), MarkupConversionHelper\addXmlDocumentToSubmissionFileList(), PKPUsageEventPlugin\buildUsageEvent(), ReviewerAction\confirmReview(), SubmissionFileManager\copyFileToFileStage(), AccessKeyManager\createKey(), AccessKeyDAO\deleteExpiredKeys(), PKPSubmissionSubmitStep4Form\execute(), CreateReviewerForm\execute(), ThankReviewerForm\execute(), PKPReviewerReviewStep3Form\execute(), ReviewReminderForm\execute(), RecommendationForm\execute(), RegistrationForm\execute(), CategoryForm\execute(), UserDetailsForm\execute(), QuickSubmitForm\execute(), ReviewerForm\execute(), PublishSubmissions\executeActions(), AnnouncementFeedGatewayPlugin\fetch(), Version\fromString(), IssueFileManager\fromTemporaryFile(), AccessKeyDAO\getAccessKey(), AccessKeyDAO\getAccessKeyByKeyHash(), AccessKeyDAO\getAccessKeyByUserId(), QuickSubmitForm\getIssueOptions(), PKP\Services\QueryBuilders\PKPSubmissionQueryBuilder\getQuery(), NativeXmlSubmissionFileFilter\handleRevisionElement(), TemporaryFileManager\handleUpload(), QueuedPaymentDAO\insertObject(), OJSCompletedPaymentDAO\insertObject(), NotificationDAO\insertObject(), NoteDAO\insertObject(), StageAssignmentDAO\insertObject(), VersionDAO\insertVersion(), IndividualSubscriptionDAO\isValidIndividualSubscription(), InstitutionalSubscriptionDAO\isValidInstitutionalSubscription(), PluginGridHandler\loadCategoryData(), SubmissionMailTemplate\log(), SubmissionFileLog\logEvent(), SubmissionLog\logEvent(), NotificationsGridHandler\markRead(), OrcidHandler\orcidVerify(), NativeXmlSubmissionFilter\populateObject(), PKP\Services\PKPPublicationService\publish(), IssueGridHandler\publishIssue(), EditorAction\recordDecision(), Validation\registerUserSession(), PKPReviewerGridHandler\reviewRead(), PKPReviewerReviewStep3Form\saveReviewForm(), PKPStageParticipantNotifyForm\sendMessage(), ReviewReminder\sendReminder(), PKPSubmissionSubmitStep1Form\setCommentsToEditor(), DataObjectTombstone\stampDateDeleted(), PKPSubmission\stampLastActivity(), PKPSubmission\stampModified(), Issue\stampModified(), PKPPublication\stampModified(), ReviewAssignment\stampModified(), TemporaryFileManager\submissionToTemporaryFile(), PKPReviewerGridHandler\unconsiderReview(), QueuedPaymentDAO\updateObject(), NoteDAO\updateObject(), StageAssignmentDAO\updateObject(), and PublicProfileForm\uploadProfileImage().
|
static |
Get the operation present into the passed url information. It expects that urls were built using the system.
$urlInfo | string Full url or just path info. |
$isPathInfo | boolean Tell if the passed url info string is a path info or not. |
$userVars | array (optional) Pass GET variables if needed (for testing only). |
Definition at line 204 of file Core.inc.php.
References cleanFileVar().
|
static |
Get the page present into the passed url information. It expects that urls were built using the system.
$urlInfo | string Full url or just path info. |
$isPathInfo | boolean Tell if the passed url info string is a path info or not. |
$userVars | array (optional) Pass GET variables if needed (for testing only). |
Definition at line 188 of file Core.inc.php.
References cleanFileVar().
|
static |
Check the passed user agent for a bot.
$userAgent | string |
$botRegexpsFile | string An alternative file with regular expressions to find bots inside user agent strings. |
Definition at line 103 of file Core.inc.php.
References $botRegexps, CACHE_TYPE_FILE, CacheManager\getManager(), PKPString\regexp_match(), and Registry\set().
Referenced by PKPRequest\isBot(), and UsageStatsLoader\processFile().
|
static |
Check if the server platform is Windows.
Definition at line 80 of file Core.inc.php.
References strtolower_codesafe().
Referenced by InstallForm\initData().
|
static |
Return *nix timestamp with microseconds (in units of seconds).
Definition at line 71 of file Core.inc.php.
Referenced by PKPApplication\__construct(), DAO\retrieve(), DAO\retrieveCached(), DAO\retrieveLimit(), DAO\retrieveRange(), and DAO\update().
Core::removeBaseUrl | ( | $url | ) |
Remove base url from the passed url, if any. Also, if true, checks for the context path in url and if it's missing, tries to add it.
$url | string |
Definition at line 233 of file Core.inc.php.
References _getBaseUrlAndPath().
Referenced by CoreTest\testRemoveBaseUrl(), and CoreTest\testRemoveBaseUrlOverride().
|
static |
The regular expressions that will find a bot user agent
Definition at line 31 of file Core.inc.php.
Referenced by _botFileListCacheMiss(), and isUserAgentBot().