Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit be95f98

Browse files
committed
Remove invalid todo's
1 parent 78b4900 commit be95f98

File tree

9 files changed

+12
-62
lines changed

9 files changed

+12
-62
lines changed

core/src/plugins/access.ajxp_home/HomePagePlugin.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ public function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$con
6262
/**
6363
* @param ContextInterface $ctx
6464
*/
65-
protected function initRepository(ContextInterface $ctx)
66-
{
67-
// TODO: Implement initRepository() method.
65+
protected function initRepository(ContextInterface $ctx){
6866
}
6967
}

core/src/plugins/access.ftp/FtpAccessWrapper.php

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -499,48 +499,7 @@ protected function parseUrl($url, $forceLogin = false)
499499
* @param AJXP_Node $node
500500
* @return array
501501
*/
502-
public static function getResolvedOptionsForNode($node)
503-
{
504-
/*
505-
$context = $node->getContext();
506-
$repository = $node->getRepository();
507-
$credentials = MemorySafe::tryLoadingCredentialsFromSources($context);
508-
$options = [
509-
"TYPE" => "ftp",
510-
"USER" => $credentials["user"],
511-
"PASSWORD" => $credentials["password"]
512-
];
513-
$optKeys = ["FTP_HOST", "PATH", "FTP_SECURE", "FTP_PORT", "FTP_DIRECT", "CHARSET"];
514-
if ($repository->getContextOption($node->getContext(), "DYNAMIC_FTP") == "TRUE" && isSet($_SESSION["AJXP_DYNAMIC_FTP_DATA"])){
515-
$sessionData = $_SESSION["AJXP_DYNAMIC_FTP_DATA"];
516-
foreach($optKeys as $key){
517-
$options[$key] = $sessionData[$key];
518-
}
519-
}else{
520-
foreach($optKeys as $key){
521-
$options[$key] = $repository->getContextOption($context, $key);
522-
}
523-
}
524-
$options["FTP_SECURE"] = ($options["FTP_SECURE"] === "TRUE");
525-
$options["FTP_DIRECT"] = ($options["FTP_DIRECT"] === "TRUE");
526-
$options["FTP_PORT"] = ($options["FTP_PORT"] !== null ? intval($options["FTP_PORT"]): $options["FTP_SECURE"] ? 22 : 21);
527-
528-
// Test Connexion and server features
529-
// TODO: not working, we have to make the options more restful
530-
global $_SESSION;
531-
$cacheKey = $repository->getId()."_ftpCharset";
532-
if (!isset($_SESSION[$cacheKey]) || !strlen($_SESSION[$cacheKey]) || $forceLogin) {
533-
$features = $this->getServerFeatures($node->getContext());
534-
$ctxCharset = SessionService::getContextCharset($node->getRepositoryId());
535-
if(empty($ctxCharset)) {
536-
SessionService::setContextCharset($node->getRepositoryId(), $features["charset"]);
537-
$_SESSION[$cacheKey] = $features["charset"];
538-
}else{
539-
$_SESSION[$cacheKey] = $ctxCharset;
540-
}
541-
}
542-
*/
543-
502+
public static function getResolvedOptionsForNode($node){
544503
return ["TYPE" => "php"];
545504
}
546505

core/src/plugins/access.inbox/InboxAccessWrapper.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,7 @@ public function url_stat($path, $flags)
427427
* @param AJXP_Node $node
428428
* @return array
429429
*/
430-
public static function getResolvedOptionsForNode($node)
431-
{
432-
// TODO: Should find node, and return associated repository real resolved options
430+
public static function getResolvedOptionsForNode($node){
433431
return ["TYPE" => "php"];
434432
}
435433
}

core/src/plugins/access.jsapi/JsapiAccessDriver.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
8989
/**
9090
* @param ContextInterface $ctx
9191
*/
92-
protected function initRepository(ContextInterface $ctx)
93-
{
94-
// TODO: Implement initRepository() method.
92+
protected function initRepository(ContextInterface $ctx) {
9593
}
9694
}

core/src/plugins/access.wms/WmsBrowser.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ public function listLayers($host, &$NodesList, $nodeList, $xPath, $replaceCallba
189189
/**
190190
* @param ContextInterface $ctx
191191
*/
192-
protected function initRepository(ContextInterface $ctx)
193-
{
194-
// TODO: Implement initRepository() method.
192+
protected function initRepository(ContextInterface $ctx) {
195193
}
196194
}

core/src/plugins/action.share/manifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
</client_settings>
3535
<registry_contributions>
3636
<actions>
37-
<!-- TODO : handle action names and authorization (and disable sharing mask) -->
3837
<action name="share_react">
3938
<gui text="292" title="292" src="share.png" iconClass="mdi mdi-share-variant" hasAccessKey="false">
4039
<context selection="true" dir="true" recycle="hidden" actionBar="true" actionBarGroup="get,info_panel_share" contextMenu="true"/>

core/src/plugins/action.share/src/Legacy/LegacyPubliclet.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ public static function publicletToJson(ContextInterface $ctx, $shareId, $shareMe
147147
public static function migrateLegacyMeta(ContextInterface $ctx, $shareCenter, $shareStore, $shareRightManager, $dryRun = true){
148148
$metaStoreDir = AJXP_DATA_PATH."/plugins/metastore.serial";
149149
$publicFolder = ConfService::getGlobalConf("PUBLIC_DOWNLOAD_FOLDER");
150-
// TODO 1: Check all metastores of all repositories?
151-
// TODO 2: load $publicFolder/.ajxp_publiclet_counters.ser and reassign download counts
152-
$metastores = glob($metaStoreDir."/ajxp_meta_0");
150+
$metastores = glob($metaStoreDir."/ajxp_meta_*");
153151
if($dryRun){
154152
print("RUNNING A DRY RUN FOR META MIGRATION");
155153
}
@@ -163,8 +161,6 @@ public static function migrateLegacyMeta(ContextInterface $ctx, $shareCenter, $s
163161
$data = unserialize(file_get_contents($store));
164162
foreach($data as $filePath => &$metadata){
165163

166-
167-
168164
foreach($metadata as $userName => &$meta){
169165
if(!UsersService::userExists($userName)){
170166
continue;

core/src/plugins/action.share/src/ShareCenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ public function switchAction(ServerRequestInterface &$requestInterface, Response
995995
$this->getShareStore()->getMetaManager()->setNodeMeta($ajxpNode, $metadata, true);
996996
}
997997
}else{
998-
// TODO: testUserCanEditShare ?
998+
$this->getShareStore()->testUserCanEditShare(($ctx->hasUser()?$ctx->getUser()->getId():null), $hash);
999999
$this->getShareStore()->updateShareProperty($hash, $httpVars["p_name"], $httpVars["p_value"]);
10001000
}
10011001

core/src/plugins/core.access/src/CoreAccessHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@
4040
*/
4141
class CoreAccessHandler extends Plugin
4242
{
43+
/**
44+
* @param ContextInterface $ctx
45+
* @param array $options
46+
*/
4347
public function init(ContextInterface $ctx, $options = [])
4448
{
45-
parent::init($ctx, $options); // TODO: Change the autogenerated stub
49+
parent::init($ctx, $options);
4650
MetaStreamWrapper::register();
4751
}
4852

0 commit comments

Comments
 (0)