Skip to content

Technical Plugin DiskUploadQuota

Daniel Neto edited this page Oct 29, 2026 · 1 revision

Technical: DiskUploadQuota plugin

Enforces storage quotas and manages quota-plan purchase flows.

Audience: developers, advanced administrators and AI-assisted diagnosis. Plugin catalog.

Source baseline

  • Review date: 2026-10-29. Method: static source analysis; runtime/provider behavior was not exercised.
  • Code ownership: independently versioned plugin repository.
  • Reported version: 5.2.
  • Source revision: 4beb6724c02739b8ee2517009b6090e6918350a6.
  • Entry class file: DiskUploadQuota.php.

Confirm the installed plugin version independently of the Streamer version. Configuration defaults below are not a dump of this installation's saved settings.

Behavior and operational checks

Quota affects upload eligibility and can affect visibility of an owner's videos. Trace storage usage, the current plan and actual permission hooks separately. Plan purchasing uses the declared wallet dependency.

Dependencies

Plugin Required by declaration Source reason
YPTWallet Required Charges quota plan purchases to the user wallet balance

Literal runtime plugin references: Subscription, UploadQuotaPlan, UploadQuotaUser, YPTWallet. These calls do not mean every referenced plugin is mandatory.

Hook integration

Override Implementation
getTags() DiskUploadQuota.php:19
getModeYouTube($videos_id) DiskUploadQuota.php:83
getEmbed($videos_id) DiskUploadQuota.php:93
userCanWatchVideo($users_id, $videos_id) DiskUploadQuota.php:97
userCanWatchVideoWithAds($users_id, $videos_id) DiskUploadQuota.php:109
showAds($videos_id) DiskUploadQuota.php:121
getPluginMenu() DiskUploadQuota.php:133
getUsersManagerListButton() DiskUploadQuota.php:139
getFooterCode() DiskUploadQuota.php:147
getVideoManagerButton() DiskUploadQuota.php:157
userCanUpload($users_id) DiskUploadQuota.php:185
getHTMLMenuRight() DiskUploadQuota.php:230
isPaidUser($users_id) DiskUploadQuota.php:243
executeEveryDay() DiskUploadQuota.php:284

Configuration assignments

These are direct assignments inside getEmptyDataObject(), not evaluated effective defaults. Stored plugins.object_data, globals, structured values and conditional branches may alter runtime behavior. Private/default credential values are omitted.

Field Literal default or expression type Literal source label/help Evidence
deleteVideosWith0Bytes false — source
Publishablekey Private setting; value omitted Stripe Publishable key: pk_test_QtXIjjmEtBw7LPfRvrE3aODY00qYUGlHn0 source
Restrictedkey Private setting; value omitted Stripe Restricted key: sk_test_6r4tNKjoAx6FxfphNmUmNbHe source
SigningSecret Private setting; value omitted Stripe Signing Secret source
ifExceedQuotaShowAds true — source
ifExceedQuotaDoNotPlayVideos false — source
ifExceedQuotaNotificationText Computed/structured; inspect source — source
buttonLabel 'Buy More Storage' — source
buttonTooltipIfExceed Computed/structured; inspect source — source
buttonTooltipIfCloseToExceed Computed/structured; inspect source — source
minimumViewsPerMonthForFreeUsers 0 — source
messageToAppearOnBuyPage Computed/structured; inspect source — source

Files and request surface

This inventory distinguishes implementation files from an API specification. Includes, templates, callbacks and CLI workers are not interchangeable HTTP endpoints. Request-field names below are direct source references, not a complete schema or permission declaration.

File Source role Direct request fields observed
DiskUploadQuota.php plugin entry class —
Objects/UploadQuotaPlan.php class/helper implementation —
Objects/UploadQuotaPlanLog.php class/helper implementation —
Objects/UploadQuotaUser.php class/helper implementation —
Subscription/Stripe/StripeObject.php class/helper implementation stripeToken
Subscription/Stripe/button.php PHP page/include/worker; inspect caller —
Subscription/Stripe/ipn.php PHP page/include/worker; inspect caller —
Subscription/Stripe/request.json.php JSON entry point; inspect caller and guard plans_id, stripeToken
Subscription/freeplan.php PHP page/include/worker; inspect caller plans_id
deleteVideosBasedOnViews.json.php JSON entry point; inspect caller and guard —
footer.php PHP page/include/worker; inspect caller —
getUsage.json.php JSON entry point; inspect caller and guard users_id
install/install.sql schema/migration SQL —
page/buy.php PHP page/include/worker; inspect caller —
page/editor.php PHP page/include/worker; inspect caller —
page/editorPlans.php PHP page/include/worker; inspect caller —
page/editorUsers.php PHP page/include/worker; inspect caller —
page/editor_body.php PHP page/include/worker; inspect caller current
page/editor_head.php PHP page/include/worker; inspect caller —
page/getVideoManagerButton.php PHP page/include/worker; inspect caller —
page/menuRight.php PHP page/include/worker; inspect caller —
page/plans.json.php JSON entry point; inspect caller and guard draw
page/plansCancel.php PHP page/include/worker; inspect caller id
page/plansDelete.json.php JSON entry point; inspect caller and guard id
page/plansSave.json.php JSON entry point; inspect caller and guard days_free_trial, days_valid, description, id, name, price, quota_in_bytes, status
page/profileTabContent.php PHP page/include/worker; inspect caller sort
page/saveUserPlans.json.php JSON entry point; inspect caller and guard quotaPlans, users_id
users.json.php JSON entry point; inspect caller and guard —
users_with_valid_plans.json.php JSON entry point; inspect caller and guard —

Data and migrations

Tables named in available CREATE TABLE statements: upload_quota_plan, upload_quota_plan_has_users, upload_quota_plan_users_log. Apply installation/update behavior through the owning plugin; this reference is not a script for running historical migrations manually.

Main-file named symbols

Visibility and implementation semantics must be checked in source. Nonempty string defaults are represented as . This is a symbol reference, not a stable public API promise.

Function or method Source
getTags() 19
getPluginDependencies() 26
getPluginVersion() 32
getDescription() 37
getName() 46
getUUID() 50
getEmptyDataObject() 54
getModeYouTube($videos_id) 83
getEmbed($videos_id) 93
userCanWatchVideo($users_id, $videos_id) 97
userCanWatchVideoWithAds($users_id, $videos_id) 109
showAds($videos_id) 121
getPluginMenu() 133
getUsersManagerListButton() 139
getFooterCode() 147
getVideoManagerButton() 157
userExceedQuota($users_id) 166
videoOwnerExceedsQuota($videos_id) 180
userCanUpload($users_id) 185
canUpload($users_id) 204
getPercentageUsage($users_id) 220
getHTMLMenuRight() 230
isPaidUser($users_id) 243
deleteVideosBasedOnViews($viewsPerMonth = 2) 247
executeEveryDay() 284
getFromStripeCostumerId($stripe_costumer_id) 291

Supporting PHP declarations

These symbols are grouped by source file; inspect the class declaration and visibility before calling them.

Objects/UploadQuotaPlan.php

Declared classes: UploadQuotaPlan.

Named symbol Source
getSearchFieldsNames() 10
getTableName() 14
getId() 18
getName() 22
getDescription() 26
getStatus() 30
getDays_valid() 34
getPrice() 38
setId($id) 42
setName($name) 46
setDescription($description) 51
setStatus($status) 55
setDays_valid($days_valid) 59
setPrice($price) 63
getDays_free_trial() 67
setDays_free_trial($days_free_trial) 71
getQuota_in_bytes() 75
setQuota_in_bytes($quota_in_bytes) 79
getCreated() 83
getModified() 87
getStripe_plan_id() 91
getPaypal_plan_id() 95
setStripe_plan_id($stripe_plan_id) 99
setPaypal_plan_id($paypal_plan_id) 103
getAll($activeOnly=false) 108
onTrial($users_id, $plans_id) 138
isTrial($plans_id) 158
getFromStripeCostumerId($stripe_costumer_id) 169

Objects/UploadQuotaPlanLog.php

Declared classes: UploadQuotaPlanLog.

Named symbol Source
getSearchFieldsNames() 9
getTableName() 13
getId() 17
getUsers_id() 21
getUpload_quota_plan_id() 25
getPrice_paid() 29
getDays_valid() 33
getObs() 37
setId($id) 41
setUsers_id($users_id) 45
setUpload_quota_plan_id($upload_quota_plan_id) 49
setPrice_paid($price_paid) 53
setDays_valid($days_valid) 57
setObs($obs) 61

Objects/UploadQuotaUser.php

Declared classes: UploadQuotaUser.

Named symbol Source
getAllFromUser($users_id, $active_only = false) 12
getSearchFieldsNames() 34
getTableName() 38
getUpload_quota_plan_id() 42
getUsers_id() 46
getExpires_in() 50
getStatus() 54
setUpload_quota_plan_id($upload_quota_plan_id) 58
setUsers_id($users_id) 62
setExpires_in($expires_in) 66
setStatus($status) 70
getPayment_gatway() 74
getCostumer_identification() 78
setPayment_gatway($payment_gatway) 82
setCostumer_identification($costumer_identification) 86
getPayment_identification() 90
setPayment_identification($payment_identification) 94
getCurrentQuotaLimit($users_id) 98
userHasAnyPlan($users_id) 114
getCurrentQuotaLimitHuman($users_id) 119
getPlans($users_id, $isValid = false) 123
getPlan($users_id, $plans_id, $isValid = false) 149
renew($users_id, $plans_id) 175
addOrRenewUserInPlan($users_id, $upload_quota_plan_id, $activate = false, $countExpirationFromNow = false) 215
inactivateUserInPlan($users_id, $upload_quota_plan_id) 261
activateUserInPlan($users_id, $upload_quota_plan_id) 274
inactivateAllUserPlans($users_id) 287
userHasPlan($users_id, $upload_quota_plan_id) 294
cancelPlan($id) 312
getSubscription($users_id, $plans_id, $stillGood = true) 334
updateCostumer_identification($upload_quota_plan_has_users_id, $costumer_identification) 338
updatePayment_identification($upload_quota_plan_has_users_id, $payment_identification) 348

Subscription/Stripe/StripeObject.php

Declared classes: StripeObject.

Named symbol Source
getDataObject() 11
__construct($Publishablekey, $Restrictedkey, $SigningSecret) 23
start() 29
getWebhook() 36
setUpPayment($total = '<string>', $currency = '<string>', $description = "") 56
getAmountFromPayment($payment) 82
addDot($value) 92
removeDot($value) 98
getCurrencyFromPayment($payment) 103
isPaymentOk($payment, $value, $currency) 110
createCostumer($users_id, $stripeToken) 135
getCostumerId($users_id, $stripeToken) 158
isCostumerValid($id) 173
createBillingPlan($total = '<string>', $currency = '<string>', $frequency = '<string>', $interval = 1, $name = '<string>') 195
updateBillingPlan($plans_id, $total = '<string>', $currency = '<string>', $interval = 1, $name = '<string>') 211
getSubscriptions($costumer_identification, $plans_id) 228
setUpSubscription($plans_id, $stripeToken) 253
getOrCreateSubscription($users_id, $plans_id, $costumer_identification = "") 342
processSubscriptionIPN($payload) 384
getAllSubscriptions($status = '<string>') 405
cancelSubscriptions($id) 415
getSubscription($users_id, $plans_id, $isValid = true) 430

Diagnostics and validation

  1. Check the installed/enabled version and the dependencies/settings above.
  2. Identify the actual failing page, request, callback or worker and correlate its timestamp with the AVideo log.
  3. Follow the linked method and caller. Check business-state changes and output artifacts as well as HTTP status.
  4. Reproduce the relevant workflow in a test environment. External provider, Encoder, live-server, storage, payment and authenticated flows require their real integrations.

Shared diagnostic workflow. This page is not a security audit or a claim of end-to-end validation.

Clone this wiki locally