コード例 #1
0
ファイル: settings.php プロジェクト: harrynorthover/blend
 public function update($args)
 {
     //echo $args[0];
     //echo '        -      ' . $_POST['uploadsPath'];
     $vo = new SettingsVO(0);
     $updatedData = array($_POST['siteName'], $_POST['siteDescription'], $_POST['maintenanceMode'], $_POST['uploadsPath'], $_POST['enableUploads'], $_POST['twitterUsername'], $_POST['twitterPassword'], $_POST['enableTwitter'], $_POST['autoTweet']);
     $this->registry->update->updateData(Types::SETTINGS_TABLE, $args[0], $vo->getTableRowNames(), $updatedData);
 }
コード例 #2
0
 public function parse($data)
 {
     /*
      * Assign the data returned from the PortfolioProxy.php to $this->databaseData.
      */
     $this->databaseData = $data;
     /*
      * Process through the data returned from the proxy.
      */
     while ($row = mysql_fetch_array($this->databaseData)) {
         $vo = new SettingsVO($row['id']);
         $vo->siteTitle($row['siteName']);
         $vo->siteDescription($row['siteDescription']);
         $vo->adminEmail($row['adminEmail']);
         $vo->maintenanceMode($row['maintenanceMode']);
         $vo->uploadPath($row['uploadPath']);
         $vo->enableUploads($row['enableUploads']);
         $vo->twitterUsername($row['twitterUsername']);
         $vo->twitterPassword($row['twitterPassword']);
         $vo->enableTwitter($row['enableTwitter']);
         $vo->autoTweet($row['autoTweet']);
         $vo->about($row['about']);
         /*
          * Push the new object to the array containing the parsed objects.
          */
         array_push($this->parsedData, $vo);
     }
     /*
      * Reverse the array so the oldest items are at
      * the start of the array, then return it.
      */
     return array_reverse($this->parsedData);
 }