Remove sync media functions (glitchy)
This commit is contained in:
@@ -146,20 +146,6 @@ class Media extends PhpObject {
|
||||
return Spot::getResult(($sError==''), $sError, $asParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* One-shot function to initialize DB with existing images
|
||||
*/
|
||||
public function syncFileFolder() {
|
||||
$asMediaPaths = glob(self::getMediaPath('*.{jpg,JPG,jpeg,JPEG,png,PNG,mov,MOV}'), GLOB_BRACE);
|
||||
foreach($asMediaPaths as $sMediaPath)
|
||||
{
|
||||
$sMediaName = pathinfo($sMediaPath, PATHINFO_BASENAME);
|
||||
$this->addMedia($sMediaName, 'sync');
|
||||
}
|
||||
$this->setExtractMode(PhpObject::MODE_HTML);
|
||||
return $this->getCleanMessageStack();
|
||||
}
|
||||
|
||||
private function getMediaInfoFromFile($sMediaName)
|
||||
{
|
||||
$sMediaPath = self::getMediaPath($sMediaName);
|
||||
|
||||
10
inc/Spot.php
10
inc/Spot.php
@@ -72,12 +72,6 @@ class Spot extends Main
|
||||
$this->oUser->setUserId($iUserId);
|
||||
}
|
||||
|
||||
public function syncPics() {
|
||||
if(Settings::DEBUG) {
|
||||
return (new Media($this->oDb, $this->oProject))->syncFileFolder();
|
||||
}
|
||||
}
|
||||
|
||||
protected function getSqlOptions()
|
||||
{
|
||||
return array
|
||||
@@ -586,10 +580,6 @@ class Spot extends Main
|
||||
return array('ref_id_last'=>$iRefIdLast, 'ref_id_first'=>$iRefIdFirst, 'sort'=>$sSort, 'feed'=>$asItems);
|
||||
}
|
||||
|
||||
public function syncMedias() {
|
||||
return $this->oMedia->syncFileFolder();
|
||||
}
|
||||
|
||||
public function addPost($sName, $sPost)
|
||||
{
|
||||
$iPostId = 0;
|
||||
|
||||
Reference in New Issue
Block a user