Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Miscellaneous PHP formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Jun 11, 2014
1 parent f48f6a6 commit b8570e2
Show file tree
Hide file tree
Showing 297 changed files with 241 additions and 702 deletions.
1 change: 0 additions & 1 deletion core/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,4 @@ public function optionsAction()
{
$this->_response->setHeader('Allow', 'OPTIONS');
}

} // end class
2 changes: 0 additions & 2 deletions core/AppComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@
*/
class AppComponent extends MIDAS_GlobalComponent
{


}
3 changes: 1 addition & 2 deletions core/AppForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public function __construct()
$this->webroot = $fc->getBaseUrl();
}//end construct


/** translation */
protected function t($text)
protected function t($text)
{
Zend_Loader::loadClass("InternationalizationComponent", BASE_PATH.'/core/controllers/components');
return InternationalizationComponent::translate($text);
Expand Down
1 change: 0 additions & 1 deletion core/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ protected function _initDoctype()
$view->doctype('XHTML1_STRICT');
}//end _initDoctype


/**
* \fn protected _initConfig()
* \brief set the configuration and save it in the registry
Expand Down
6 changes: 3 additions & 3 deletions core/constant/notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
limitations under the License.
=========================================================================*/

define("MIDAS_EVENT_PRIORITY_NORMAL",1);
define("MIDAS_EVENT_PRIORITY_LOW",0);
define("MIDAS_EVENT_PRIORITY_HIGH",2);
define("MIDAS_EVENT_PRIORITY_NORMAL", 1);
define("MIDAS_EVENT_PRIORITY_LOW", 0);
define("MIDAS_EVENT_PRIORITY_HIGH", 2);
3 changes: 0 additions & 3 deletions core/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,6 @@ function showlogAction()
$offset = 0;
}



$results = $this->Errorlog->getLog($start, $end, $module, $priority, $limit, $offset, $priorityOperator);
$this->view->jsonContent = array();
$this->view->jsonContent['currentFilter'] = array('start' => $start,
Expand Down Expand Up @@ -646,7 +644,6 @@ function serversidefilechooserAction()
// No views
} // end function serversidefilechooserAction


/**
* \fn
* \brief
Expand Down
1 change: 0 additions & 1 deletion core/controllers/ApidocsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function init()
$this->disableView();
}


/** Index resource */
function indexAction()
{
Expand Down
3 changes: 0 additions & 3 deletions core/controllers/AssetstoreController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ function init()
*/
function indexAction()
{

}// end indexAction


/** change default assetstore*/
function defaultassetstoreAction()
{
Expand All @@ -69,7 +67,6 @@ function defaultassetstoreAction()
echo JsonComponent::encode(array(false, $this->t('Error')));
}//defaultassetstoreAction


/** delete an assetstore */
function deleteAction()
{
Expand Down
1 change: 0 additions & 1 deletion core/controllers/BrowseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ public function selectfolderAction()

$communities = $this->User->getUserCommunities($this->userSession->Dao);


if(isset($policy) && $policy == 'read')
{
$policy = MIDAS_POLICY_READ;
Expand Down
1 change: 0 additions & 1 deletion core/controllers/CommunityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ function manageAction()
$this->view->customTabs = Zend_Registry::get('notifier')->callback('CALLBACK_CORE_GET_COMMUNITY_MANAGE_TABS', array('community' => $communityDao));
}//end manageAction


/** Index */
function indexAction()
{
Expand Down
2 changes: 0 additions & 2 deletions core/controllers/FolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ public function viewAction()
$this->view->json['folder'] = $folder;
}// end View Action


/**
* Prompt the user to confirm deletion of a folder
* @param folderId The id of the folder to be deleted
Expand Down Expand Up @@ -419,5 +418,4 @@ public function createfolderAction()
}
}
}// end createfolderAction

} // end class
4 changes: 0 additions & 4 deletions core/controllers/ImportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ private function _recursiveCountFiles($path)
return $initialcount;
} // end function _recursiveCountFiles


/** Check if the import should be stopped */
private function _checkStopImport()
{
Expand Down Expand Up @@ -159,7 +158,6 @@ private function _recursiveParseDirectory($path, $currentdir)
continue;
}


// Get the files in the directory and skip the folder if it does not
// contain any files and we aren't set to import empty directories. The
// count($files) <= 2 is there to account for our our friends . and ..
Expand Down Expand Up @@ -369,7 +367,6 @@ function importAction()
return false;
} // end import action


/**
* This function pulls the progress for the temporary importprogress_ file.
*/
Expand Down Expand Up @@ -418,5 +415,4 @@ function stopAction()
}
return false;
} // end stopAction

} // end class
1 change: 0 additions & 1 deletion core/controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ function nobrowserAction()
{
$this->disableLayout();
} // end method indexAction

} // end class
2 changes: 0 additions & 2 deletions core/controllers/InstallController.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ function indexAction()
}
} // end method indexAction


/**
* @method step2Action()
*/
Expand Down Expand Up @@ -301,7 +300,6 @@ function step3Action()
}
} // end method step2Action


/** ajax function which tests connectivity to a db */
public function testconnexionAction()
{
Expand Down
4 changes: 0 additions & 4 deletions core/controllers/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,6 @@ function deleteAction()
}
}//end delete



/**
* Delete an itemrevision
*
Expand Down Expand Up @@ -528,7 +526,6 @@ function editbitstreamAction()
$formArray['name']->setValue($bitstreamDao->getName());
$formArray['mimetype']->setValue($bitstreamDao->getMimetype());
$this->view->bitstreamform = $formArray;

}//end editbitstreamAction

/**
Expand Down Expand Up @@ -636,7 +633,6 @@ public function checksharedAction()
echo JsonComponent::encode($ifShared);
} // end checkshared


/**
* ajax function which checks if a metadata value is defined for a given
* item, itemrevision, metadatatype, element, and qualifier.
Expand Down
4 changes: 0 additions & 4 deletions core/controllers/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ function init()
}
} // end init()


/** search live Action */
public function indexAction()
{
Expand Down Expand Up @@ -76,8 +75,6 @@ public function indexAction()
}
}//end indexAction



/** search live Action */
public function liveAction()
{
Expand Down Expand Up @@ -168,7 +165,6 @@ public function liveAction()
$GroupsDao = array();
}


// Compute how many of each we should display
$nitems = count($ItemsDao);
$nfolders = count($FoldersDao);
Expand Down
2 changes: 0 additions & 2 deletions core/controllers/ShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ class ShareController extends AppController
/** Init Controller */
function init()
{

} // end init()


/** ajax dialog for managing permissions */
function dialogAction()
{
Expand Down
3 changes: 0 additions & 3 deletions core/controllers/UploadController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ private function _is_https()
return array_key_exists('HTTPS', $_SERVER) && $_SERVER["HTTPS"] === 'on';
}


/** simple upload*/
public function simpleuploadAction()
{
Expand Down Expand Up @@ -277,7 +276,6 @@ public function revisionAction()
'CALLBACK_CORE_GET_REVISIONUPLOAD_EXTRA_HTML', array('item' => $item));
}//end revisionAction


/** save a link*/
public function savelinkAction()
{
Expand Down Expand Up @@ -406,7 +404,6 @@ function gethttpuploaduniqueidentifierAction()
}
} //end get_http_upload_unique_identifier


/**
* Process a java upload
* @param uploadUniqueIdentifier The upload token (see gethttpuploaduniqueidentifierAction)
Expand Down
2 changes: 0 additions & 2 deletions core/controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ function loginAction()
}
} // end method login


/** Term of service */
public function termofserviceAction()
{
Expand All @@ -556,7 +555,6 @@ public function termofserviceAction()
}
} // end term of service


/**
* Test whether a given user already exists or not.
* @param entry The email/login to test.
Expand Down
1 change: 0 additions & 1 deletion core/controllers/api/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function preDispatch()
$this->view->setScriptPath(BASE_PATH."/core/views/rest");
}


/** Index function */
function indexAction()
{
Expand Down
2 changes: 0 additions & 2 deletions core/controllers/components/ApibitstreamComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ function bitstreamGetWrapper($args)
return $out;
}


/**
* Change the properties of a bitstream. Requires write access to the containing item.
* @path /bitstream/{id}
Expand Down Expand Up @@ -308,5 +307,4 @@ function bitstreamDownloadByChecksum($args)
{
$this->bitstreamDownload($args);
}

} // end class
1 change: 0 additions & 1 deletion core/controllers/components/ApidocsComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,4 @@ public function getResourceApiDocs($resource, $module = '')
}
return $swaggerDoc;
}

} // end class
3 changes: 1 addition & 2 deletions core/controllers/components/ApifolderComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ public function folderListPermissions($args)
throw new Exception("Admin privileges required on the folder to list permissions.", MIDAS_INVALID_POLICY);
}

return $apihelperComponent->listResourcePermissions($folderpolicygroupModel->computePolicyStatus($folder), $folder->getFolderpolicyuser(), $folder->getFolderpolicygroup());

return $apihelperComponent->listResourcePermissions($folderpolicygroupModel->computePolicyStatus($folder), $folder->getFolderpolicyuser(), $folder->getFolderpolicygroup());
}

/**
Expand Down
1 change: 0 additions & 1 deletion core/controllers/components/ApigroupComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,4 @@ function groupRemove($args)
$groupModel->delete($group);
return array('success' => 'true');
}

} // end class
1 change: 0 additions & 1 deletion core/controllers/components/ApihelperComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,5 +485,4 @@ public function isCallerAdmin($args)
return true;
}
}

} // end class
3 changes: 1 addition & 2 deletions core/controllers/components/ApiitemComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public function itemListPermissions($args)
throw new Exception("Admin privileges required on the item to list permissions.", MIDAS_INVALID_POLICY);
}

return $apihelperComponent->listResourcePermissions($itempolicygroupModel->computePolicyStatus($item), $item->getItempolicyuser(), $item->getItempolicygroup());
return $apihelperComponent->listResourcePermissions($itempolicygroupModel->computePolicyStatus($item), $item->getItempolicyuser(), $item->getItempolicygroup());
}

/**
Expand Down Expand Up @@ -949,5 +949,4 @@ function itemDownload($args)
$r = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');
$r->gotoUrl($redirUrl);
}

} // end class
2 changes: 0 additions & 2 deletions core/controllers/components/ApiitemrevisionComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,5 @@ function itemrevisionGet($args)
$itemRevision->getBitstreams());

return $out;

}

} // end of class
2 changes: 0 additions & 2 deletions core/controllers/components/ApisystemComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public function resourcesList($args)
$data[$resource] = $apiroot . $resource;
}
return array('resources' => $data);

}

/**
Expand Down Expand Up @@ -640,5 +639,4 @@ function adminDatabaseCleanup($args)
MidasLoader::loadModel($model)->removeOrphans();
}
}

} // end class
1 change: 0 additions & 1 deletion core/controllers/components/ApiuserComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,4 @@ function userSearch($args)
throw new Exception('Please provide a user email or both first and last name', MIDAS_INVALID_PARAMETER);
}
}

} // end class
1 change: 0 additions & 1 deletion core/controllers/components/DownloadBitstreamComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function download($bitstream, $offset = 0, $incrementDownload = false)
apache_setenv('no-gzip', '1');
}


$mimetype = $bitstream->getMimetype();
$path = $bitstream->getAssetstore()->getPath().'/'.$bitstream->getPath();
$name = $bitstream->getName();
Expand Down
2 changes: 1 addition & 1 deletion core/controllers/components/FilterComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function getFilter($filter)
Zend_Loader::loadClass($filter, BASE_PATH.'/core/controllers/components/filters');
if(!class_exists($filter))
{
throw new Zend_Exception("Unable to load filter: ".$filter );
throw new Zend_Exception("Unable to load filter: ".$filter);
}
return new $filter();
}
Expand Down
1 change: 0 additions & 1 deletion core/controllers/components/JsonComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ static public function decode($encodedValue, $objectDecodeType = true)
return $tab;
}


/**
* Encode the mixed $valueToEncode into the JSON format
*
Expand Down
Loading

0 comments on commit b8570e2

Please sign in to comment.