Rev 1000 | Rev 1061 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1000 | Rev 1050 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | * See the License for the specific language governing permissions and |
16 | * See the License for the specific language governing permissions and |
17 | * limitations under the License. |
17 | * limitations under the License. |
18 | */ |
18 | */ |
19 | 19 | ||
20 | if (!defined('INSIDE_OIDPLUS')) die(); |
20 | namespace ViaThinkSoft\OIDplus; |
21 | 21 | ||
22 | class OIDplusPageAdminSoftwareUpdate extends OIDplusPagePluginAdmin { |
22 | class OIDplusPageAdminSoftwareUpdate extends OIDplusPagePluginAdmin { |
23 | 23 | ||
24 | public function init($html=true) { |
24 | public function init($html=true) { |
25 | } |
25 | } |
Line 316... | Line 316... | ||
316 | $tex = _L("New revision %1 by %2",$rev,$data['author'])." (".$data['date'].") "; |
316 | $tex = _L("New revision %1 by %2",$rev,$data['author'])." (".$data['date'].") "; |
317 | $content .= trim($tex . str_replace("\n", "\n".str_repeat(' ', strlen($tex)), $comment)); |
317 | $content .= trim($tex . str_replace("\n", "\n".str_repeat(' ', strlen($tex)), $comment)); |
318 | $content .= "\n"; |
318 | $content .= "\n"; |
319 | } |
319 | } |
320 | return $content; |
320 | return $content; |
321 | } catch (Exception $e) { |
321 | } catch (\Exception $e) { |
322 | return false; |
322 | return false; |
323 | } |
323 | } |
324 | 324 | ||
325 | } |
325 | } |
326 | 326 | ||
Line 344... | Line 344... | ||
344 | if ($ary === false) return false; |
344 | if ($ary === false) return false; |
345 | krsort($ary); |
345 | krsort($ary); |
346 | $max_rev = array_keys($ary)[0]; |
346 | $max_rev = array_keys($ary)[0]; |
347 | $newest_version = 'svn-' . $max_rev; |
347 | $newest_version = 'svn-' . $max_rev; |
348 | return $newest_version; |
348 | return $newest_version; |
349 | } catch (Exception $e) { |
349 | } catch (\Exception $e) { |
350 | return false; |
350 | return false; |
351 | } |
351 | } |
352 | } |
352 | } |
353 | 353 | ||
354 | private function showPreview($local_installation, $newest_version) { |
354 | private function showPreview($local_installation, $newest_version) { |
355 | $out = '<h2 id="update_header">'._L('Preview of update %1 → %2',$local_installation,$newest_version).'</h2>'; |
355 | $out = '<h2 id="update_header">'._L('Preview of update %1 → %2',$local_installation,$newest_version).'</h2>'; |
356 | 356 | ||
357 | ob_start(); |
357 | ob_start(); |
358 | try { |
358 | try { |
359 | $cont = $this->showChangelog($local_installation); |
359 | $cont = $this->showChangelog($local_installation); |
360 | } catch (Exception $e) { |
360 | } catch (\Exception $e) { |
361 | $cont = _L('Error: %1',$e->getMessage()); |
361 | $cont = _L('Error: %1',$e->getMessage()); |
362 | } |
362 | } |
363 | ob_end_clean(); |
363 | ob_end_clean(); |
364 | 364 | ||
365 | $cont = preg_replace('@!!!(.+)\\n@', '<font color="red">!!!\\1</font>'."\n", "$cont\n"); |
365 | $cont = preg_replace('@!!!(.+)\\n@', '<font color="red">!!!\\1</font>'."\n", "$cont\n"); |